Class TLcdS52DisplaySettings

java.lang.Object
com.luciad.format.s52.TLcdS52DisplaySettings
All Implemented Interfaces:
ILcdDataObject, ILcdCloneable, ILcdPropertyChangeSource, Cloneable

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

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

This class centralizes and replaces all setters which were previously available on the individual S-52 components. It is advised to only configure S-52 settings through this central settings object.

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:
11.0
  • Field Details

  • Constructor Details

    • TLcdS52DisplaySettings

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

      public TLcdS52DisplaySettings()
      Creates a new TLcdS52DisplaySettings instance with default display settings for ENC.
    • TLcdS52DisplaySettings

      public TLcdS52DisplaySettings(ELcdS57ProductType aProductType)
      Creates a new TLcdS52DisplaySettings instance with default display settings for the given product.
      Parameters:
      aProductType - The product type (ENC, IENC or AML) to initialize the display settings for
      Since:
      2023.0
  • Method Details

    • getProductType

      public ELcdS57ProductType getProductType()
      Returns the product type for which these display settings are meant to be applied.
      Returns:
      the relevant product type
      Since:
      2023.0
    • setAll

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

      public int getColorType()
      Returns the S-52 color scheme to be used.
      Returns:
      the S-52 color scheme to be used.
      See Also:
    • setColorType

      public void setColorType(int aColorType)
      Sets the S-52 color scheme to be used. This can be one of ILcdS52Symbology.DAY_BRIGHT_COLORS, ILcdS52Symbology.DUSK_COLORS or ILcdS52Symbology.NIGHT_COLORS.
      Parameters:
      aColorType - the color scheme to be used.
      See Also:
    • getPointSymbolType

      public int getPointSymbolType()
      Returns the symbol type to be used for the rendering of point objects.
      Returns:
      the symbol type to be used for the rendering of point objects.
      See Also:
    • setPointSymbolType

      public void setPointSymbolType(int aPointSymbolType)
      Sets the symbol type to be used for the rendering of point objects. This can be ILcdS52Symbology.SIMPLIFIED_POINT_SYMBOLS or ILcdS52Symbology.PAPER_CHART_POINT_SYMBOLS.
      Parameters:
      aPointSymbolType - the symbol type to be used for the rendering of point objects.
      See Also:
    • getAreaBoundarySymbolType

      public int getAreaBoundarySymbolType()
      Returns the symbol type to be used for the rendering of boundaries of area objects.
      Returns:
      the symbol type to be used for the rendering of boundaries of area objects.
      See Also:
    • setAreaBoundarySymbolType

      public void setAreaBoundarySymbolType(int aAreaBoundarySymbolType)
      Sets the symbol type to be used for the rendering of boundaries of area objects. This can be ILcdS52Symbology.PLAIN_AREA_BOUNDARY_SYMBOLS or ILcdS52Symbology.SYMBOLIZED_AREA_BOUNDARY_SYMBOLS.
      Parameters:
      aAreaBoundarySymbolType - the symbol type to be used for the rendering of boundaries of area objects.
      See Also:
    • isDisplayFullLengthLightSectorLines

      public boolean isDisplayFullLengthLightSectorLines()
      Returns whether sector lines of lights should be displayed at full length.
      Returns:
      whether sector lines of lights should be displayed at full length.
      See Also:
    • setDisplayFullLengthLightSectorLines

      public void setDisplayFullLengthLightSectorLines(boolean aDisplayFullLengthLightSectorLines)
      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:
      aDisplayFullLengthLightSectorLines - boolean indicating whether to display full length light sector lines or not.
      See Also:
    • getDisplayCategory

      public int getDisplayCategory()
      Returns the S-52 display category to be rendered.
      Returns:
      the S-52 display category to be rendered.
      See Also:
    • setDisplayCategory

      public void setDisplayCategory(int aDisplayCategory)
      Sets the S-52 display category to be rendered. Each S-57 object falls into one three display categories, defined by the S-52 symbology. These categories can be used as a coarse filter to control the amount of data that is rendered on a map. The available display categories are ILcdS52Style.STANDARD, ILcdS52Style.DISPLAYBASE and ILcdS52Style.OTHER.

      See the S-52 specification for more information on display categories.

      Parameters:
      aDisplayCategory - the S-52 display category to be rendered.
      See Also:
    • isDisplaySoundings

      public boolean isDisplaySoundings()
      Returns whether depth soundings should be displayed or not.
      Returns:
      whether depth soundings should be displayed or not.
      See Also:
    • setDisplaySoundings

      public void setDisplaySoundings(boolean aDisplaySoundings)
      Sets whether depth soundings should be displayed or not. Depth soundings are measurements of the sea depth at a given location. They are rendered as small numbers on top of depth areas.
      Parameters:
      aDisplaySoundings - boolean indicating whether to display depth soundings or not. #see #isDisplaySoundings
    • isDisplayMetaData

      public boolean isDisplayMetaData()
      Returns whether metadata should be displayed or not.
      Returns:
      whether metadata should be displayed or not.
      See Also:
    • setDisplayMetaData

      public void setDisplayMetaData(boolean aDisplayMetaData)
      Sets whether metadata should be displayed or not. Metadata provide additional meta information about an S-57 object, such as data quality information.

      Turning on metadata rendering may clutter the map significantly, and it is therefore disabled by default.

      Parameters:
      aDisplayMetaData - boolean indicating whether metadata should be displayed or not
      See Also:
    • isDisplayText

      public boolean isDisplayText()
      Returns whether textual information of objects should be displayed or not.
      Returns:
      whether textual information of objects should be displayed or not.
      See Also:
    • setDisplayText

      public void setDisplayText(boolean aDisplayText)
      Sets whether textual information of objects should be displayed or not.

      Textual information is rendered on the map as a label, as it should be rendered on top of all other geographical information. It is therefore required that layer labeling should be turned on for the text to become visible.

      Turning on textual information rendering may clutter the map significantly, and may also reduce the rendering performance. It is therefore disabled by default.

      The text group displaying flags provide a more fine-grained control over which texts to be rendered and which to hide.

      Parameters:
      aDisplayText - boolean indicating whether textual information of objects should be displayed or not.
      See Also:
    • getDisplayTextGroups

      public boolean[] getDisplayTextGroups()

      Returns a boolean array indicating which text groups to display.

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

      Returns:
      a boolean array indicating which text groups to display.
      See Also:
    • setDisplayTextGroups

      public void setDisplayTextGroups(boolean[] aDisplayTextGroups)
      Sets the boolean array indicating which text groups to display. The boolean at array index i indicates whether the text group with id i should be displayed or not.

      The group to which a text belongs is defined by the S-52 symbology. See the S-52 specification for more details on text groups.

      This filter is combined with the global text filter: only of the global text display flag is true AND the text group flag is true, the text group will be displayed.

      Parameters:
      aDisplayTextGroups - the boolean array indicating which text groups to display. Must have a length of 100 (specified by the S-52 specification)
      See Also:
    • isUseAbbreviations

      public boolean isUseAbbreviations()
      Returns whether to use abbreviations for text rendering.
      Returns:
      whether to use abbreviations for text rendering.
      See Also:
    • setUseAbbreviations

      public void setUseAbbreviations(boolean aUseAbbreviations)
      Sets whether to use abbrevations for text rendering.

      For the NATSUR (Nature of surface) attribute, abbreviations are defined for each of the available values. Enabling abbreviations may reduce cluttering on the map significantly. This setting currently only affects the NATSUR attribute.

      Parameters:
      aUseAbbreviations - boolean indicating whether to use abbrevations for text rendering.
      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.
    • getSafetyDepth

      public double getSafetyDepth()
      Returns the ship's safety depth.
      Returns:
      the ship's safety depth.
      See Also:
    • setSafetyDepth

      public void setSafetyDepth(double aSafetyDepth)
      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.

      Parameters:
      aSafetyDepth - the ship's safety depth.
      See Also:
    • getShallowContour

      public double getShallowContour()
      Returns the depth of the shallow contour.

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

      Returns:
      the shallow contour depth.
      See Also:
    • setShallowContour

      public void setShallowContour(double aShallowContour)
      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.

      Parameters:
      aShallowContour - the shallow contour depth.
      See Also:
    • getSafetyContour

      public double getSafetyContour()
      Returns the depth of the safety contour.
      Returns:
      the depth of the safety contour.
      See Also:
    • setSafetyContour

      public void setSafetyContour(double aSafetyContour)
      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.

      Parameters:
      aSafetyContour - the ship's safety contour depth.
      See Also:
    • getDeepContour

      public double getDeepContour()
      Returns the depth of the deep contour.
      Returns:
      the deep contour depth.
      See Also:
    • setDeepContour

      public void setDeepContour(double aDeepContour)
      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.

      Parameters:
      aDeepContour - the deep contour depth.
      See Also:
    • isUseTwoShades

      public boolean isUseTwoShades()
      Returns whether to use a 2- or 4-color schema for depth area rendering.
      Returns:
      whether to use a 2- or 4-color schema for depth area rendering.
      See Also:
    • setUseTwoShades

      public void setUseTwoShades(boolean aUseTwoShades)
      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).
      Parameters:
      aUseTwoShades - boolean indicating whether to use a 2- or 4-color schema for depth area rendering.
      See Also:
    • isDisplayShallowPattern

      public boolean isDisplayShallowPattern()
      Returns whether to fill areas with a depth less than the shallow depth with a special fill pattern, as defined by the S-52 specification.
      Returns:
      whether to fill shallow areas with a special fill pattern.
      See Also:
    • setDisplayShallowPattern

      public void setDisplayShallowPattern(boolean aDisplayShallowPattern)
      Returns whether to fill areas with a depth less than the shallow depth with a special fill pattern, as defined by the S-52 specification.
      Parameters:
      aDisplayShallowPattern - boolean indicating whether to fill shallow areas with a special fill pattern.
      See Also:
    • isDisplayIsolatedDangersInShallowWater

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

      public void setDisplayIsolatedDangersInShallowWater(boolean aDisplayIsolatedDangersInShallowWater)
      Sets whether to display isolated dangers in shallow water.
      Parameters:
      aDisplayIsolatedDangersInShallowWater - boolean indicating whether to display isolated dangers in shallow water.
      See Also:
    • isDisplayChartBoundaries

      public boolean isDisplayChartBoundaries()
      Returns whether to display chart boundaries.
      Returns:
      whether to display chart boundaries.
      See Also:
    • setDisplayChartBoundaries

      public void setDisplayChartBoundaries(boolean aDisplayChartBoundaries)
      Sets whether to display chart boundaries.

      If true, the boundaries of S-57 cells will be rendered in a special linestyle, as defined by the S-52 specification.

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

      Parameters:
      aDisplayChartBoundaries - boolean indicating whether to display chart boundaries.
      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:
    • getScaleRanges

      public double[] getScaleRanges()
      Deprecated.
      Use getScaleDenominators() instead, which uses device-independent scales.

      Returns the scale range to use for each navigational purpose. The double at index 0 specifies the minimum scale range for navigational purpose 0 (Overview), the double at index 1 the minimum scale range for navigational purpose 1 (General), and so on.

      The scales are expressed in pixels/meter.

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

      Returns:
      the scale range to use for each navigational purpose. The array has a length of 10 (one entry for each navigational purpose).
      See Also:
    • setScaleRanges

      public void setScaleRanges(double[] aScaleRanges)
      Deprecated.
      Use setScaleDenominators(int[]) instead, which uses device-independent scales.

      Sets the scale range to use for each navigational purpose. The double at index 0 specifies the minimum scale range for navigational purpose 0 (Overview), the double at index 1 the minimum scale range for navigational purpose 1 (General), and so on.

      The scales are expressed in pixels/meter.

      Parameters:
      aScaleRanges - the scale range to use for each navigational purpose. Must not be null and should have a length of 10 (one entry for each navigational purpose)
    • getScaleDenominators

      public int[] getScaleDenominators()

      Returns the scale denominators to use for each navigational purpose or level.

      A scale is expressed as the ratio between one centimeter on the map and the corresponding number of centimeters in reality (similar to paper chart scales).

      The array always has 10 elements. The index in the array corresponds to the cell level - 1. To get the appropriate scale for a navigational purpose, use:

           double scale = displaySettings.getScaleDenominators()[modelDescriptor.getLevel() - 1];
         

      For ENC, the default scales per level / navigational purpose are as prescribed by S-57 and S-52 specifications:

      • 1: Overview: 1:5000000
      • 2: General: 1:1500000
      • 3: Coastal: 1:600000
      • 4: Approach: 1:150000
      • 5: Harbour: 1:50000
      • 6: Berthing: 1:5000

      Inland ENC has four additional levels:

      • 7: River: 1:5000
      • 8: River harbour: 1:5000
      • 9: River berthing: 1:5000
      • 10: Overlay: 1:5000 (this is level "A" in the filename)

      For AML, the default scales per level / navigational purpose are prescribed by the AML V3 specification. Note that for compatibility, level 0 (non-scaled information) must be mapped to index 9.

      • 1: 1:100000000
      • 2: 1:25000000
      • 3: 1:5000000
      • 4: 1:1000000
      • 5: 1:250000
      • 6: 1:50000
      • 7: 1:10000
      • 8: 1:2500
      • 9: 1:1600
      • 0: 1:100000000 - non-scaled information which is always displayed

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

      Returns:
      the scale denominators to use for each navigational purpose. The array has a length of 10 (one entry for each navigational purpose).
      See Also:
    • setScaleDenominators

      public void setScaleDenominators(int[] aScaleDenominators)

      Sets the scale denominators to use for each navigational purpose.

      Parameters:
      aScaleDenominators - the scale denominators to use for each navigational purpose. Must not be null and should have a length of 10 (one entry for each navigational purpose)
      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:
    • isDisplayObjectsOutsideView

      public boolean isDisplayObjectsOutsideView()
      Returns whether objects located outside the view but whose graphical extent overlaps with the view should be displayed.
      Returns:
      whether objects located outside the view but whose graphical extent overlaps with the view should be displayed.
      See Also:
    • setDisplayObjectsOutsideView

      public void setDisplayObjectsOutsideView(boolean aDisplayObjectsOutsideBorder)
      Indicates whether the S-57 layers should render objects which are located outside the view bounds, but whose graphical extent overlaps with the view. Enabling this flag results in a more accurate display,but is more expensive (depends on the view size, typically between 20% and 30%). The effect of this setting is most noticeable with point objects that have a large icon representation, such as lights.
      Parameters:
      aDisplayObjectsOutsideBorder - flag indicating whether objects located outside the view but whose graphical extent overlaps with the view should be displayed.
      See Also:
    • isObjectClassSelectionEnabled

      public boolean isObjectClassSelectionEnabled()
      Indicates whether the selected object classes on this display settings should be taken into account.

      In case the property value is true, the visibility of object classes behaves as defined by the documentation of getObjectClasses().

      In case the property value is false, the value of property OBJECT_CLASSES_PROPERTY is ignored completely. In this case, the visibility of object classes is defined by the display category.

      By default, this property is set to true.

      Returns:
      whether object classes can be selected or not
    • setObjectClassSelectionEnabled

      public void setObjectClassSelectionEnabled(boolean aNewValue)
      Sets whether the selected object classes on this display settings should be taken into account.

      In case the property value is true, the visibility of object classes behaves as defined by the documentation of getObjectClasses().

      In case the property value is false, the value of property OBJECT_CLASSES_PROPERTY is ignored completely. In this case, the visibility of object classes is defined by the display category.

      Parameters:
      aNewValue - the new property value
    • getObjectClasses

      public int[] getObjectClasses()

      Returns the set of object class that is displayed. This value is only taken into account when object classes are selectable.

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

      Returns:
      the set of object class that is displayed. A null value means no object class filter is applied.
      See Also:
    • setObjectClasses

      public void setObjectClasses(int[] aObjectClasses)
      Sets the set of object classes to display.

      This new value is only taken into consideration if object classes are indeed selectable.

      Parameters:
      aObjectClasses - the set of object classes to display. The integers refer to the object class codes, as returned by TLcdS57ObjectClassDescriptor.getCode(). If null, this filter will be ignored.
      See Also:
    • setDisplayLandAreas

      public void setDisplayLandAreas(boolean aDisplayLandAreas)
      Enable or disable display of land and built-up areas.

      If false, land areas (LNDARE) and built-up areas (BUAARE) will not be visualized and cannot be selected.

      By default, land area are displayed (value true).

      Note that this feature only has effect on Lightspeed layers, not GXY layers.

      Parameters:
      aDisplayLandAreas - true if land area should be displayed, false otherwise
      Since:
      2013.1
    • isDisplayLandAreas

      public boolean isDisplayLandAreas()
      Indicates whether land and built-up areas are displayed.
      Returns:
      true if enabled.
      Since:
      2031.1
      See Also:
    • setDateFilterValue

      public void setDateFilterValue(Date aDateFilterValue)
      Sets a date value for filtering.
      Parameters:
      aDateFilterValue - new filtering value
      Since:
      2015.1
      See Also:
    • getDateFilterValue

      public Date getDateFilterValue()
      Returns the date value for filtering. Objects which have a time interval including this value and objects which do not have any time interval are painted. Others are hidden. If the filter date value is null, all objects are painted. Default filter date value is null.
      Returns:
      the date filter value
      Since:
      2015.1
    • getBeam

      public double getBeam()
      Returns the currently configured ship's beam, in meters. A ship's beam is the width of the ship at its widest point.

      By default, this is 10 meters.

      This setting only has effect for InlandECDIS datasets.

      Returns:
      The currently configured value of the ship's beam, in meters.
      Since:
      2018.0.09
    • setBeam

      public void setBeam(double aBeam)
      Set the ship's beam, in meters. See getBeam() for details.
      Parameters:
      aBeam - the new beam, in meters.
      Since:
      2018.0.09
    • getAirDraft

      public double getAirDraft()
      Returns the currently configured ship's air draft, in meters. A ship's air draft (or air draught) is the ship's highest point, measured from the water surface.

      By default, this is 10 meters.

      This setting only has effect for InlandECDIS datasets.

      Returns:
      The currently configured value of the ship's air draft, in meters.
      Since:
      2018.0.09
    • setAirDraft

      public void setAirDraft(double aAirDraft)
      Set the ship's air draft, in meters. See getAirDraft() for details.
      Parameters:
      aAirDraft - the new air draft, in meters.
      Since:
      2018.0.09
    • getRadarCategory

      public ELcdS52RadarCategory getRadarCategory()
      Returns the currently configured radar category property.

      The S-52 OVERRADAR flag classifies whether objects are to be put over or under a radar picture. The radar category property determines which of these objects need to be painted. If you need to show ECDIS data interleaved with a radar, you need to use three layers:

      Both ECDIS layers need to reuse the same model.

      By default, this is ELcdS52RadarCategory.BOTH.

      Returns:
      The currently configured value of the radar category property
      Since:
      2021.1
    • setRadarCategory

      public void setRadarCategory(ELcdS52RadarCategory aRadarCategory)
      Set the radar category property. See getRadarCategory() for details.
      Parameters:
      aRadarCategory - the new radar category value.
      Since:
      2021.1
    • 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)

      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.

      Warning: if this method returns a modifiable object (for example a List as for the object classes), you should not modify the object directly. Instead, if you want to change the value you need to create a new, modified version and set this using setValue(com.luciad.datamodel.TLcdDataProperty, Object) or setValue(String, Object).

      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)

      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.

      Warning: if this method returns a modifiable object (for example a List as for the object classes), you should not modify the object directly. Instead, if you want to change the value you need to create a new, modified version and set this using setValue(com.luciad.datamodel.TLcdDataProperty, Object) or setValue(String, Object).

      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.
    • clone

      public TLcdS52DisplaySettings 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:
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object