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.
Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
Registers the given
PropertyChangeListener to be notified when this object's
properties change. |
ILspStyler |
createElevationStyler(ILcdModel aModel)
Returns an
ILspStyler which can be used to style elevation data. |
abstract ILspStyler |
createSelectionStyler(ILspStyler aStyler)
Returns an
ILspStyler which enhances another ILspStyler with the
application-wide selection style. |
TLcdColorMap |
getElevationColorMap()
Returns a
TLcdColorMap used to style elevation data. |
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. |
void |
removePropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
De-registers the given
PropertyChangeListener from receiving property change events
for this object. |
void |
setElevationColorMap(TLcdColorMap aElevationColorMap)
Set the
TLcdColorMap which is used to style elevation data. |
public ALcyLspStyleRepository()
ALcyLspStyleRepository
, which is typically registered on the Lucy
back-end so it can be used to provide for example a specific selection styler.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
.
aLucyEnv
- The Lucy back-endALcyLspStyleRepository
instance of the Lucy back-end. Will
not be null
ILcyLucyEnv.getService(Class)
public abstract ILspStyler createSelectionStyler(ILspStyler aStyler)
ILspStyler
which enhances another ILspStyler
with the
application-wide selection style. This other ILspStyler
is provided as a
parameter.aStyler
- The ILspStyler
used as a basis to build the selection styler.
Should never be null
.ILspStyler
which enhanced the provided
ILspStyler
with the application-wide selection style. Should never be
null
.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
.
TLcdColorMap
used to style elevation data, never null
createElevationStyler(ILcdModel)
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.
aElevationColorMap
- The TLcdColorMap
which should be used to style elevation data.
Should never be null
.createElevationStyler(com.luciad.model.ILcdModel)
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.
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.ILspStyler
which can be used to style elevation data, never null
public final void addPropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
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.
addPropertyChangeListener
in interface ILcdPropertyChangeSource
aPropertyChangeListener
- The listener to be notifiedALcdWeakPropertyChangeListener
,
ILcdPropertyChangeSource.removePropertyChangeListener(java.beans.PropertyChangeListener)
public final void removePropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
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.
removePropertyChangeListener
in interface ILcdPropertyChangeSource
aPropertyChangeListener
- the listener that should no longer be notified of changes of
this object's propertiesILcdPropertyChangeSource.addPropertyChangeListener(java.beans.PropertyChangeListener)