public class TLspPaintingOrder extends 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) |
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(Comparator<TLspPaintRepresentationState> aPaintRepresentationStateComparator)
Sets the comparator that determines in which order the various visual
representations of domain objects are drawn.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public TLspPaintingOrder(ILspView aView)
public int compare(ILspPaintingOrder.PaintStep o1, ILspPaintingOrder.PaintStep o2)
compare
in interface Comparator<ILspPaintingOrder.PaintStep>
public Comparator<TLspPaintRepresentationState> getPaintRepresentationStateComparator()
Comparator
for PaintRepresentation
ssetPaintRepresentationStateComparator(java.util.Comparator)
public void setPaintRepresentationStateComparator(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