echopointng.layout
Class DisplayLayoutData

java.lang.Object
  extended by echopointng.layout.DisplayLayoutData
All Implemented Interfaces:
Alignable, BackgroundImageable, Borderable, Delegateable, Heightable, Insetable, MouseCursorable, Positionable, Sizeable, Widthable, java.io.Serializable, LayoutData
Direct Known Subclasses:
ScrollableDisplayLayoutData

public class DisplayLayoutData
extends java.lang.Object
implements LayoutData, java.io.Serializable, Positionable, Sizeable, MouseCursorable, Insetable, Borderable, Alignable, BackgroundImageable

DisplayLayoutData is used to specify special display information for a child component. This class allows its parent container to "position" the child component without the child component having to have to support the various echopointng.able interfaces.

IMPLEMENTATION

Parent components that support the use of DisplayLayoutData, such as ContainerEx, use it to produce a "mini" container around the component. The properties specified in the DisplayLayoutData are then used to control this "mini" container not the child component itself. So for example the MouseCursorable properties are set on the "mini" container even if the contained child component does not implement the MouseCursorable interface.

Remember a single instance of DisplayLayoutData can be used on many components and hence memory can be saved.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface echopointng.able.Positionable
ABSOLUTE, FIXED, PROPERTY_BOTTOM, PROPERTY_LEFT, PROPERTY_POSITION, PROPERTY_RIGHT, PROPERTY_TOP, PROPERTY_ZINDEX, RELATIVE, STATIC
 
Fields inherited from interface echopointng.able.Widthable
PROPERTY_WIDTH
 
Fields inherited from interface echopointng.able.Heightable
PROPERTY_HEIGHT
 
Fields inherited from interface echopointng.able.MouseCursorable
CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, PROPERTY_MOUSE_CURSOR, PROPERTY_MOUSE_CURSOR_URI
 
Fields inherited from interface echopointng.able.Insetable
DEFAULT_INSETS, DEFAULT_OUTSETS, PROPERTY_INSETS, PROPERTY_OUTSETS
 
Fields inherited from interface echopointng.able.Borderable
PROPERTY_BORDER
 
Fields inherited from interface echopointng.able.Alignable
PROPERTY_ALIGNMENT
 
Fields inherited from interface echopointng.able.BackgroundImageable
PROPERTY_BACKGROUND_IMAGE
 
Constructor Summary
DisplayLayoutData()
           
 
Method Summary
 void clear()
          This sets all the positioning attributes (left,top,right,bottom,z-index) to null or zero.
 Alignment getAlignment()
          Returns the alignment of the cell.
 Color getBackground()
          Returns the default/base background color of the DisplayLayoutData.
 FillImage getBackgroundImage()
          Returns the background image of the cell.
 Border getBorder()
           
 Extent getBottom()
          Returns the bottom Y position of the component
 Font getFont()
          Returns the default/base font of the DisplayLayoutData.
 Color getForeground()
          Returns the default/base foreground color of the DisplayLayoutData.
 Extent getHeight()
          Retutns the height extent of the Heightable.
 Insets getInsets()
           
 Extent getLeft()
          Returns the left X position of the component
 int getMouseCursor()
          Returns the current mouse cursor in use.
 java.lang.String getMouseCursorURI()
           
 Insets getOutsets()
           
 int getPosition()
          This can be one of : POSITIONING_STATIC POSITIONING_RELATIVE POSITIONING_ABSOLUTE POSITIONING_FIXED
protected  java.lang.Object getProperty(java.lang.String propertyName)
           
protected  boolean getProperty(java.lang.String propertyName, boolean defaultValue)
           
