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).
These settings are used by the S-52 symbology and by the conditional symbology procedures 'DEPARE01', 'DEPCNT02', 'SEABED01', and 'SNDFRM02'.
See Also:
  • Constructor Details

    • TLcdS52GXYPainterProvider

      public TLcdS52GXYPainterProvider()
      Creates a new TLcdS52GXYPainterProvider, initialized with default S-52 display settings.
    • TLcdS52GXYPainterProvider

      public TLcdS52GXYPainterProvider(TLcdS52DisplaySettings aDisplaySettings)
      Creates a new TLcdS52GXYPainterProvider, 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

      public TLcdS52DisplaySettings 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

      public void setS57ObjectClassMap(ILcdS57ObjectClassMap aS57ObjectClassMap)
      Sets the object class map that is required for painting. It must be set before using the painter provider.
    • getS57ObjectClassMap

      public ILcdS57ObjectClassMap getS57ObjectClassMap()
      Returns the object class map.
    • setS57AttributeClassMap

      public void setS57AttributeClassMap(ILcdS57AttributeClassMap aS57AttributeClassMap)
      Sets the attribute class map that is required for painting. It must be set before using the painter provider.
    • getS57AttributeClassMap

      public ILcdS57AttributeClassMap getS57AttributeClassMap()
      Returns the attribute class map.
    • setS57AttributeClassDescriptionMap

      public void setS57AttributeClassDescriptionMap(ILcdS57AttributeClassDescriptionMap aMap)
      Sets the attribute class description map that is required for painting. It must be set before using the painter provider.
    • getS57AttributeClassDescriptionMap

      public ILcdS57AttributeClassDescriptionMap getS57AttributeClassDescriptionMap()
      Returns the attribute class description map.
    • setS52Symbology

      public void setS52Symbology(ILcdS52Symbology aS52Symbology)
      Sets the symbology that is required for painting. It must be set before using the painter provider.
    • getS52Symbology

      public ILcdS52Symbology getS52Symbology()
      Returns the symbology.
    • setS52ConditionalSymbology

      public void setS52ConditionalSymbology(ILcdS52ConditionalSymbology aS52ConditionalSymbology)
      Sets the conditional symbology. A default implementation is set by default.
    • getS52ConditionalSymbology

      public ILcdS52ConditionalSymbology 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, so STANDARD includes DISPLAYBASE, and OTHER includes all categories.
      Parameters:
      aDisplayCategory - ILcdS52Style.DISPLAYBASE, ILcdS52Style.STANDARD, or ILcdS52Style.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_SYMBOLS or ILcdS52Symbology.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, or ILcdS52Symbology.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, or ILcdS52Symbology.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. The setDisplayTextGroup method 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 by setDisplayText, and the text group display flag should be enabled for a text group to be visible.
      Parameters:
      aTextGroup -
      aDisplayTextGroup -
    • isDisplayMetaData

      public boolean isDisplayMetaData()
      Returns true if S-57 meta data objects are displayed, false otherwise.
      Returns:
      true if S-57 meta data objects are displayed, false otherwise.
    • 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:
      true if caching is used to paint this painter's object, false otherwise.
      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:
      true if national language labels are used, false otherwise. The default is false.
    • setUseNationalLanguage

      public void setUseNationalLanguage(boolean aUseNationalLanguage)
      Sets whether to use national language text labels. If false, the international name will be used (default).
      Parameters:
      aUseNationalLanguage - true if national language labels should be used, false otherwise.
    • 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

      public ILcdGXYPainter getGXYPainter(Object aObject)
      Description copied from interface: ILcdGXYPainterProvider
      Finds an 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;
       }
       

      Specified by:
      getGXYPainter in interface ILcdGXYPainterProvider
      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

      public ILcdGXYLabelPainter getGXYLabelPainter(Object aObject)
      Description copied from interface: ILcdGXYLabelPainterProvider
      Finds an 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;
       }
       

      Specified by:
      getGXYLabelPainter in interface ILcdGXYLabelPainterProvider
      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

      public Object clone()
      Description copied from interface: ILcdGXYPainterProvider
      Redefines Object.clone to make it public.
      Specified by:
      clone in interface ILcdCloneable
      Specified by:
      clone in interface ILcdGXYLabelPainterProvider
      Specified by:
      clone in interface ILcdGXYPainterProvider
      Overrides:
      clone in class Object
      Returns:
      a clone of this painter provider.
      See Also: