EchoPoint API - 3.0.0b5
App Webcontainer

echopoint.able
Interface Positionable

All Superinterfaces:
Delegateable
All Known Implementing Classes:
CarouselContainer, ContainerEx, SlidingMenu, TooltipContainer

public interface Positionable
extends Delegateable

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_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.

If the Positioning is POSITIONING_ABSOLUTE, then the component is positioned at an absolute point outside the normal flow of layout. The left, top, right and bottom properties can be used to position the component.

If the Positioning is POSITIONING_FIXED, 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.

Left, Top, Right, Bottom

Typically you would set the Left and Top properties in order to get a Positionable to a specified location. However you can also use the Right and Bottom properties.

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.

A convenience method called clearPositioning() is provided 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 's.

If no zIndex is to apply then the Integer.MIN_VALUE can be used in which case no zIndex will be set.


Field Summary
static int ABSOLUTE
          The Positionable's position (and possibly size) is specified with the 'top', 'right', 'bottom', and 'left' properties.
static int FIXED
          The Positionable's position is calculated according to the 'absolute' model, but in addition, the Positionable is fixed with respect to the viewport and doesn't move when scrolled.
static String PROPERTY_BOTTOM
           
static String PROPERTY_LEFT
           
static String PROPERTY_POSITION
           
static String PROPERTY_RIGHT
           
static String PROPERTY_TOP
           
static String PROPERTY_Z_INDEX
           
static int RELATIVE
          The Positionable's position is calculated according to the normal flow.
static int STATIC
          The Positionable is a normal Positionable, laid out according to the normal flow.
 
Method Summary
 void clear()
          This sets all the positioning attributes (left,top,right,bottom,z-index) to null or zero.
 Extent getBottom()
          Returns the bottom Y position of the component
 Extent getLeft()
          Returns the left X position of the component
 int getPosition()
          This can be one of : POSITIONING_STATIC POSITIONING_RELATIVE POSITIONING_ABSOLUTE POSITIONING_FIXED
 Extent getRight()
          Returns the right X position of the component
 Extent 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 other than normal flow ie.
 void setBottom(Extent newValue)
          Sets the bottom Y position of the component
 void setLeft(Extent newValue)
          Set the left X position of the component
 void setPosition(int newPositioning)
          Sets the position of the component This can be one of : POSITIONING_STATIC POSITIONING_RELATIVE POSITIONING_ABSOLUTE POSITIONING_FIXED
 void setRight(Extent newValue)
          Sets the right X position of the component
 void setTop(Extent newValue)
          Sets the top Y position of the component
 void setZIndex(int newValue)
          Sets the z-index of the component
 
Methods inherited from interface echopoint.able.Delegateable
getRenderProperty, getRenderProperty
 

Field Detail

STATIC

static final int STATIC
The Positionable is a normal Positionable, laid out according to the normal flow.

See Also:
Constant Field Values

ABSOLUTE

static final int ABSOLUTE
The Positionable's position (and possibly size) is specified with the 'top', 'right', 'bottom', and 'left' properties. These properties specify offsets with respect to the Positionable's containing Positionable. Absolutely positioned Positionables are taken out of the normal flow. This means they have no impact on the layout of later siblings.

See Also:
Constant Field Values

RELATIVE

static final int RELATIVE
The Positionable's position is calculated according to the normal flow. Then the Positionable is offset relative to its normal position.

See Also:
Constant Field Values

FIXED

static final int FIXED
The Positionable's position is calculated according to the 'absolute' model, but in addition, the Positionable is fixed with respect to the viewport and doesn't move when scrolled.

See Also:
Constant Field Values

PROPERTY_BOTTOM

static final String PROPERTY_BOTTOM
See Also:
Constant Field Values

PROPERTY_LEFT

static final String PROPERTY_LEFT
See Also:
Constant Field Values

PROPERTY_POSITION

static final String PROPERTY_POSITION
See Also:
Constant Field Values

PROPERTY_RIGHT

static final String PROPERTY_RIGHT
See Also:
Constant Field Values

PROPERTY_TOP

static final String PROPERTY_TOP
See Also:
Constant Field Values

PROPERTY_Z_INDEX

static final String PROPERTY_Z_INDEX
See Also:
Constant Field Values
Method Detail

clear

void clear()
This sets all the positioning attributes (left,top,right,bottom,z-index) to null or zero.


getBottom

Extent getBottom()
Returns the bottom Y position of the component


getLeft

Extent getLeft()
Returns the left X position of the component


getPosition

int getPosition()
This can be one of :


getRight

Extent getRight()
Returns the right X position of the component


getTop

Extent getTop()
Returns the top Y position of the component


getZIndex

int getZIndex()
Returns the z-index of the component


isPositioned

boolean isPositioned()
This returns true if any positioning is in place other than normal flow ie. STATIC.


setBottom

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


setLeft

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


setPosition

void setPosition(int newPositioning)
Sets the position of the component This can be one of :


setRight

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


setTop

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


setZIndex

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


EchoPoint API - 3.0.0b5
App Webcontainer