protected  int getProperty(java.lang.String propertyName, int defaultValue)
           
 java.lang.Object getRenderProperty(java.lang.String propertyName)
          Retutns the rendered value of a property.
 java.lang.Object getRenderProperty(java.lang.String propertyName, java.lang.Object defaultValue)
          Returns the rendered value of a property or a default value if its found to be null.
 Extent getRight()
          Returns the right X position of the component
 Extent getTop()
          Returns the top Y position of the component
 Extent getWidth()
          Returns the width extent of the Widthable.
 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 setAlignment(Alignment newValue)
          Sets the alignment of the cell.
 void setBackground(Color newValue)
          Sets the default background color of the DisplayLayoutData.
 void setBackgroundImage(FillImage newValue)
          Sets the background image of the cell.
 void setBorder(Border newValue)
          Sets the Border to be used by the Borderable
 void setBottom(Extent newValue)
          Sets the bottom Y position of the component
 void setFont(Font newValue)
          Sets the default text font of the DisplayLayoutData.
 void setForeground(Color newValue)
          Sets the default foreground color of the DisplayLayoutData.
 void setHeight(Extent newValue)
          Sets the height extent of the Heightable.
 void setInsets(Insets newValue)
          Sets the Insets in play.
 void setLeft(Extent newValue)
          Set the left X position of the component
 void setMouseCursor(int mouseCursor)
          Sets the mouse cursor to use.
 void setMouseCursorURI(java.lang.String mouseCursorURI)
          Sets the URI to a custom platform mouse cursor.
 void setOutsets(Insets newValue)
          Sets the Outsets in play.
 void setPosition(int newPositioning)
          Sets the position of the component This can be one of : POSITIONING_STATIC POSITIONING_RELATIVE POSITIONING_ABSOLUTE POSITIONING_FIXED
protected  void setProperty(java.lang.String propertyName, boolean newValue)
           
protected  void setProperty(java.lang.String propertyName, int newValue)
           
protected  void setProperty(java.lang.String propertyName, java.lang.Object newValue)
           
 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 setWidth(Extent newValue)
          Sets the width extent of the Widthable.
 void setZIndex(int newValue)
          Sets the z-index of the component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisplayLayoutData

public DisplayLayoutData()
Method Detail

clear

public void clear()
Description copied from interface: Positionable
This sets all the positioning attributes (left,top,right,bottom,z-index) to null or zero.

Specified by:
clear in interface Positionable
See Also:
Positionable.clear()

getBackground

public Color getBackground()
Returns the default/base background color of the DisplayLayoutData.

Returns:
the background color

getBorder

public Border getBorder()
Specified by:
getBorder in interface Borderable
Returns:
The Border of the Borderable.
See Also:
Borderable.getBorder()

getBottom

public Extent getBottom()
Description copied from interface: Positionable
Returns the bottom Y position of the component

Specified by:
getBottom in interface Positionable
See Also:
Positionable.getBottom()

getFont

public Font getFont()
Returns the default/base font of the DisplayLayoutData.

Returns:
the font

getForeground

public Color getForeground()
Returns the default/base foreground color of the DisplayLayoutData.

Returns:
the foreground color

getHeight

public Extent getHeight()
Description copied from interface: Heightable
Retutns the height extent of the Heightable.

Specified by:
getHeight in interface Heightable
Returns:
the height extent of the Heightable.
See Also:
Heightable.getHeight()

getInsets

public Insets getInsets()
Specified by:
getInsets in interface Insetable
Returns:
the Insets in use or null if here are none
See Also:
Insetable.getInsets()

getLeft

public Extent getLeft()
Description copied from interface: Positionable
Returns the left X position of the component

Specified by:
getLeft in interface Positionable
See Also:
Positionable.getLeft()

getMouseCursor

public int getMouseCursor()
Description copied from interface: MouseCursorable
Returns the current mouse cursor in use. This will be one of the following values.

Specified by:
getMouseCursor in interface MouseCursorable
Returns:
The current mouse cursor in use.
See Also:
MouseCursorable.getMouseCursor()

getMouseCursorURI

