public final class ZOrder extends Object
HighlightsLayerin relation to other layers. Instances of this class are immutable.
Developers are encouraged to use the predefined z-order constants in this class. Each constant refers to a rack in vertical ordering with a specific purpose. The racks are ordered in the following way:
TOP_RACK- the highest rack
BOTTOM_RACK- the lowest rack
It is possible to further specify a position of a layer within a rack by
forPosition(int) method. The
for each rack use zero as the default position. Therefore calling
with a positive number will create a
ZOrder above the rack marker
and using a negative number will produce
ZOrder below the rack marker.
When positioning your layer you should choose the rack that suites the purpose
of your layer. It is possible to further define more precise ordering
between layers within a rack. For example, if you have two layers - one providing
syntactical highlighting and the other one providing semantical highlighting -
they both belong to the
SYNTAX_RACK, but the semantical layer should be placed
above the syntactical one, because it provides 'more accurate' highlights. You could
ZOrder of your layers like this:
ZOrder syntaxLayerZOrder = ZOrder.SYNTAX; ZOrder semanticLayerZOrder = ZOrder.SYNTAX.forPosition(10);
|Modifier and Type||Field and Description|
The lowest rack of z-orders.
The rack for highlights showing the position of a caret.
The default rack of z-orders.
The show off rack of z-orders.
The syntax highlighting rack of z-order.
The highest rack of z-orders.
public static final ZOrder TOP_RACK
public static final ZOrder SHOW_OFF_RACK
public static final ZOrder DEFAULT_RACK
public static final ZOrder CARET_RACK
public static final ZOrder SYNTAX_RACK
public static final ZOrder BOTTOM_RACK
public ZOrder forPosition(int position)
ZOrderwill belong to the same rack as the original one, but will have the the new position passed in as a parameter.
position- The new position.
Built on July 29 2015. | Portions Copyright 1997-2015 Oracle. All rights reserved.