EchoPoint
1.0

echopoint.positionable
Interface Positionable

All Known Subinterfaces:
ScrollableContainer
All Known Implementing Classes:
AbstractScrollableComponent, ScrollableBox, ScrollablePanel

public interface Positionable

A Positionable is one that can be postioned anywhere on the screen, regardless of the flow layout of other components.

By default the it acts like a normal component, and will be rendered with the flow of its parent and siblings. The component has its Positioning property set to POSITIONING_FLOW.

POSITIONING

However if the Positioning property is POSITIONING_ABSOLUTE or POSITIONING_RELATIVE then the component will break out of the normal flow layout and position themselves directly on the screen.

If the Positioning is POSITIONING_ABSOLUTE, then the component is positioned at an absolute point from the origin of the client window. The left, top, right and bottom properties can be used to position the component.

If the Positioning is POSITIONING_RELATIVE, then the component is positioned at an at a point on the screen relative to its first positioned parent component. If it has no parents that are positioned, then it will be positioned relative to the origins of the client window.

left, top, right, bottom

If an actual positioning properties, left, top, right, bottom, are set to either Integer.MAX_VALUE or Integer.MIN_VALUE, then it will not be taken into affect when positioning the component.

For example you could position a component to 100 pixels in from the bottom and 10 pixels if from the right by only settting the bottom and right properties to 100 and 10 respectively. The width of the component will be determined by the content.

By default all positioning properties are set to Integer.MAX_VALUE. A convenience method called clearPositioning() is propvided to clear all positioning and have the component acts like a normal flow component.

Z-INDEX

A Positionable also supports a z-idex, which controls how it is layered over other components, especially other Positionable.


Nested Class Summary
static class Positionable.NestedStyleInfo
          Nested public static StyleInfo class.
 
Field Summary
static java.lang.String POSITION_CHANGED_PROPERTY
          This property name is fired when any of the positioning elements change (ie. top, left, bottom, left, zindex, positioning)
static int POSITIONING_ABSOLUTE
           
static int POSITIONING_FLOW
          These constants are used to indicate that positioning rules in place.
static int POSITIONING_RELATIVE
           
static SymbolicValue[] positioningSymbolics
          Helper static SymbolicValue[] - Positionable positioning Symbolics
static java.lang.String STYLE_BOTTOM
          A style constant for the Bottom property.
static java.lang.String STYLE_LEFT
          A style constant for the Left property.
static java.lang.String STYLE_POSITIONING
          A style constant for the Positioning property.
static java.lang.String STYLE_RIGHT
          A style constant for the Right property.
static java.lang.String STYLE_TOP
          A style constant for the Top property.
static java.lang.String STYLE_ZINDEX
          A style constant for the zIndex property.
static int UNDEFINED
          This can be used to indicate that an integer parameter is not define (ie should not be interpreseted).
static SymbolicValue[] undefinedSymbolic
          Helper static SymbolicValue[] - UNDEFINED Symbolic
 
Method Summary
 void applyStyle(nextapp.echo.Style style)
           
 void clearPositioning()
          This should sets all the positioning attributes (left,top,right,bottom,z-index) to Integer.MAX.
 int getBottom()
          Returns the bottom Y position of the component
 int getLeft()
          Returns the left X position of the component
 int getPositioning()
          This can be one of : POSITIONING_NONE POSITIONING_ABSOLUTE POSITIONING_RELATIVE
 int getRight()
          Returns the right X position of the component
 int getTop()
          Returns the top Y position of the component
 int getzIndex()
          Returns the z-index of the component
 boolean isPositioned()
          This returns true if any positioning is in place
 void setBottom(int newValue)
          Sets the bottom Y position of the component
 void setLeft(int newValue)
          Set the left X position of the component
 void setPositioning(int newPositioning)
          Sets the positioning of the component This can be one of : POSITIONING_NONE POSITIONING_ABSOLUTE POSITIONING_RELATIVE
 void setRight(int newValue)
          Sets the right X position of the component
 void setTop(int newValue)
          Sets the top Y position of the component
 void setzIndex(int newValue)
          Sets the z-index of the component
 

Field Detail

UNDEFINED

public static final int UNDEFINED
This can be used to indicate that an integer parameter is not define (ie should not be interpreseted).

See Also:
Constant Field Values

POSITIONING_FLOW

public static final int POSITIONING_FLOW
These constants are used to indicate that positioning rules in place.

See Also:
Constant Field Values

POSITIONING_ABSOLUTE

public static final int POSITIONING_ABSOLUTE
See Also:
Constant Field Values

POSITIONING_RELATIVE

public static final int POSITIONING_RELATIVE
See Also:
Constant Field Values

STYLE_BOTTOM

public static final java.lang.String STYLE_BOTTOM
A style constant for the Bottom property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_LEFT

public static final java.lang.String STYLE_LEFT
A style constant for the Left property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_POSITIONING

public static final java.lang.String STYLE_POSITIONING
A style constant for the Positioning property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_RIGHT

public static final java.lang.String STYLE_RIGHT
A style constant for the Right property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_TOP

public static final java.lang.String STYLE_TOP
A style constant for the Top property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_ZINDEX

public static final java.lang.String STYLE_ZINDEX
A style constant for the zIndex property. Values of this key must be of type int

See Also:
Constant Field Values

POSITION_CHANGED_PROPERTY

public static final java.lang.String POSITION_CHANGED_PROPERTY
This property name is fired when any of the positioning elements change (ie. top, left, bottom, left, zindex, positioning)

See Also:
Constant Field Values

positioningSymbolics

public static final SymbolicValue[] positioningSymbolics
Helper static SymbolicValue[] - Positionable positioning Symbolics


undefinedSymbolic

public static final SymbolicValue[] undefinedSymbolic
Helper static SymbolicValue[] - UNDEFINED Symbolic

Method Detail

applyStyle

public void applyStyle(nextapp.echo.Style style)
See Also:
Component.applyStyle(nextapp.echo.Style)

clearPositioning

public void clearPositioning()
This should sets all the positioning attributes (left,top,right,bottom,z-index) to Integer.MAX.


getBottom

public int getBottom()
Returns the bottom Y position of the component


getLeft

public int getLeft()
Returns the left X position of the component


getPositioning

public int getPositioning()
This can be one of :


getRight

public int getRight()
Returns the right X position of the component


getTop

public int getTop()
Returns the top Y position of the component


getzIndex

public int getzIndex()
Returns the z-index of the component


isPositioned

public boolean isPositioned()
This returns true if any positioning is in place


setBottom

public void setBottom(int newValue)
Sets the bottom Y position of the component


setLeft

public void setLeft(int newValue)
Set the left X position of the component


setPositioning

public void setPositioning(int newPositioning)
Sets the positioning of the component This can be one of :


setRight

public void setRight(int newValue)
Sets the right X position of the component


setTop

public void setTop(int newValue)
Sets the top Y position of the component


setzIndex

public void setzIndex(int newValue)
Sets the z-index of the component


EchoPoint
1.0