Class ALcyLspStyleRepository

java.lang.Object
com.luciad.lucy.map.lightspeed.ALcyLspStyleRepository
All Implemented Interfaces:
ILcdPropertyChangeSource

public abstract class ALcyLspStyleRepository extends Object implements ILcdPropertyChangeSource

This object is used to create Lightspeed related application-wide style settings. Typically an instance of this class is registered on the Lucy back-end as a service.

Since:
2012.0
  • Constructor Details

    • ALcyLspStyleRepository

      public ALcyLspStyleRepository()
      Create a new ALcyLspStyleRepository, which is typically registered on the Lucy back-end so it can be used to provide for example a specific selection styler.
  • Method Details

    • getInstance

      public static ALcyLspStyleRepository getInstance(ILcyLucyEnv aLucyEnv)

      Returns the ALcyLspStyleRepository instance registered on the Lucy back-end as service, or fails when no such instance is available.

      Typically this instance is made available by plugging in the TLcyLspStyleRepositoryAddOn.

      Parameters:
      aLucyEnv - The Lucy back-end
      Returns:
      The registered ALcyLspStyleRepository instance of the Lucy back-end. Will not be null
      See Also:
    • createSelectionStyler

      public abstract ILspStyler createSelectionStyler(ILspStyler aStyler)
      Returns an ILspStyler which enhances another ILspStyler with the application-wide selection style. This other ILspStyler is provided as a parameter.
      Parameters:
      aStyler - The ILspStyler used as a basis to build the selection styler. Should never be null.
      Returns:
      an instance of a ILspStyler which enhanced the provided ILspStyler with the application-wide selection style. Should never be null.
    • getElevationColorMap

      public final TLcdColorMap getElevationColorMap()

      Returns a TLcdColorMap used to style elevation data. This color maps represents the mapping from an elevation value (in metres) to a color used for displaying the data.

      It is not allowed to modify the returned color map directly. When you want to make changes to the color map, you need to create a new instance and pass it to the setter.

      Returns:
      the TLcdColorMap used to style elevation data, never null
      See Also:
    • setElevationColorMap

      public final void setElevationColorMap(TLcdColorMap aElevationColorMap)

      Set the TLcdColorMap which is used to style elevation data. The color map represents the mapping from an elevation value (in metres) to a color used for displaying the data.

      It is not allowed to modify aElevationColorMap after it has been set. When you want to make changes to the color map, you need to create a new instance and pass it to this method again.

      Parameters:
      aElevationColorMap - The TLcdColorMap which should be used to style elevation data. Should never be null.
      See Also:
    • createElevationStyler

      public final ILspStyler createElevationStyler(ILcdModel aModel)

      Returns an ILspStyler which can be used to style elevation data. The default implementation will respect the elevation color map which is set on this repository, and ensures that it remains in sync with this color map.

      Parameters:
      aModel - The model containing the elevation data. This parameter can for example be used to determine whether the elevation data has an "unknown elevation" value, and color that data transparent.
      Returns:
      An ILspStyler which can be used to style elevation data, never null
    • addPropertyChangeListener

      public final 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 final 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: