Class ALcyLspStyleRepository
- All Implemented Interfaces:
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 Summary
ConstructorDescriptionCreate a newALcyLspStyleRepository
, which is typically registered on the Lucy back-end so it can be used to provide for example a specific selection styler. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addPropertyChangeListener
(PropertyChangeListener aPropertyChangeListener) Registers the givenPropertyChangeListener
to be notified when this object's properties change.final ILspStyler
createElevationStyler
(ILcdModel aModel) Returns anILspStyler
which can be used to style elevation data.abstract ILspStyler
createSelectionStyler
(ILspStyler aStyler) Returns anILspStyler
which enhances anotherILspStyler
with the application-wide selection style.final TLcdColorMap
Returns aTLcdColorMap
used to style elevation data.static ALcyLspStyleRepository
getInstance
(ILcyLucyEnv aLucyEnv) Returns theALcyLspStyleRepository
instance registered on the Lucy back-end as service, or fails when no such instance is available.final void
removePropertyChangeListener
(PropertyChangeListener aPropertyChangeListener) De-registers the givenPropertyChangeListener
from receiving property change events for this object.final void
setElevationColorMap
(TLcdColorMap aElevationColorMap) Set theTLcdColorMap
which is used to style elevation data.
-
Constructor Details
-
ALcyLspStyleRepository
public ALcyLspStyleRepository()Create a newALcyLspStyleRepository
, 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
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 benull
- See Also:
-
createSelectionStyler
Returns anILspStyler
which enhances anotherILspStyler
with the application-wide selection style. This otherILspStyler
is provided as a parameter.- Parameters:
aStyler
- TheILspStyler
used as a basis to build the selection styler. Should never benull
.- Returns:
- an instance of a
ILspStyler
which enhanced the providedILspStyler
with the application-wide selection style. Should never benull
.
-
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, nevernull
- See Also:
-
setElevationColorMap
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
- TheTLcdColorMap
which should be used to style elevation data. Should never benull
.- See Also:
-
createElevationStyler
Returns an
ILspStyler
which can be used to style elevation data. The default implementation will respect theelevation 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, nevernull
-
addPropertyChangeListener
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 interfaceILcdPropertyChangeSource
- Parameters:
aPropertyChangeListener
- The listener to be notified- See Also:
-
removePropertyChangeListener
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 interfaceILcdPropertyChangeSource
- Parameters:
aPropertyChangeListener
- the listener that should no longer be notified of changes of this object's properties- See Also:
-