public class TLcdLabelLocationEventSupport extends Object
ALcdLabelLocations
Constructor and Description |
---|
TLcdLabelLocationEventSupport(ALcdLabelLocations aSource)
Creates a new instance of this support class, with the specified
ALcdLabelLocations as source for the events it will fire. |
Modifier and Type | Method and Description |
---|---|
void |
addLabelLocationListener(ILcdLabelLocationListener aListener)
Adds the specified listener to the list of listeners that should be notified of changes to the
label locations.
|
void |
addLabelPaintedListener(ILcdLabelPaintedListener aListener)
Adds the specified listener to the list of listeners that should be notified of changes to the
label locations.
|
void |
fireCollectedChanges(ILcdView aView)
Notifies the registered listeners of the collected changes.
|
void |
fireCollectedLabelPaintedChanges(ILcdView aView)
Notifies the registered listeners of the collected changes.
|
void |
labelLocationChanged(Object aObject,
int aLabelIndex,
int aSubLabelIndex,
ILcdView aView,
int aFireEventMode)
Notify this support class of a change in the label locations.
|
void |
labelPaintedChanged(Object aObject,
int aLabelIndex,
int aSubLabelIndex,
ILcdView aView,
boolean aIsPainted,
boolean aPreviousPainted,
int aFireEventMode)
Notify this support class of a change in the label locations painted status.
|
void |
removeLabelLocationListener(ILcdLabelLocationListener aListener)
Removes the specified listener from the list of listeners.
|
void |
removeLabelPaintedListener(ILcdLabelPaintedListener aListener)
Removes the specified listener from the list of listeners.
|
public TLcdLabelLocationEventSupport(ALcdLabelLocations aSource)
ALcdLabelLocations
as source for the events it will fire.aSource
- The ALcdLabelLocations
that will be used as the source of the event
this instance will fire. It must not be null
.TLcdLabelLocationEvent.getLabelLocations()
public void labelLocationChanged(Object aObject, int aLabelIndex, int aSubLabelIndex, ILcdView aView, int aFireEventMode)
aObject
- The domain Object
for which the label changed.aLabelIndex
- The label that changed.aSubLabelIndex
- The sublabel that changed.aView
- The view on which the label was painted.aFireEventMode
- Specifies if and when the registered listeners should be notified of the
change. When this integer is equal to ILcdFireEventMode#FIRE_NOW
,
the listeners will be notified right away, when it is
ILcdFireEventMode#FIRE_LATER
the listeners will be notified
later (more specifically, when fireCollectedChanges
is called) and when it is ILcdFireEventMode#NO_EVENT
the listeners will never be notified of the change.About label- and sublabel-indices.
public void addLabelLocationListener(ILcdLabelLocationListener aListener)
aListener
- The listener that should be notified of any future changes in the label
locationsALcdLabelLocations.addLabelLocationListener(ILcdLabelLocationListener)
public void removeLabelLocationListener(ILcdLabelLocationListener aListener)
aListener
- The listener that should no longer be notified of the changes in the label
locationsALcdLabelLocations.removeLabelLocationListener(ILcdLabelLocationListener)
public void fireCollectedChanges(ILcdView aView)
labelLocationChanged(Object, int, int,
com.luciad.view.ILcdView, int)
method.aView
- The ILcdView
for which to fire the collected changes.ALcdLabelLocations.putLabelLocation(java.lang.Object, int, int, com.luciad.view.ILcdView, com.luciad.view.TLcdLabelLocation, int)
public void addLabelPaintedListener(ILcdLabelPaintedListener aListener)
aListener
- The listener that should be notified of any future changes in the label
locationsALcdLabelLocations.addLabelPaintedListener(ILcdLabelPaintedListener)
public void removeLabelPaintedListener(ILcdLabelPaintedListener aListener)
aListener
- The listener that should no longer be notified of the changes in the label
locationsALcdLabelLocations.removeLabelPaintedListener(ILcdLabelPaintedListener)
public void labelPaintedChanged(Object aObject, int aLabelIndex, int aSubLabelIndex, ILcdView aView, boolean aIsPainted, boolean aPreviousPainted, int aFireEventMode)
aObject
- The domain Object
for which the label changed.aLabelIndex
- The label that changed.aSubLabelIndex
- The sublabel that changed.aView
- The view on which the label was painted.aIsPainted
- True if the label is marked as painted, and false if it is unmarked.aPreviousPainted
- True if the label was marked as painted before the change.aFireEventMode
- Specifies if and when the registered listeners should be notified of the
change. When this integer is equal to ILcdFireEventMode#FIRE_NOW
,
the listeners will be notified right away, when it is
ILcdFireEventMode#FIRE_LATER
the listeners will be notified
later (more specifically, when fireCollectedLabelPaintedChanges
is called) and when it is ILcdFireEventMode#NO_EVENT
the listeners will never be notified of the change.About label- and sublabel-indices.
public void fireCollectedLabelPaintedChanges(ILcdView aView)
labelPaintedChanged(Object, int, int,
com.luciad.view.ILcdView, boolean, boolean, int)
method.aView
- The ILcdView
for which to fire the collected changes.ALcdLabelLocations.setPainted(Object, int, int, ILcdView, boolean, int)