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
ConstructorsConstructorDescriptionCreate 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 voidaddPropertyChangeListener(PropertyChangeListener aPropertyChangeListener) Registers the givenPropertyChangeListenerto be notified when this object's properties change.final ILspStylercreateElevationStyler(ILcdModel aModel) Returns anILspStylerwhich can be used to style elevation data.abstract ILspStylercreateSelectionStyler(ILspStyler aStyler) Returns anILspStylerwhich enhances anotherILspStylerwith the application-wide selection style.final TLcdColorMapReturns aTLcdColorMapused to style elevation data.static ALcyLspStyleRepositorygetInstance(ILcyLucyEnv aLucyEnv) Returns theALcyLspStyleRepositoryinstance registered on the Lucy back-end as service, or fails when no such instance is available.final voidremovePropertyChangeListener(PropertyChangeListener aPropertyChangeListener) De-registers the givenPropertyChangeListenerfrom receiving property change events for this object.final voidsetElevationColorMap(TLcdColorMap aElevationColorMap) Set theTLcdColorMapwhich 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
ALcyLspStyleRepositoryinstance 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
ALcyLspStyleRepositoryinstance of the Lucy back-end. Will not benull - See Also:
-
createSelectionStyler
Returns anILspStylerwhich enhances anotherILspStylerwith the application-wide selection style. This otherILspStyleris provided as a parameter.- Parameters:
aStyler- TheILspStylerused as a basis to build the selection styler. Should never benull.- Returns:
- an instance of a
ILspStylerwhich enhanced the providedILspStylerwith the application-wide selection style. Should never benull.
-
getElevationColorMap
Returns a
TLcdColorMapused 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
TLcdColorMapused to style elevation data, nevernull - See Also:
-
setElevationColorMap
Set the
TLcdColorMapwhich 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
aElevationColorMapafter 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- TheTLcdColorMapwhich should be used to style elevation data. Should never benull.- See Also:
-
createElevationStyler
Returns an
ILspStylerwhich can be used to style elevation data. The default implementation will respect theelevation color mapwhich 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
ILspStylerwhich can be used to style elevation data, nevernull
-
addPropertyChangeListener
Description copied from interface:ILcdPropertyChangeSourceRegisters the given
PropertyChangeListenerto 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
ALcdWeakPropertyChangeListenerinstance as property change listener.- Specified by:
addPropertyChangeListenerin interfaceILcdPropertyChangeSource- Parameters:
aPropertyChangeListener- The listener to be notified- See Also:
-
removePropertyChangeListener
Description copied from interface:ILcdPropertyChangeSourceDe-registers the given
PropertyChangeListenerfrom 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:
removePropertyChangeListenerin interfaceILcdPropertyChangeSource- Parameters:
aPropertyChangeListener- the listener that should no longer be notified of changes of this object's properties- See Also:
-