Class TLcdS101DisplaySettings

java.lang.Object
com.luciad.format.s101.view.TLcdS101DisplaySettings
All Implemented Interfaces:
ILcdDataObject, ILcdDepthDisplaySettings, ILcdCloneable, ILcdPropertyChangeSource, Cloneable

public class TLcdS101DisplaySettings extends Object implements ILcdDepthDisplaySettings, ILcdDataObject, ILcdCloneable, ILcdPropertyChangeSource
S-101 configuration object, containing all display settings available in the S-101 rendering library.

Pass the same TLcdS101DisplaySettings object to all S-101 components (painter providers, model list builders, symbologies, ...) that work on the same model, or need to behave identical w.r.t. S-101 rendering.

A class can be registered as a PropertyChangeListener to this class. The listener will be notified each time one of the rendering settings has been changed.

Since:
2026.0
  • Field Details

  • Constructor Details

    • TLcdS101DisplaySettings

      public TLcdS101DisplaySettings(TLcdS101DisplaySettings aDisplaySettings)
      Creates a new display settings instance, initialized with the settings of the given display settings.
      Parameters:
      aDisplaySettings - the display settings to copy the properties from
    • TLcdS101DisplaySettings

      public TLcdS101DisplaySettings()
      Creates a new TLcdS101DisplaySettings instance with default display settings.
  • Method Details

    • setAll

      public void setAll(TLcdS101DisplaySettings aDisplaySettings)
      Configures this display settings with the configuration of the specified display settings.
      Parameters:
      aDisplaySettings - the display settings from which to copy the configuration.
    • getColorPalette

      public ELcdS101ColorPalette getColorPalette()
      Returns the S-101 color palette to be used.
      Returns:
      the S-101 color palette to be used.
      See Also:
    • setColorPalette

      public void setColorPalette(ELcdS101ColorPalette aColorPalette)
      Sets the S-101 color palette to be used.
      Parameters:
      aColorPalette - the color palette to be used.
      See Also:
    • isSimplifiedSymbols

      public boolean isSimplifiedSymbols()
      Returns whether the rendering of point objects is simplified or paper chart.
      Returns:
      true for simplified, false for paper chart symbols.
      See Also:
    • setSimplifiedSymbols

      public void setSimplifiedSymbols(boolean aSimplifiedSymbols)
      Sets whether the rendering of point objects is simplified or paper chart.
      Parameters:
      aSimplifiedSymbols - true for simplified, false for paper chart symbols.
      See Also:
    • isPlainBoundaries

      public boolean isPlainBoundaries()
      Returns whether the rendering of boundaries of area objects is plain or symbolized.
      Returns:
      true for plain, false for symbolized boundaries
      See Also:
    • setPlainBoundaries

      public void setPlainBoundaries(boolean aPlainBoundaries)
      Sets whether the rendering of boundaries of area objects is plain or symbolized.
      Parameters:
      aPlainBoundaries - true for plain, false for symbolized boundaries.
      See Also:
    • isFullLightLines

      public boolean isFullLightLines()
      Returns whether sector lines of lights should be displayed at full length or at a fixed pixel size.
      Returns:
      true for full length, false for fixed-size light sector lines.
      See Also:
    • setFullLightLines

      public void setFullLightLines(boolean aFullLightLines)
      Sets whether sector lines of lights should be displayed at full length. If false, only short sector lines with a fixed length in screen coordinates will be drawn.
      Parameters:
      aFullLightLines - true for full length, false for fixed-size light sector lines.
      See Also:
    • getDisplayMode

      public ELcdS101DisplayMode getDisplayMode()
      Returns the S-101 display mode to be rendered.
      Returns:
      the S-101 display mode to be rendered.
      See Also:
    • setDisplayMode

      public void setDisplayMode(ELcdS101DisplayMode aDisplayMode)
      Sets the S-101 display mode to be rendered. Each S-101 object falls into one of three display mode, defined by the S-101 symbology. These categories can be used as a coarse filter to control the amount of data that is rendered on a map.

      If the specified display mode is different from the current one, the viewing group layers are reset to the ones that correspond to the new display mode.

      See the S-101 specification for more information on display mode.

      Parameters:
      aDisplayMode - the S-101 display mode to be rendered.
      See Also:
    • getViewingGroupLayers

      public Set<ELcdS101ViewingGroupLayer> getViewingGroupLayers()
      Returns the set of visible viewing group layers.

      Warning: you should not modify the returned set directly. Instead, call the corresponding setter with a new, modified instance.

      Returns:
      The currently configured value of the viewing group layers property
      See Also:
    • setViewingGroupLayers

      public void setViewingGroupLayers(Set<ELcdS101ViewingGroupLayer> aViewingGroupLayers)
      Set the viewing group layers property.
      Parameters:
      aViewingGroupLayers - the new viewing group layers value.
      See Also:
    • addViewingGroupLayer

      public void addViewingGroupLayer(ELcdS101ViewingGroupLayer aViewingGroupLayer)
      Adds the specified viewing group layer to the list of visible layers.
      Parameters:
      aViewingGroupLayer - the viewing group layer
    • removeViewingGroupLayer

      public void removeViewingGroupLayer(ELcdS101ViewingGroupLayer aViewingGroupLayer)
      Removes the specified viewing group layer from the list of visible layers.
      Parameters:
      aViewingGroupLayer - the viewing group layer
    • resetViewingGroupLayers

      public void resetViewingGroupLayers()
      Resets the viewing group layers to the ones that correspond to the display mode.
      See Also:
    • isRadarOverlay

      public boolean isRadarOverlay()
      Returns whether the radar sweep should be displayed.
      Returns:
      The currently configured value of the radar overlay property
      See Also:
    • setRadarOverlay

      public void setRadarOverlay(boolean aRadarOverlay)
      Set the radar overlay property.
      Parameters:
      aRadarOverlay - the new radar overlay value.
      See Also:
    • getDisplayPlanes

      public ELcdS101DisplayPlane[] getDisplayPlanes()
      Returns the set of visible display planes.

      Warning: you should not modify the returned array directly. Instead, call the corresponding setter with a new, modified instance.

      Returns:
      The currently configured value of the display planes property
      See Also:
    • setDisplayPlanes

      public void setDisplayPlanes(ELcdS101DisplayPlane[] aDisplayPlanes)
      Set the display plane property.
      Parameters:
      aDisplayPlanes - the new display planes value.
      See Also:
    • isIgnoreScaleMinimum

      public boolean isIgnoreScaleMinimum()
      Returns whether the scale minimum should be ignored.
      Returns:
      whether scale minimum should be ignored or not.
      See Also:
    • setIgnoreScaleMinimum

      public void setIgnoreScaleMinimum(boolean aIgnoreScaleMinimum)
      Sets whether to ignore the minimum scale for objects to be visible. If set to true, all objects are visible at all zoom levels.
      Parameters:
      aIgnoreScaleMinimum - the new ignore scale minimum value.
      See Also:
    • getLanguage

      public String getLanguage()
      Returns the language used for text rendering.
      Returns:
      the language used for text rendering.
      See Also:
    • setLanguage

      public void setLanguage(String aLanguage)
      Sets the language used for text rendering, specified as ISO 639-2/T 3-letter language code.

      Examples are "eng" for English, "spa" for Spanish, "fra" for French, etc.

      Parameters:
      aLanguage - the ISO 639-2/T 3-letter language code
      See Also:
    • getSafetyDepth

      public double getSafetyDepth()
      Description copied from interface: ILcdDepthDisplaySettings
      Returns the ship's safety depth.
      Specified by:
      getSafetyDepth in interface ILcdDepthDisplaySettings
      Returns:
      the ship's safety depth.
      See Also:
    • setSafetyDepth

      public void setSafetyDepth(double aSafetyDepth)
      Description copied from interface: ILcdDepthDisplaySettings
      Sets the ship's safety depth. The safety depth affects the way depth soundings are rendered: depth soundings with a value less than the safety depth will be rendered in a dark color, while depth sounding with a value more than the safety depth will be rendered in a light color.

      The safety contour depth and safety depth are independent settings; the former affects the safety contour line and the depth area fill colors, the latter affects the depth soundings colors.

      Specified by:
      setSafetyDepth in interface ILcdDepthDisplaySettings
      Parameters:
      aSafetyDepth - the ship's safety depth.
      See Also:
    • getShallowContour

      public double getShallowContour()
      Description copied from interface: ILcdDepthDisplaySettings
      Returns the depth of the shallow contour.

      The shallow contour is only relevant if the two shades setting is turned off.

      Specified by:
      getShallowContour in interface ILcdDepthDisplaySettings
      Returns:
      the shallow contour depth.
      See Also:
    • setShallowContour

      public void setShallowContour(double aShallowContour)
      Description copied from interface: ILcdDepthDisplaySettings
      Sets the depth of the shallow contour. Areas with a depth less than the shallow contour depth will be rendered in a darker color than areas with a depth more than the shallow contour depth.

      The shallow contour is only relevant if the two shades setting is turned off.

      Specified by:
      setShallowContour in interface ILcdDepthDisplaySettings
      Parameters:
      aShallowContour - the shallow contour depth.
      See Also:
    • getSafetyContour

      public double getSafetyContour()
      Description copied from interface: ILcdDepthDisplaySettings
      Returns the depth of the safety contour.
      Specified by:
      getSafetyContour in interface ILcdDepthDisplaySettings
      Returns:
      the depth of the safety contour.
      See Also:
    • setSafetyContour

      public void setSafetyContour(double aSafetyContour)
      Description copied from interface: ILcdDepthDisplaySettings
      Sets the ship's safety contour depth. The safety contour is a bold line indicating the boundaries of the area in which the ship can safely navigate. All areas with a depth less than the safety contour depth (on one side of the safety contour) will be rendered with a darker color than the areas with a depth more than the safety contour depth (on the other side of the safety contour).

      The safety contour depth and safety depth are independent settings; the former affects the safety contour line and the depth area fill colors, the latter affects the depth soundings colors.

      Specified by:
      setSafetyContour in interface ILcdDepthDisplaySettings
      Parameters:
      aSafetyContour - the ship's safety contour depth.
      See Also:
    • getDeepContour

      public double getDeepContour()
      Description copied from interface: ILcdDepthDisplaySettings
      Returns the depth of the deep contour.
      Specified by:
      getDeepContour in interface ILcdDepthDisplaySettings
      Returns:
      the deep contour depth.
      See Also:
    • setDeepContour

      public void setDeepContour(double aDeepContour)
      Description copied from interface: ILcdDepthDisplaySettings
      Sets the depth of the deep contour. Areas with a depth less than the deep contour depth will be rendered in a darker color than areas with a depth more than the deep contour depth.

      The deep contour is only relevant if the two shades setting is turned off.

      Specified by:
      setDeepContour in interface ILcdDepthDisplaySettings
      Parameters:
      aDeepContour - the deep contour depth.
      See Also:
    • isUseTwoShades

      public boolean isUseTwoShades()
      Description copied from interface: ILcdDepthDisplaySettings
      Returns whether to use a 2- or 4-color schema for depth area rendering.
      Specified by:
      isUseTwoShades in interface ILcdDepthDisplaySettings
      Returns:
      whether to use a 2- or 4-color schema for depth area rendering.
      See Also:
    • setUseTwoShades

      public void setUseTwoShades(boolean aUseTwoShades)
      Description copied from interface: ILcdDepthDisplaySettings
      Sets whether to use a 2- or 4-color schema for depth area rendering. If true, only 2 colors will be used (darker for depths less than the safety contour, lighter for depths more than the safety contour), if false, 4 colors will be used (the shallow and deep contour depth will also be taken into account).
      Specified by:
      setUseTwoShades in interface ILcdDepthDisplaySettings
      Parameters:
      aUseTwoShades - boolean indicating whether to use a 2- or 4-color schema for depth area rendering.
      See Also:
    • isShallowWaterDangers

      public boolean isShallowWaterDangers()
      Returns whether to display isolated dangers in shallow water.
      Returns:
      whether to display isolated dangers in shallow water.
      See Also:
    • setShallowWaterDangers

      public void setShallowWaterDangers(boolean aShallowWaterDangers)
      Sets whether to display isolated dangers in shallow water.
      Parameters:
      aShallowWaterDangers - boolean indicating whether to display isolated dangers in shallow water.
      See Also:
    • isDisplayOverscaleIndication

      public boolean isDisplayOverscaleIndication()
      Returns whether to display an overscale indication for cells which are being viewed on a scale larger than the intended scale range.
      Returns:
      whether to display an overscale indication.
      See Also:
    • setDisplayOverscaleIndication

      public void setDisplayOverscaleIndication(boolean aDisplayOverscaleIndication)
      Sets whether to display an overscale indication for cells which are being viewed on a scale larger than the intended scale range.

      The overscale indication is a vertical bar pattern that is drawn on top of the cell, as defined by the S-52 specification.

      This setting is only applicable to cells in catalogues, not for cells which are loaded individually.

      Parameters:
      aDisplayOverscaleIndication - boolean indicating whether to display an overscale indication.
      See Also:
    • isDisplayUnderscaleIndication

      public boolean isDisplayUnderscaleIndication()
      Returns whether to display an underscale indication for cells which are not visible yet (the map scale is smaller than the intended scale range of the cell).
      Returns:
      whether to display an underscale indication.
      See Also:
    • setDisplayUnderscaleIndication

      public void setDisplayUnderscaleIndication(boolean aDisplayUnderscaleIndication)
      Sets whether to display an underscale indication for cells which are not visible yet (the map scale is smaller than the intended scale range of the cell).

      The underscale indication is a rectangle showing the bounds of the cell. It is not part of the S-52 specification.

      This setting is only applicable to cells in catalogues, not for cells which are loaded individually.

      Parameters:
      aDisplayUnderscaleIndication - boolean indicating whether to display an underscale indication.
      See Also:
    • getUnderscaleIndicationColor

      public Color getUnderscaleIndicationColor()
      Returns the color in which to render the underscale indication.
      Returns:
      the color in which to render the underscale indication.
      See Also:
    • setUnderscaleIndicationColor

      public void setUnderscaleIndicationColor(Color aUnderscaleIndicationColor)
      Sets the color in which to render the underscale indication.
      Parameters:
      aUnderscaleIndicationColor - the color in which to render the underscale indication.
      See Also:
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
      Description copied from interface: ILcdPropertyChangeSource

      Registers the given PropertyChangeListener to be notified when this object's properties change.

      In case you need to register a listener which keeps a reference to an object with a shorter life-time than this change source, you can use a ALcdWeakPropertyChangeListener instance as property change listener.

      Specified by:
      addPropertyChangeListener in interface ILcdPropertyChangeSource
      Parameters:
      aPropertyChangeListener - The listener to be notified
      See Also:
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
      Description copied from interface: ILcdPropertyChangeSource

      De-registers the given PropertyChangeListener from receiving property change events for this object.

      If the listener was added more than once, it will be notified one less time after being removed. If the listener is null, or was never added, no exception is thrown and no action is taken.

      Specified by:
      removePropertyChangeListener in interface ILcdPropertyChangeSource
      Parameters:
      aPropertyChangeListener - the listener that should no longer be notified of changes of this object's properties
      See Also:
    • getDataType

      public TLcdDataType getDataType()
      Description copied from interface: ILcdDataObject
      Returns the type of this data object. This can never be null.
      Specified by:
      getDataType in interface ILcdDataObject
      Returns:
      the type of this data object
    • getValue

      public Object getValue(TLcdDataProperty aProperty)
      Description copied from interface: ILcdDataObject

      Returns the value of the given property.

      If the property is a collection, the returned value will never be null. If the property has not been set, an empty collection of the appropriate type will be returned (Set, List or Map).

      The property must not be null, and must be declared in the data object's type or in one of its super types. Otherwise an IllegalArgumentException is thrown.

      Specified by:
      getValue in interface ILcdDataObject
      Parameters:
      aProperty - the property for which the value is to be returned
      Returns:
      the value of the given property for this data object
    • getValue

      public Object getValue(String aPropertyName)
      Description copied from interface: ILcdDataObject

      Convenience method that returns the value of the property with the given name.

      If more than one property exists with the given name, the most specific property should be used (this is the property defined by the most specialized type in this object's data type hierarchy).

      See ILcdDataObject.getValue(TLcdDataProperty) for more information.

      Specified by:
      getValue in interface ILcdDataObject
      Parameters:
      aPropertyName - the name of the property of which the value is to be returned
      Returns:
      the value of the property with the given name
      See Also:
    • setValue

      public void setValue(TLcdDataProperty aProperty, Object aValue)
      Description copied from interface: ILcdDataObject

      Sets the value of the given property for this data object. The implementation is allowed to throw an exception if the given value can't be set.

      The given property must be declared in the data object's type or in one of its super types. In other words, getDataType().getProperties().contains( aProperty ) should always be true. Otherwise, the implementation should throw an IllegalArgumentException.

      Specified by:
      setValue in interface ILcdDataObject
      Parameters:
      aProperty - the property for which the value is to be set
      aValue - the value to set
      See Also:
    • setValue

      public void setValue(String aPropertyName, Object aValue)
      Description copied from interface: ILcdDataObject

      Convenience method that sets the value of the property with the given name.

      If more than one property exists with the given name, the most specific property should be used (this is the property defined by the most specialized type in this object's data type hierarchy).

      See ILcdDataObject.setValue(TLcdDataProperty, Object) for more information.

      Specified by:
      setValue in interface ILcdDataObject
      Parameters:
      aPropertyName - the name of the property of which the value is to be set
      aValue - the value to set
    • hasValue

      public boolean hasValue(TLcdDataProperty aProperty)
      Description copied from interface: ILcdDataObject
      Indicates whether this data object has a value for the given property.

      • aProperty is from the right data type, and this instance has a value for it: returns true
      • aProperty is from the right data type, and this instance has no value for it: returns false
      • aProperty is not from the right data type: not allowed, you will get IllegalArgumentException
      • aProperty is null: not allowed, you will get NullPointerException

      A multivalued property is considered to have a value if it has at least one value.

      Specified by:
      hasValue in interface ILcdDataObject
      Parameters:
      aProperty - the property for which to return whether a value is present or not.
      Returns:
      true if this data object has a value for the given property, false otherwise.
    • hasValue

      public boolean hasValue(String aPropertyName)
      Description copied from interface: ILcdDataObject
      Indicates whether this data object has a value for the given property.
      See ILcdDataObject.hasValue(TLcdDataProperty) for more information.
      Specified by:
      hasValue in interface ILcdDataObject
      Parameters:
      aPropertyName - the name of the property for which to return whether a value is present or not.
      Returns:
      true if this data object has a value for the property with the given name, false otherwise.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public TLcdS101DisplaySettings clone()
      Description copied from interface: ILcdCloneable

      Makes Object.clone() public.

      When for example extending from java.lang.Object, it can be implemented like this:
      
       public Object clone() {
         try {
           return super.clone();
         } catch ( CloneNotSupportedException e ) {
           // Cannot happen: extends from Object and implements Cloneable (see also Object.clone)
           throw new RuntimeException( e );
         }
       }
       
      Specified by:
      clone in interface ILcdCloneable
      Overrides:
      clone in class Object
      See Also: