public abstract class ALspLabelStyler extends ALspStyler
Abstract base class for label styler implementations.
This class provides convenience methods for handling style changes.
This class also implements the regular ILspStyler
by adapting or casting the
ALspStyleCollector
to an ALspLabelStyleCollector
.
Note that it is not necessary to use this class to implement a styler for labels. It is possible to use a
regular ILspStyler
implementation that casts the ALspStyleCollector
instance that is passed to
the ILspStyler#style
method to ALspLabelStyleCollector
.
Constructor and Description |
---|
ALspLabelStyler() |
Modifier and Type | Method and Description |
---|---|
abstract void |
style(Collection<?> aObjects,
ALspLabelStyleCollector aStyleCollector,
TLspContext aContext)
Convenience method that takes an
ALspLabelStyleCollector as argument instead of
an ALspStyleCollector . |
void |
style(Collection<?> aObjects,
ALspStyleCollector aStyleCollector,
TLspContext aContext)
Implementation of
ILspStyler.style that either casts the ALspStyleCollector
to ALspLabelStyleCollector if possible, or adapts it otherwise. |
addStyleChangeListener, fireStyleChangeEvent, fireStyleChangeEvent, removeStyleChangeListener
public void style(Collection<?> aObjects, ALspStyleCollector aStyleCollector, TLspContext aContext)
Implementation of ILspStyler.style
that either casts the ALspStyleCollector
to ALspLabelStyleCollector
if possible, or adapts it otherwise. In the latter case, the labeling-specific
calls (label
, anchorLabel
,
algorithm
, ...) are ignored. The ALspLabelStyleCollector
is then
passed to the style(Collection,ALspLabelStyleCollector,TLspContext)
method.
aObjects
- The objects to be styled.aStyleCollector
- A style collector to which all styling information
should be passed, this collector is only valid within this method
call, and can no longer be used afterwards.aContext
- Provides context information that may affect styling, such as view specific properties.public abstract void style(Collection<?> aObjects, ALspLabelStyleCollector aStyleCollector, TLspContext aContext)
Convenience method that takes an ALspLabelStyleCollector
as argument instead of
an ALspStyleCollector
. This method is called from
style(Collection, ALspStyleCollector, TLspContext)
.
aObjects
- The set of domain objects to provide information foraStyleCollector
- The label style collector to submit the information to.aContext
- The contextALspLabelStyleCollector
,
ILspStyler