public class TLcdS52GXYPainterProvider extends Object implements ILcdGXYPainterProvider, ILcdGXYLabelPainterProvider
ILcdGXYPainterProvider
paints S-57 geometries
according to the S-52 standard.
Before the painter provider can be used, an object class map, an attribute
class map, an attribute class description map and a symbology have to be set.
Some additional display settings can be specified:
Constructor and Description |
---|
TLcdS52GXYPainterProvider()
Creates a new
TLcdS52GXYPainterProvider , initialized with default S-52 display
settings. |
TLcdS52GXYPainterProvider(TLcdS52DisplaySettings aDisplaySettings)
Creates a new
TLcdS52GXYPainterProvider , initialized with the given S-52 display
settings. |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Redefines
Object.clone to make it public. |
int |
getAreaBoundarySymbolType()
Returns the style type for painting areas.
|
int |
getColorType()
Returns the color preference.
|
double |
getDeepContour()
Returns the deep contour.
|
int |
getDisplayCategory()
Returns the display category that will be painted.
|
TLcdS52DisplaySettings |
getDisplaySettings()
Returns the S-52 display settings object, defining how the S-57 data will be rendered.
|
ILcdGXYLabelPainter |
getGXYLabelPainter(Object aObject)
Finds an
ILcdGXYLabelPainter that can be used to label the object passed. |
ILcdGXYPainter |
getGXYPainter(Object aObject)
Finds an
ILcdGXYPainter that can be used to paint or locate the object passed. |
int |
getPointSymbolType()
Returns the style type for painting points.
|
ILcdS52ConditionalSymbology |
getS52ConditionalSymbology()
Returns the conditional symbology.
|
ILcdS52Symbology |
getS52Symbology()
Returns the symbology.
|
ILcdS57AttributeClassDescriptionMap |
getS57AttributeClassDescriptionMap()
Returns the attribute class description map.
|
ILcdS57AttributeClassMap |
getS57AttributeClassMap()
Returns the attribute class map.
|
ILcdS57ObjectClassMap |
getS57ObjectClassMap()
Returns the object class map.
|
double |
getSafetyContour()
Returns the safety contour.
|
double |
getSafetyDepth()
Returns the safety depth.
|
double |
getShallowContour()
Returns the shallow contour.
|
boolean |
isAntiAliased()
Returns if anti-aliasing is enabled.
|
boolean |
isDisplayFullLengthLightSectorLines()
Returns whether light sector lines should be displayed full length.
|
boolean |
isDisplayMetaData()
Returns
true if S-57 meta data objects are displayed, false
otherwise. |
boolean |
isDisplaySoundings()
Returns whether soundings should be displayed.
|
boolean |
isDisplayText()
Returns whether text should be displayed.
|
boolean |
isDisplayTextGroup(int aTextGroup) |
boolean |
isShallowPattern()
Returns true if the option 'shallow pattern' is enabled.
|
boolean |
isShowIsolatedDangersInShallowWater()
Returns true if the option 'show isolated dangers in shallow water' is enabled.
|
boolean |
isTwoShades()
Returns true if the option 'two shades' is enabled.
|
boolean |
isUseAbbreviations()
Returns whether abbreviations are used for the rendering of texts.
|
boolean |
isUseNationalLanguage()
Returns whether to use the national language text labels instead of the default
(international)
labels.
|
boolean |
isUsePaintCache()
Returns whether caching is used when painting this painter's object.
|
void |
setAntiAliased(boolean aAntiAliased)
Enable or disable anti-aliasing.
|
void |
setAreaBoundarySymbolType(int aAreaBoundarySymbolType)
Sets the style type for painting areas.
|
void |
setColorType(int aColorType)
Sets the color preference.
|
void |
setDeepContour(double aDeepContour)
Sets the deep contour.
|
void |
setDisplayCategory(int aDisplayCategory)
Sets the display category that will be painted.
|
void |
setDisplayFullLengthLightSectorLines(boolean aDisplayFullLengthLightSectorLines)
Sets whether light sector lines should be displayed full length.
|
void |
setDisplayMetaData(boolean aDisplayMetaData)
Sets whether S-57 meta data objects (object class 300 - 312) should be displayed or not.
|
void |
setDisplaySoundings(boolean aDisplaySoundings)
Sets whether soundings should be displayed.
|
void |
setDisplayText(boolean aDisplayText)
Sets whether text should be displayed.
|
void |
setDisplayTextGroup(int aTextGroup,
boolean aDisplayTextGroup)
Sets whether the given text group should be displayed or not.
|
void |
setPointSymbolType(int aPointSymbolType)
Sets the style type for painting points.
|
void |
setS52ConditionalSymbology(ILcdS52ConditionalSymbology aS52ConditionalSymbology)
Sets the conditional symbology.
|
void |
setS52Symbology(ILcdS52Symbology aS52Symbology)
Sets the symbology that is required for painting.
|
void |
setS57AttributeClassDescriptionMap(ILcdS57AttributeClassDescriptionMap aMap)
Sets the attribute class description map that is required for painting.
|
void |
setS57AttributeClassMap(ILcdS57AttributeClassMap aS57AttributeClassMap)
Sets the attribute class map that is required for painting.
|
void |
setS57ObjectClassMap(ILcdS57ObjectClassMap aS57ObjectClassMap)
Sets the object class map that is required for painting.
|
void |
setSafetyContour(double aSafetyContour)
Sets the safety contour.
|
void |
setSafetyDepth(double aSafetyDepth)
Sets the safety depth.
|
void |
setShallowContour(double aShallowContour)
Sets the shallow contour.
|
void |
setShallowPattern(boolean aShallowPattern)
Enables/disables the option 'shallow pattern'.
|
void |
setShowIsolatedDangersInShallowWater(boolean aShowIsolatedDangers)
Enables/disables the option 'show isolated dangers in shallow water'.
|
void |
setTwoShades(boolean aTwoShades)
Enables/disables the option 'two shades'.
|
void |
setUseAbbreviations(boolean aUseAbbreviations)
Sets whether abbreviations should be used for the rendering of texts.
|
void |
setUseNationalLanguage(boolean aUseNationalLanguage)
Sets whether to use national language text labels.
|
void |
setUsePaintCache(boolean aPaintCache)
Turns caching of the representation of the object on or off.
|
public TLcdS52GXYPainterProvider()
TLcdS52GXYPainterProvider
, initialized with default S-52 display
settings.public TLcdS52GXYPainterProvider(TLcdS52DisplaySettings aDisplaySettings)
TLcdS52GXYPainterProvider
, initialized with the given S-52 display
settings.aDisplaySettings
- the S-52 display settings to be used for rendering S-57 data.public TLcdS52DisplaySettings getDisplaySettings()
public void setS57ObjectClassMap(ILcdS57ObjectClassMap aS57ObjectClassMap)
public ILcdS57ObjectClassMap getS57ObjectClassMap()
public void setS57AttributeClassMap(ILcdS57AttributeClassMap aS57AttributeClassMap)
public ILcdS57AttributeClassMap getS57AttributeClassMap()
public void setS57AttributeClassDescriptionMap(ILcdS57AttributeClassDescriptionMap aMap)
public ILcdS57AttributeClassDescriptionMap getS57AttributeClassDescriptionMap()
public void setS52Symbology(ILcdS52Symbology aS52Symbology)
public ILcdS52Symbology getS52Symbology()
public void setS52ConditionalSymbology(ILcdS52ConditionalSymbology aS52ConditionalSymbology)
public ILcdS52ConditionalSymbology getS52ConditionalSymbology()
public int getDisplayCategory()
public void setDisplayCategory(int aDisplayCategory)
STANDARD
includes DISPLAYBASE
, and OTHER
includes
all categories.aDisplayCategory
- ILcdS52Style.DISPLAYBASE
,
ILcdS52Style.STANDARD
, or
ILcdS52Style.OTHER
.public int getPointSymbolType()
public void setPointSymbolType(int aPointSymbolType)
aPointSymbolType
- ILcdS52Symbology.PAPER_CHART_POINT_SYMBOLS
or
ILcdS52Symbology.SIMPLIFIED_POINT_SYMBOLS
.public int getAreaBoundarySymbolType()
public void setAreaBoundarySymbolType(int aAreaBoundarySymbolType)
aAreaBoundarySymbolType
- ILcdS52Symbology.PLAIN_AREA_BOUNDARY_SYMBOLS
, or
ILcdS52Symbology.SYMBOLIZED_AREA_BOUNDARY_SYMBOLS
.public int getColorType()
public void setColorType(int aColorType)
aColorType
- ILcdS52Symbology.DAY_BRIGHT_COLORS
,
ILcdS52Symbology.DAY_WHITE_BACK_COLORS
,
ILcdS52Symbology.DAY_BLACK_BACK_COLORS
,
ILcdS52Symbology.DUSK_COLORS
, or
ILcdS52Symbology.NIGHT_COLORS
.public double getSafetyDepth()
public void setSafetyDepth(double aSafetyDepth)
public double getSafetyContour()
public void setSafetyContour(double aSafetyContour)
public double getShallowContour()
public void setShallowContour(double aShallowContour)
public double getDeepContour()
public void setDeepContour(double aDeepContour)
public boolean isTwoShades()
public void setTwoShades(boolean aTwoShades)
public boolean isShallowPattern()
public void setShallowPattern(boolean aShallowPattern)
public boolean isShowIsolatedDangersInShallowWater()
public void setShowIsolatedDangersInShallowWater(boolean aShowIsolatedDangers)
public boolean isDisplaySoundings()
public void setDisplaySoundings(boolean aDisplaySoundings)
public boolean isDisplayFullLengthLightSectorLines()
public void setDisplayFullLengthLightSectorLines(boolean aDisplayFullLengthLightSectorLines)
public boolean isDisplayText()
public void setDisplayText(boolean aDisplayText)
setDisplayTextGroup
method gives a
more
fine-grained control of which of the text labels should be visible.public boolean isDisplayTextGroup(int aTextGroup)
public void setDisplayTextGroup(int aTextGroup, boolean aDisplayTextGroup)
setDisplayText
, and
the text group display flag should be enabled for a text group to be visible.aTextGroup
- aDisplayTextGroup
- public boolean isDisplayMetaData()
true
if S-57 meta data objects are displayed, false
otherwise.true
if S-57 meta data objects are displayed, false
otherwise.public void setDisplayMetaData(boolean aDisplayMetaData)
aDisplayMetaData
- boolean indicating whether meta data should be displayed or not.public boolean isUseAbbreviations()
public void setUseAbbreviations(boolean aUseAbbreviations)
public void setUsePaintCache(boolean aPaintCache)
aPaintCache
- A flag indicating whether to use caching when painting an object.isUsePaintCache()
public boolean isUsePaintCache()
true
if caching is used to paint this painter's object,
false
otherwise.setUsePaintCache(boolean)
public boolean isUseNationalLanguage()
true
if national language labels are used, false
otherwise.
The default is false
.public void setUseNationalLanguage(boolean aUseNationalLanguage)
false
, the international name
will be used (default).aUseNationalLanguage
- true
if national language labels should be used,
false
otherwise.public void setAntiAliased(boolean aAntiAliased)
aAntiAliased
- true to enable anti-aliasing.isAntiAliased()
public boolean isAntiAliased()
setAntiAliased(boolean)
public ILcdGXYPainter getGXYPainter(Object aObject)
ILcdGXYPainterProvider
ILcdGXYPainter
that can be used to paint or locate the object passed.
The painter provider is responsible for setting the object to the painter before returning the painter. An implementation should therefore have the following structure:
public ILcdGXYPainter getGXYPainter(Object aObject) {
ILcdGXYPainter painter = ... // find the painter for the object
if (painter != null) {
painter.setObject(aObject);
}
return painter;
}
getGXYPainter
in interface ILcdGXYPainterProvider
aObject
- the object to find a painter forpublic ILcdGXYLabelPainter getGXYLabelPainter(Object aObject)
ILcdGXYLabelPainterProvider
ILcdGXYLabelPainter
that can be used to label the object passed.
The label painter provider is responsible for setting the object to the label painter before returning the label painter. An implementation should therefore have the following structure:
public ILcdGXYLabelPainter getGXYLabelPainter(Object aObject) {
ILcdGXYLabelPainter labelPainter = ... // find the label painter for the object
if (labelPainter != null) {
labelPainter.setObject(aObject);
}
return labelPainter;
}
getGXYLabelPainter
in interface ILcdGXYLabelPainterProvider
aObject
- the object to find a label painter forpublic Object clone()
ILcdGXYPainterProvider
Object.clone
to make it public.clone
in interface ILcdCloneable
clone
in interface ILcdGXYLabelPainterProvider
clone
in interface ILcdGXYPainterProvider
clone
in class Object
Object.clone()