UIEvolutin Inc.
UJML Language Reference
Z-Order

A visual element's z-order is its position (top to bottom) on a device screen.

A visual element's z-order is determined by the position of the visual element's definition in the UJML source code. This is different than the visual element's horizontal and vertical position in that the z-order is not specified explicitly with a value, but rather implicitly with the way the code is constructed. 

You can think of z-order as the third dimension of a visual element's position. The first two dimensions are the horizontal and vertical positions; defined using the x and y elements. See Position and Size. The third dimension is the order in which the elements are stacked from top to bottom on the device screen with the highest elements on the top (think of this as x, y, z). Visual elements with a lower z-order are overlayed on the screen by visual elements with a higher z-order. 

 

 

Figure 1. Several visual elements with different z-orders displayed by the visualelements.ujml sample.

Z-order and partitions 

A UJML partition linked in at run time has a higher z-order than the partition which loaded it. Visual elements in that partition are still placed in z-order by their position in the source code, but all of them have a higher z-order than visual elements in the parent partition. The result is the same as if the child partitions were added to the end of the parent partition in the order they were linked.

Z-order and state transitions

When a state transition occurs, only one state element for that state variable can be activated. See State Variables, State Transitions. In cases where multiple state elements contain transition elements for the same state value, UJML uses the state transition with the highest z-order.

Z-order and events

When an event is fired, only one visual element containing an event handler for that event can be activated. See Handling Events. In cases where multiple visual elements handle the same event (for example, an onSelect with an accelerator for a key-click), UJML uses the visual element event handler with the highest z-order. 

Note: Positioning a state machine in the first section will result in the applications display to overlay any displays in that state machine. If this is not desired, place the state machine in the second section.

Copyright (c) 2000-2007 UIEvolution, Inc. All rights reserved.
What do you think about this topic? Send feedback!