public java.lang.String getMouseCursorURI()
Specified by:
getMouseCursorURI in interface MouseCursorable
Returns:
The custom URI for the mouse cursor or null
See Also:
MouseCursorable.getMouseCursorURI()

getOutsets

public Insets getOutsets()
Specified by:
getOutsets in interface Insetable
Returns:
the Outsets in use or null if here are none
See Also:
Insetable.getOutsets()

getPosition

public int getPosition()
Description copied from interface: Positionable
This can be one of :

Specified by:
getPosition in interface Positionable
See Also:
Positionable.getPosition()

getProperty

protected java.lang.Object getProperty(java.lang.String propertyName)

getProperty

protected boolean getProperty(java.lang.String propertyName,
                              boolean defaultValue)

getProperty

protected int getProperty(java.lang.String propertyName,
                          int defaultValue)

getRenderProperty

public java.lang.Object getRenderProperty(java.lang.String propertyName)
Description copied from interface: Delegateable
Retutns the rendered value of a property.

Specified by:
getRenderProperty in interface Delegateable
Parameters:
propertyName - - the named of as property as defined by this interface
Returns:
the rendered value of a property
See Also:
Delegateable.getRenderProperty(java.lang.String)

getRenderProperty

public java.lang.Object getRenderProperty(java.lang.String propertyName,
                                          java.lang.Object defaultValue)
Description copied from interface: Delegateable
Returns the rendered value of a property or a default value if its found to be null.

Specified by:
getRenderProperty in interface Delegateable
Parameters:
propertyName - - the named of as property as defined by this interface
defaultValue - - the default value if the property is null
Returns:
the rendered value of a property or a default value if its found to be null
See Also:
Delegateable.getRenderProperty(java.lang.String, java.lang.Object)

getRight

public Extent getRight()
Description copied from interface: Positionable
Returns the right X position of the component

Specified by:
getRight in interface Positionable
See Also:
Positionable.getRight()

getTop

public Extent getTop()
Description copied from interface: Positionable
Returns the top Y position of the component

Specified by:
getTop in interface Positionable
See Also:
Positionable.getTop()

getWidth

public Extent getWidth()
Description copied from interface: Widthable
Returns the width extent of the Widthable.

Specified by:
getWidth in interface Widthable
Returns:
the width extent of the Widthable.
See Also:
Widthable.getWidth()

getZindex

public int getZindex()
Description copied from interface: Positionable
Returns the z-index of the component

Specified by:
getZindex in interface Positionable
See Also:
Positionable.getZindex()

isPositioned

public boolean isPositioned()
Description copied from interface: Positionable
This returns true if any positioning is in place other than normal flow ie. STATIC.

Specified by:
isPositioned in interface Positionable
See Also:
Positionable.isPositioned()

setBackground

public void setBackground(Color newValue)
Sets the default background color of the DisplayLayoutData.

Parameters:
newValue - the new background Color

setBorder

public void setBorder(Border newValue)
Description copied from interface: Borderable
Sets the Border to be used by the Borderable

Specified by:
setBorder in interface Borderable
Parameters:
newValue - - the new Border to use
See Also:
Borderable.setBorder(nextapp.echo2.app.Border)

setBottom

public void setBottom(Extent newValue)
Description copied from interface: Positionable
Sets the bottom Y position of the component

Specified by:
setBottom in interface Positionable
See Also:
Positionable.setBottom(nextapp.echo2.app.Extent)

setFont

public void setFont(Font newValue)
Sets the default text font of the DisplayLayoutData.

Parameters:
newValue - the new Font

setForeground

public void setForeground(Color newValue)
Sets the default foreground color of the DisplayLayoutData.

Parameters:
newValue - the new foreground Color

setHeight

public void setHeight(Extent newValue)
Description copied from interface: Heightable
Sets the height extent of the Heightable.

Specified by:
setHeight in interface Heightable
Parameters:
newValue - - the new height extent of the Heightable
See Also:
Heightable.setHeight(nextapp.echo2.app.Extent)

