Package com.luciad.format.s52.gxy
Class TLcdS52GXYPainterProvider
java.lang.Object
com.luciad.format.s52.gxy.TLcdS52GXYPainterProvider
- All Implemented Interfaces:
ILcdCloneable,ILcdGXYLabelPainterProvider,ILcdGXYPainterProvider,Serializable,Cloneable
public class TLcdS52GXYPainterProvider
extends Object
implements ILcdGXYPainterProvider, ILcdGXYLabelPainterProvider
This
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:
- Display categories (default = standard),
- Symbol types for points and areas (default = simplified point symbols and plain area boundaries),
- Color preference (default = day bright color),
- Safety contour (default = 30m),
- Shallow contour (default = 2m),
- Deep contour (default = 30m),
- Two shades (default = true),
- Shallow pattern (default = false),
- Display of soundings (default = false),
- Display of text (default = false).
- Display meta data (default = false).
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newTLcdS52GXYPainterProvider, initialized with default S-52 display settings.TLcdS52GXYPainterProvider(TLcdS52DisplaySettings aDisplaySettings) Creates a newTLcdS52GXYPainterProvider, initialized with the given S-52 display settings. -
Method Summary
Modifier and TypeMethodDescriptionclone()RedefinesObject.cloneto make it public.intReturns the style type for painting areas.intReturns the color preference.doubleReturns the deep contour.intReturns the display category that will be painted.Returns the S-52 display settings object, defining how the S-57 data will be rendered.getGXYLabelPainter(Object aObject) Finds anILcdGXYLabelPainterthat can be used to label the object passed.getGXYPainter(Object aObject) Finds anILcdGXYPainterthat can be used to paint or locate the object passed.intReturns the style type for painting points.Returns the conditional symbology.Returns the symbology.Returns the attribute class description map.Returns the attribute class map.Returns the object class map.doubleReturns the safety contour.doubleReturns the safety depth.doubleReturns the shallow contour.booleanReturns if anti-aliasing is enabled.booleanReturns whether light sector lines should be displayed full length.booleanReturnstrueif S-57 meta data objects are displayed,falseotherwise.booleanReturns whether soundings should be displayed.booleanReturns whether text should be displayed.booleanisDisplayTextGroup(int aTextGroup) booleanReturns true if the option 'shallow pattern' is enabled.booleanReturns true if the option 'show isolated dangers in shallow water' is enabled.booleanReturns true if the option 'two shades' is enabled.booleanReturns whether abbreviations are used for the rendering of texts.booleanReturns whether to use the national language text labels instead of the default (international) labels.booleanReturns whether caching is used when painting this painter's object.voidsetAntiAliased(boolean aAntiAliased) Enable or disable anti-aliasing.voidsetAreaBoundarySymbolType(int aAreaBoundarySymbolType) Sets the style type for painting areas.voidsetColorType(int aColorType) Sets the color preference.voidsetDeepContour(double aDeepContour) Sets the deep contour.voidsetDisplayCategory(int aDisplayCategory) Sets the display category that will be painted.voidsetDisplayFullLengthLightSectorLines(boolean aDisplayFullLengthLightSectorLines) Sets whether light sector lines should be displayed full length.voidsetDisplayMetaData(boolean aDisplayMetaData) Sets whether S-57 meta data objects (object class 300 - 312) should be displayed or not.voidsetDisplaySoundings(boolean aDisplaySoundings) Sets whether soundings should be displayed.voidsetDisplayText(boolean aDisplayText) Sets whether text should be displayed.voidsetDisplayTextGroup(int aTextGroup, boolean aDisplayTextGroup) Sets whether the given text group should be displayed or not.voidsetPointSymbolType(int aPointSymbolType) Sets the style type for painting points.voidsetS52ConditionalSymbology(ILcdS52ConditionalSymbology aS52ConditionalSymbology) Sets the conditional symbology.voidsetS52Symbology(ILcdS52Symbology aS52Symbology) Sets the symbology that is required for painting.voidSets the attribute class description map that is required for painting.voidsetS57AttributeClassMap(ILcdS57AttributeClassMap aS57AttributeClassMap) Sets the attribute class map that is required for painting.voidsetS57ObjectClassMap(ILcdS57ObjectClassMap aS57ObjectClassMap) Sets the object class map that is required for painting.voidsetSafetyContour(double aSafetyContour) Sets the safety contour.voidsetSafetyDepth(double aSafetyDepth) Sets the safety depth.voidsetShallowContour(double aShallowContour) Sets the shallow contour.voidsetShallowPattern(boolean aShallowPattern) Enables/disables the option 'shallow pattern'.voidsetShowIsolatedDangersInShallowWater(boolean aShowIsolatedDangers) Enables/disables the option 'show isolated dangers in shallow water'.voidsetTwoShades(boolean aTwoShades) Enables/disables the option 'two shades'.voidsetUseAbbreviations(boolean aUseAbbreviations) Sets whether abbreviations should be used for the rendering of texts.voidsetUseNationalLanguage(boolean aUseNationalLanguage) Sets whether to use national language text labels.voidsetUsePaintCache(boolean aPaintCache) Turns caching of the representation of the object on or off.
-
Constructor Details
-
TLcdS52GXYPainterProvider
public TLcdS52GXYPainterProvider()Creates a newTLcdS52GXYPainterProvider, initialized with default S-52 display settings. -
TLcdS52GXYPainterProvider
Creates a newTLcdS52GXYPainterProvider, initialized with the given S-52 display settings.- Parameters:
aDisplaySettings- the S-52 display settings to be used for rendering S-57 data.
-
-
Method Details
-
getDisplaySettings
Returns the S-52 display settings object, defining how the S-57 data will be rendered.- Returns:
- the S-52 display settings object, defining how the S-57 data will be rendered.
-
setS57ObjectClassMap
Sets the object class map that is required for painting. It must be set before using the painter provider. -
getS57ObjectClassMap
Returns the object class map. -
setS57AttributeClassMap
Sets the attribute class map that is required for painting. It must be set before using the painter provider. -
getS57AttributeClassMap
Returns the attribute class map. -
setS57AttributeClassDescriptionMap
Sets the attribute class description map that is required for painting. It must be set before using the painter provider. -
getS57AttributeClassDescriptionMap
Returns the attribute class description map. -
setS52Symbology
Sets the symbology that is required for painting. It must be set before using the painter provider. -
getS52Symbology
Returns the symbology. -
setS52ConditionalSymbology
Sets the conditional symbology. A default implementation is set by default. -
getS52ConditionalSymbology
Returns the conditional symbology. -
getDisplayCategory
public int getDisplayCategory()Returns the display category that will be painted. -
setDisplayCategory
public void setDisplayCategory(int aDisplayCategory) Sets the display category that will be painted. Any lower categories will be painted as well, soSTANDARDincludesDISPLAYBASE, andOTHERincludes all categories.- Parameters:
aDisplayCategory-ILcdS52Style.DISPLAYBASE,ILcdS52Style.STANDARD, orILcdS52Style.OTHER.
-
getPointSymbolType
public int getPointSymbolType()Returns the style type for painting points. -
setPointSymbolType
public void setPointSymbolType(int aPointSymbolType) Sets the style type for painting points.- Parameters:
aPointSymbolType-ILcdS52Symbology.PAPER_CHART_POINT_SYMBOLSorILcdS52Symbology.SIMPLIFIED_POINT_SYMBOLS.
-
getAreaBoundarySymbolType
public int getAreaBoundarySymbolType()Returns the style type for painting areas. -
setAreaBoundarySymbolType
public void setAreaBoundarySymbolType(int aAreaBoundarySymbolType) Sets the style type for painting areas.- Parameters:
aAreaBoundarySymbolType-ILcdS52Symbology.PLAIN_AREA_BOUNDARY_SYMBOLS, orILcdS52Symbology.SYMBOLIZED_AREA_BOUNDARY_SYMBOLS.
-
getColorType
public int getColorType()Returns the color preference. -
setColorType
public void setColorType(int aColorType) Sets the color preference.- Parameters:
aColorType-ILcdS52Symbology.DAY_BRIGHT_COLORS,ILcdS52Symbology.DAY_WHITE_BACK_COLORS,ILcdS52Symbology.DAY_BLACK_BACK_COLORS,ILcdS52Symbology.DUSK_COLORS, orILcdS52Symbology.NIGHT_COLORS.
-
getSafetyDepth
public double getSafetyDepth()Returns the safety depth. -
setSafetyDepth
public void setSafetyDepth(double aSafetyDepth) Sets the safety depth. -
getSafetyContour
public double getSafetyContour()Returns the safety contour. -
setSafetyContour
public void setSafetyContour(double aSafetyContour) Sets the safety contour. -
getShallowContour
public double getShallowContour()Returns the shallow contour. -
setShallowContour
public void setShallowContour(double aShallowContour) Sets the shallow contour. -
getDeepContour
public double getDeepContour()Returns the deep contour. -
setDeepContour
public void setDeepContour(double aDeepContour) Sets the deep contour. -
isTwoShades
public boolean isTwoShades()Returns true if the option 'two shades' is enabled. -
setTwoShades
public void setTwoShades(boolean aTwoShades) Enables/disables the option 'two shades'. -
isShallowPattern
public boolean isShallowPattern()Returns true if the option 'shallow pattern' is enabled. -
setShallowPattern
public void setShallowPattern(boolean aShallowPattern) Enables/disables the option 'shallow pattern'. -
isShowIsolatedDangersInShallowWater
public boolean isShowIsolatedDangersInShallowWater()Returns true if the option 'show isolated dangers in shallow water' is enabled. -
setShowIsolatedDangersInShallowWater
public void setShowIsolatedDangersInShallowWater(boolean aShowIsolatedDangers) Enables/disables the option 'show isolated dangers in shallow water'. -
isDisplaySoundings
public boolean isDisplaySoundings()Returns whether soundings should be displayed. -
setDisplaySoundings
public void setDisplaySoundings(boolean aDisplaySoundings) Sets whether soundings should be displayed. -
isDisplayFullLengthLightSectorLines
public boolean isDisplayFullLengthLightSectorLines()Returns whether light sector lines should be displayed full length. -
setDisplayFullLengthLightSectorLines
public void setDisplayFullLengthLightSectorLines(boolean aDisplayFullLengthLightSectorLines) Sets whether light sector lines should be displayed full length. If not, light sector lines will be drawn with the default length (25 mm on screen). -
isDisplayText
public boolean isDisplayText()Returns whether text should be displayed. -
setDisplayText
public void setDisplayText(boolean aDisplayText) Sets whether text should be displayed. ThesetDisplayTextGroupmethod gives a more fine-grained control of which of the text labels should be visible. -
isDisplayTextGroup
public boolean isDisplayTextGroup(int aTextGroup) -
setDisplayTextGroup
public void setDisplayTextGroup(int aTextGroup, boolean aDisplayTextGroup) Sets whether the given text group should be displayed or not. By default, all text groups are enabled. Note that both the general text display flag, set bysetDisplayText, and the text group display flag should be enabled for a text group to be visible.- Parameters:
aTextGroup-aDisplayTextGroup-
-
isDisplayMetaData
public boolean isDisplayMetaData()Returnstrueif S-57 meta data objects are displayed,falseotherwise.- Returns:
trueif S-57 meta data objects are displayed,falseotherwise.
-
setDisplayMetaData
public void setDisplayMetaData(boolean aDisplayMetaData) Sets whether S-57 meta data objects (object class 300 - 312) should be displayed or not. By default, meta data are not displayed. S-52 does not provide visualization for all meta data objects that exist.- Parameters:
aDisplayMetaData- boolean indicating whether meta data should be displayed or not.
-
isUseAbbreviations
public boolean isUseAbbreviations()Returns whether abbreviations are used for the rendering of texts. -
setUseAbbreviations
public void setUseAbbreviations(boolean aUseAbbreviations) Sets whether abbreviations should be used for the rendering of texts. This flag has currently only impact on NATSUR values. -
setUsePaintCache
public void setUsePaintCache(boolean aPaintCache) Turns caching of the representation of the object on or off. Caching reduces the time to paint an object but requires more memory. By default, caching is turned on.- Parameters:
aPaintCache- A flag indicating whether to use caching when painting an object.- See Also:
-
isUsePaintCache
public boolean isUsePaintCache()Returns whether caching is used when painting this painter's object.- Returns:
trueif caching is used to paint this painter's object,falseotherwise.- See Also:
-
isUseNationalLanguage
public boolean isUseNationalLanguage()Returns whether to use the national language text labels instead of the default (international) labels. If no text is available in the national language, the international name will automatically be used as a fallback.- Returns:
trueif national language labels are used,falseotherwise. The default isfalse.
-
setUseNationalLanguage
public void setUseNationalLanguage(boolean aUseNationalLanguage) Sets whether to use national language text labels. Iffalse, the international name will be used (default).- Parameters:
aUseNationalLanguage-trueif national language labels should be used,falseotherwise.
-
setAntiAliased
public void setAntiAliased(boolean aAntiAliased) Enable or disable anti-aliasing. By default, anti-aliasing is enabled.- Parameters:
aAntiAliased- true to enable anti-aliasing.- Since:
- 2017.0
- See Also:
-
isAntiAliased
public boolean isAntiAliased()Returns if anti-aliasing is enabled.- Returns:
- if anti-aliasing is enabled.
- Since:
- 2017.0
- See Also:
-
getGXYPainter
Description copied from interface:ILcdGXYPainterProviderFinds anILcdGXYPainterthat 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; }- Specified by:
getGXYPainterin interfaceILcdGXYPainterProvider- Parameters:
aObject- the object to find a painter for- Returns:
- a painter that can be used to paint or locate the object; or null if no painter could be found for the given object, or the object could not be set on the retrieved painter.
-
getGXYLabelPainter
Description copied from interface:ILcdGXYLabelPainterProviderFinds anILcdGXYLabelPainterthat 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; }- Specified by:
getGXYLabelPainterin interfaceILcdGXYLabelPainterProvider- Parameters:
aObject- the object to find a label painter for- Returns:
- a label painter that can be used to label the object; or null if no label painter could be found for the given object, or the object could not be set on the retrieved label painter.
-
clone
Description copied from interface:ILcdGXYPainterProviderRedefinesObject.cloneto make it public.- Specified by:
clonein interfaceILcdCloneable- Specified by:
clonein interfaceILcdGXYLabelPainterProvider- Specified by:
clonein interfaceILcdGXYPainterProvider- Overrides:
clonein classObject- Returns:
- a clone of this painter provider.
- See Also:
-