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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the comparator that determines in which order the various visual representations of domain objects are drawn.protected ILspViewgetView()Returns the view for which this painting order was created.voidsetPaintRepresentationStateComparator(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, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
TLspPaintingOrder
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<ILspPaintingOrder.PaintStep>
-
getPaintRepresentationStateComparator
Returns the comparator that determines in which order the various visual representations of domain objects are drawn.- Returns:
- a
ComparatorforPaintRepresentations - 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 allPaintRepresentationStates for which anILspPainterhas been registered.- Parameters:
aPaintRepresentationStateComparator- aComparatorforPaintRepresentations
-
getView
Returns the view for which this painting order was created.- Returns:
- the
ILspViewassociated with this painting order
-