Package com.luciad.view.lightspeed
Class TLspPaintingOrder
java.lang.Object
com.luciad.view.lightspeed.TLspPaintingOrder
- All Implemented Interfaces:
ILspPaintingOrder
,Comparator<ILspPaintingOrder.PaintStep>
Default implementation of
ILspPaintingOrder
. This implementation
sorts according to the following criteria (in this order):
- Paint state: regular before selected before editing;
- Paint representation: bodies before labels before editing handles;
- Layer order, bottom to top.
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
.- Since:
- 2012.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.luciad.view.lightspeed.ILspPaintingOrder
ILspPaintingOrder.PaintStep
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
TLspPaintingOrder
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<ILspPaintingOrder.PaintStep>
-
getPaintRepresentationStateComparator
Returns the comparator that determines in which order the various visual representations of domain objects are drawn.- Returns:
- a
Comparator
forPaintRepresentation
s - See Also:
-
setPaintRepresentationStateComparator
public void setPaintRepresentationStateComparator(Comparator<TLspPaintRepresentationState> aPaintRepresentationStateComparator) Sets the comparator that determines in which order the various visual representations of domain objects are drawn. The comparator is used to order the set of allPaintRepresentationState
s for which anILspPainter
has been registered.- Parameters:
aPaintRepresentationStateComparator
- aComparator
forPaintRepresentation
s
-
getView
Returns the view for which this painting order was created.- Returns:
- the
ILspView
associated with this painting order
-