public class TLspPaintingOrder extends java.lang.Object implements ILspPaintingOrder
ILspPaintingOrder
. This implementation
sorts according to the following criteria (in this order):
setPaintRepresentationStateComparator(java.util.Comparator)
.
This allows users to easily modify the order while still respecting the
view's layer order. Note, however, that TLspPaintRepresentation
and
TLspPaintState
have a sort order property, so that for instance the
introduction of a custom paint representation will often not require
implementing a custom ILspPaintingOrder
.ILspPaintingOrder.PaintStep
Constructor and Description |
---|
TLspPaintingOrder(ILspView aView) |
Modifier and Type | Method and Description |
---|---|
int |
compare(ILspPaintingOrder.PaintStep o1,
ILspPaintingOrder.PaintStep o2) |
java.util.Comparator<TLspPaintRepresentationState> |
getPaintRepresentationStateComparator()
Returns the comparator that determines in which order the various visual
representations of domain objects are drawn.
|
protected ILspView |
getView()
Returns the view for which this painting order was created.
|
void |
setPaintRepresentationStateComparator(java.util.Comparator<TLspPaintRepresentationState> aPaintRepresentationStateComparator)
Sets the comparator that determines in which order the various visual
representations of domain objects are drawn.
|
public TLspPaintingOrder(ILspView aView)
public int compare(ILspPaintingOrder.PaintStep o1, ILspPaintingOrder.PaintStep o2)
compare
in interface java.util.Comparator<ILspPaintingOrder.PaintStep>
public java.util.Comparator<TLspPaintRepresentationState> getPaintRepresentationStateComparator()
Comparator
for PaintRepresentation
ssetPaintRepresentationStateComparator(java.util.Comparator)
public void setPaintRepresentationStateComparator(java.util.Comparator<TLspPaintRepresentationState> aPaintRepresentationStateComparator)
PaintRepresentationState
s for which an
ILspPainter
has been registered.aPaintRepresentationStateComparator
- a Comparator
for PaintRepresentation
sprotected ILspView getView()
ILspView
associated with this painting order