setInsets

public void setInsets(Insets newValue)
Description copied from interface: Insetable
Sets the Insets in play. The Insets control the extra space around the content of a container.

Specified by:
setInsets in interface Insetable
Parameters:
newValue - - the Insets to use
See Also:
Insetable.setInsets(nextapp.echo2.app.Insets)

setLeft

public void setLeft(Extent newValue)
Description copied from interface: Positionable
Set the left X position of the component

Specified by:
setLeft in interface Positionable
See Also:
Positionable.setLeft(nextapp.echo2.app.Extent)

setMouseCursor

public void setMouseCursor(int mouseCursor)
Description copied from interface: MouseCursorable
Sets the mouse cursor to use. This will be one of the following values.

Specified by:
setMouseCursor in interface MouseCursorable
Parameters:
mouseCursor - - the mouse cursor to use
See Also:
MouseCursorable.setMouseCursor(int)

setMouseCursorURI

public void setMouseCursorURI(java.lang.String mouseCursorURI)
Description copied from interface: MouseCursorable
Sets the URI to a custom platform mouse cursor. This will only be used if the mosue cusor is set to CURSOR_CUSTOM.

Specified by:
setMouseCursorURI in interface MouseCursorable
Parameters:
mouseCursorURI - the URI to a custom platform mouse cursor.
See Also:
MouseCursorable.setMouseCursorURI(java.lang.String)

setOutsets

public void setOutsets(Insets newValue)
Description copied from interface: Insetable
Sets the Outsets in play. The Outsets control the extra space around the outside of a container.

Specified by:
setOutsets in interface Insetable
Parameters:
newValue - - the Ousets to use
See Also:
Insetable.setOutsets(nextapp.echo2.app.Insets)

setPosition

public void setPosition(int newPositioning)
Description copied from interface: Positionable
Sets the position of the component This can be one of :

Specified by:
setPosition in interface Positionable
See Also:
Positionable.setPosition(int)

setProperty

protected void setProperty(java.lang.String propertyName,
                           boolean newValue)

setProperty

protected void setProperty(java.lang.String propertyName,
                           int newValue)

setProperty

protected void setProperty(java.lang.String propertyName,
                           java.lang.Object newValue)

setRight

public void setRight(Extent newValue)
Description copied from interface: Positionable
Sets the right X position of the component

Specified by:
setRight in interface Positionable
See Also:
Positionable.setRight(nextapp.echo2.app.Extent)

setTop

public void setTop(Extent newValue)
Description copied from interface: Positionable
Sets the top Y position of the component

Specified by:
setTop in interface Positionable
See Also:
Positionable.setTop(nextapp.echo2.app.Extent)

setWidth

public void setWidth(Extent newValue)
Description copied from interface: Widthable
Sets the width extent of the Widthable.

Specified by:
setWidth in interface Widthable
Parameters:
newValue - - the new width extent of the Widthable
See Also:
Widthable.setWidth(nextapp.echo2.app.Extent)

setZIndex

public void setZIndex(int newValue)
Description copied from interface: Positionable
Sets the z-index of the component

Specified by:
setZIndex in interface Positionable
See Also:
Positionable.setZIndex(int)

getAlignment

public Alignment getAlignment()
Returns the alignment of the cell.

Specified by:
getAlignment in interface Alignable
Returns:
the alignment

getBackgroundImage

public FillImage getBackgroundImage()
Returns the background image of the cell.

Specified by:
getBackgroundImage in interface BackgroundImageable
Returns:
the background image

setAlignment

public void setAlignment(Alignment newValue)
Sets the alignment of the cell.

Specified by:
setAlignment in interface Alignable
Parameters:
newValue - the new alignment

setBackgroundImage

public void setBackgroundImage(FillImage newValue)
Sets the background image of the cell.

Specified by:
setBackgroundImage in interface BackgroundImageable
Parameters:
newValue - the new background image