EchoPoint API - 3.0.0b5
App Webcontainer

echopoint
Class ContainerEx

java.lang.Object
  extended by nextapp.echo.app.Component
      extended by echopoint.ComponentEx
          extended by echopoint.AbleComponent
              extended by echopoint.ContainerEx
All Implemented Interfaces:
AccessKeyable, Alignable, Attributeable, BackgroundImageable, Borderable, Delegateable, Heightable, Insetable, MouseCursorable, Positionable, Scrollable, Sizeable, Stretchable, ToolTipable, Widthable, Serializable, PaneContainer, RenderIdSupport
Direct Known Subclasses:
CarouselContainer

public class ContainerEx
extends AbleComponent
implements Alignable, PaneContainer, Positionable, Scrollable, BackgroundImageable, Stretchable

ContainerEx is a component that can be positioned anywhere on the screen with an specified size attributes. By default, the children of ContainerEx are layed out one after the other, left to right and without any other specified processing. Therefore to get more precise layout within the ContainerEx, you may want to consider using a Column/Row/Grid as the child of this component or you can associated a DisplayLayoutData object with each child component and use that to position the children where you want. This component is a PaneContainer and hence can have components that implement Pane as a child. However many Panes, such as SplitPane, require a definite height to be set in order to work properly. So make sure you call setHeight() if one of the children implements Pane

Version:
$Id: ContainerEx.java 169 2009-04-29 11:33:34Z hansho $
Author:
Brad Baker

Modified by Hans Holmlund 2009-04-20

See Also:
Serialized Form

Field Summary
static int COLUMN_LAYOUT
           
static int DEFAULT_LAYOUT
           
static String PROPERTY_HORIZONTAL_SCROLL
           
static String PROPERTY_LAYOUT_STYLE
           
static String PROPERTY_VERTICAL_SCROLL
           
static int ROW_LAYOUT
           
 
Fields inherited from class echopoint.ComponentEx
PROPERTY_HIDDEN
 
Fields inherited from class nextapp.echo.app.Component
CHILD_VISIBLE_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_NEXT_ID_CHANGED_PROPERTY, FOCUS_PREVIOUS_ID_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Fields inherited from interface echopoint.able.Alignable
PROPERTY_ALIGNMENT
 
Fields inherited from interface echopoint.able.Positionable
ABSOLUTE, FIXED, PROPERTY_BOTTOM, PROPERTY_LEFT, PROPERTY_POSITION, PROPERTY_RIGHT, PROPERTY_TOP, PROPERTY_Z_INDEX, RELATIVE, STATIC
 
Fields inherited from interface echopoint.able.Scrollable
ALWAYS, AUTO, CLIPHIDE, NEVER, PROPERTY_SCROLL_BAR_BASE_COLOR, PROPERTY_SCROLL_BAR_POLICY, PROPERTY_SCROLL_BAR_PROPERTIES, UNDEFINED
 
Fields inherited from interface echopoint.able.Widthable
PROPERTY_WIDTH
 
Fields inherited from interface echopoint.able.Heightable
PROPERTY_HEIGHT
 
Fields inherited from interface echopoint.able.BackgroundImageable
PROPERTY_BACKGROUND_IMAGE
 
Fields inherited from interface echopoint.able.Stretchable
PROPERTY_HEIGHT_STRETCHED, PROPERTY_MAXIMUM_STRETCHED_HEIGHT, PROPERTY_MINIMUM_STRETCHED_HEIGHT
 
Fields inherited from interface echopoint.able.AccessKeyable
PROPERTY_ACCESS_KEY
 
Fields inherited from interface echopoint.able.Borderable
PROPERTY_BORDER
 
Fields inherited from interface echopoint.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 echopoint.able.Insetable
DEFAULT_INSETS, DEFAULT_OUTSETS, PROPERTY_INSETS, PROPERTY_OUTSETS
 
Fields inherited from interface echopoint.able.ToolTipable
PROPERTY_TOOL_TIP_TEXT
 
Constructor Summary
ContainerEx()
          Creates a new ContentPane.
 
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 container.
 FillImage getBackgroundImage()
          Returns the background image.
 Border getBorder()
          Returns the Border that encloses the entire Clock.
 Extent getBottom()
          Returns the bottom Y position of the component
 Extent getHeight()
          Returns the height extent of container.
 Extent getHorizontalScroll()
          Returns the horizontal scrollbar position.
 Insets getInsets()
          Returns the inset margin of the content.
 int getLayoutStyle()
           
 Extent getLeft()
          Returns the left X position of the component
 Extent getMaximumStretchedHeight()
           
 Extent getMinimumStretchedHeight()
           
 Insets getOutsets()
           
 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
 Color getScrollBarBaseColor()
          todo Returns the base color of the ScrollBarProperties associated with this Scrollable
 int getScrollBarPolicy()
          Returns the ScrollBarPolicy in place This can be one of : NONE ALWAYS AUTO CLIPHIDE
 ScrollBarProperties getScrollBarProperties()
          todo Returns the ScrollBarProperties associated with this Scrollable
 Extent getTop()
          Returns the top Y position of the component
 Extent getVerticalScroll()
          Returns the vertical scrollbar position.
 Extent getWidth()
          Returns the width extent of the container.
 int getZIndex()
          Returns the z-index of the component
 boolean isHeightStretched()
           
 boolean isPositioned()
          This returns true if any positioning is in place other than normal flow ie.
 void processInput(String inputName, Object inputValue)
           
 void setAlignment(Alignment newValue)
          Sets the alignment of the container.
 void setBackgroundImage(FillImage newValue)
          Sets the background image.
 void setBorder(Border newValue)
          Sets the Border that encloses the entire Clock.
 void setBottom(Extent newValue)
          Sets the bottom Y position of the component
 void setHeight(Extent newValue)
          Sets the height extent of the container.
 void setHeightStretched(boolean newValue)
          Set to true if the height should be stretched to use all available space of its parent.
 void setHorizontalScroll(Extent newValue)
          Sets the horizontal scrollbar position.
 void setInsets(Insets newValue)
          Sets the inset margin of the content.
 void setLayoutStyle(int layoutStyle)
           
 void setLeft(Extent newValue)
          Set the left X position of the component
 void setMaximumStretchedHeight(Extent newValue)
          Sets the maximum height that the component should stretch itself up to in pixels.
 void setMinimumStretchedHeight(Extent newValue)
          Sets the minimum height that the component should stretch itself down to in pixels.
 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
 void setRight(Extent newValue)
          Sets the right X position of the component
 void setScrollBarBaseColor(Color newValue)
          todo Sets the base color of the ScrollBarProperties associated with this Scrollable.
 void setScrollBarPolicy(int newScrollBarPolicy)
          Sets the scroll bar policy of the component This can be one of : SCOLLBARS_NONE SCOLLBARS_ALWAYS SCOLLBARS_AUTO CLIPHIDE
 void setScrollBarProperties(ScrollBarProperties newValue)
          todo Sets the ScrollBarProperties associated with this Scrollable
 void setTop(Extent newValue)
          Sets the top Y position of the component
 void setVerticalScroll(Extent newValue)
          Sets the vertical scrollbar position.
 void setWidth(Extent newValue)
          Sets the width extent of the container.
 void setZIndex(int newValue)
          Sets the z-index of the component
 
Methods inherited from class echopoint.AbleComponent
getAccessKey, getMouseCursor, getMouseCursorUri, getToolTipText, setAccessKey, setMouseCursor, setMouseCursorUri, setToolTipText
 
Methods inherited from class echopoint.ComponentEx
get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getAttribute, getAttributeNames, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, isHidden, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setAttribute, setHidden
 
Methods inherited from class nextapp.echo.app.Component
add, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, get, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusNextId, getFocusPreviousId, getFont, getForeground, getId, getIndex, getLayoutData, getLayoutDirection, getLocale, getLocalStyle, getParent, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, set, setBackground, setComponents, setEnabled, setFocusNextId, setFocusPreviousId, setFocusTraversalParticipant, setFont, setForeground, setId, setIndex, setLayoutData, setLayoutDirection, setLocale, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface echopoint.able.Delegateable
getRenderProperty, getRenderProperty
 

Field Detail

PROPERTY_HORIZONTAL_SCROLL

public static final String PROPERTY_HORIZONTAL_SCROLL
See Also:
Constant Field Values

PROPERTY_VERTICAL_SCROLL

public static final String PROPERTY_VERTICAL_SCROLL
See Also:
Constant Field Values

PROPERTY_LAYOUT_STYLE

public static final String PROPERTY_LAYOUT_STYLE
See Also:
Constant Field Values

DEFAULT_LAYOUT

public static final int DEFAULT_LAYOUT
See Also:
Constant Field Values

COLUMN_LAYOUT

public static final int COLUMN_LAYOUT
See Also:
Constant Field Values

ROW_LAYOUT

public static final int ROW_LAYOUT
See Also:
Constant Field Values
Constructor Detail

ContainerEx

public ContainerEx()
Creates a new ContentPane.

Method Detail

clear

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

Specified by:
clear in interface Positionable

getBottom

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

Specified by:
getBottom in interface Positionable

getLeft

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

Specified by:
getLeft in interface Positionable

getPosition

public int getPosition()
This can be one of :

Specified by:
getPosition in interface Positionable

getRight

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

Specified by:
getRight in interface Positionable

getTop

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

Specified by:
getTop in interface Positionable

getZIndex

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

Specified by:
getZIndex in interface Positionable

isPositioned

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

Specified by:
isPositioned in interface Positionable

setBottom

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

Specified by:
setBottom in interface Positionable

setLeft

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

Specified by:
setLeft in interface Positionable

setPosition

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

Specified by:
setPosition in interface Positionable

setRight

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

Specified by:
setRight in interface Positionable

setTop

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

Specified by:
setTop in interface Positionable

setZIndex

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

Specified by:
setZIndex in interface Positionable

getBorder

public Border getBorder()
Returns the Border that encloses the entire Clock.

Specified by:
getBorder in interface Borderable
Overrides:
getBorder in class AbleComponent
Returns:
the border
See Also:
Borderable.getBorder()

setBorder

public void setBorder(Border newValue)
Sets the Border that encloses the entire Clock.

Specified by:
setBorder in interface Borderable
Overrides:
setBorder in class AbleComponent
Parameters:
newValue - the new border
See Also:
Borderable.setBorder(nextapp.echo.app.Border)

getBackgroundImage

public FillImage getBackgroundImage()
Returns the background image.

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

getHorizontalScroll

public Extent getHorizontalScroll()
Returns the horizontal scrollbar position. todo

Returns:
the horizontal scrollbar position

getInsets

public Insets getInsets()
Returns the inset margin of the content. Note that FloatingPanes, such as WindowPanes, will NOT be constrained by this margin. Values may only be specified in pixel-based units.

Specified by:
getInsets in interface Insetable
Overrides:
getInsets in class AbleComponent
Returns:
newValue the inset margin
See Also:
Insetable.getInsets()

getVerticalScroll

public Extent getVerticalScroll()
Returns the vertical scrollbar position. todo

Returns:
the vertical scrollbar position

processInput

public void processInput(String inputName,
                         Object inputValue)
Overrides:
processInput in class Component
See Also:
Component.processInput(java.lang.String, java.lang.Object)

setBackgroundImage

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

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

setHorizontalScroll

public void setHorizontalScroll(Extent newValue)
Sets the horizontal scrollbar position. Values must be in pixel units. A value of -1px indicates that the scrollbar should be positioned at the end of the range.

Parameters:
newValue - the new horizontal scrollbar position

setInsets

public void setInsets(Insets newValue)
Sets the inset margin of the content. Note that FloatingPanes, such as WindowPanes, will NOT be constrained by this margin. Values may only be specified in pixel-based units.

Specified by:
setInsets in interface Insetable
Overrides:
setInsets in class AbleComponent
Parameters:
newValue - the new inset margin
See Also:
Insetable.setInsets(nextapp.echo.app.Insets)

setVerticalScroll

public void setVerticalScroll(Extent newValue)
Sets the vertical scrollbar position. Values must be in pixel units. A value of -1px indicates that the scrollbar should be positioned at the end of the range.

Parameters:
newValue - the new vertical scrollbar position

getHeight

public Extent getHeight()
Returns the height extent of container.

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

getOutsets

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

getWidth

public Extent getWidth()
Returns the width extent of the container.

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

setHeight

public void setHeight(Extent newValue)
Sets the height extent of the container.

Specified by:
setHeight in interface Heightable
Overrides:
setHeight in class AbleComponent
Parameters:
newValue - - the new height extent of the container
See Also:
Heightable.setHeight(nextapp.echo.app.Extent)

setOutsets

public void setOutsets(Insets newValue)
Sets the Outsets in play. The Outsets control the extra space around the outside of a container.

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

setWidth

public void setWidth(Extent newValue)
Sets the width extent of the container.

Specified by:
setWidth in interface Widthable
Overrides:
setWidth in class AbleComponent
Parameters:
newValue - - the new width extent of the container
See Also:
Widthable.setWidth(nextapp.echo.app.Extent)

getScrollBarPolicy

public int getScrollBarPolicy()
Returns the ScrollBarPolicy in place This can be one of :

Specified by:
getScrollBarPolicy in interface Scrollable

getScrollBarBaseColor

public Color getScrollBarBaseColor()
todo Returns the base color of the ScrollBarProperties associated with this Scrollable

Specified by:
getScrollBarBaseColor in interface Scrollable
Returns:
the base color of the ScrollBarProperties associated with this Scrollable

getScrollBarProperties

public ScrollBarProperties getScrollBarProperties()
todo Returns the ScrollBarProperties associated with this Scrollable

Specified by:
getScrollBarProperties in interface Scrollable
Returns:
the ScrollBarProperties associated with this Scrollable

setScrollBarPolicy

public void setScrollBarPolicy(int newScrollBarPolicy)
Sets the scroll bar policy of the component This can be one of :

Specified by:
setScrollBarPolicy in interface Scrollable

setScrollBarBaseColor

public void setScrollBarBaseColor(Color newValue)
todo Sets the base color of the ScrollBarProperties associated with this Scrollable. If no ScrollBarProperties is available, then a new one should be created.

Specified by:
setScrollBarBaseColor in interface Scrollable
Parameters:
newValue - - the new base color of ScrollBarProperties to use

setScrollBarProperties

public void setScrollBarProperties(ScrollBarProperties newValue)
todo Sets the ScrollBarProperties associated with this Scrollable

Specified by:
setScrollBarProperties in interface Scrollable
Parameters:
newValue - - the new ScrollBarProperties to use

isHeightStretched

public boolean isHeightStretched()
Specified by:
isHeightStretched in interface Stretchable
Returns:
true if the height should be stretched to use all available space of its parent.

setHeightStretched

public void setHeightStretched(boolean newValue)
Set to true if the height should be stretched to use all available space of its parent.

Specified by:
setHeightStretched in interface Stretchable
Parameters:
newValue - - a boolean flag indicating whether the height should be stretched to use all available space of its parent or not.

getMinimumStretchedHeight

public Extent getMinimumStretchedHeight()
Specified by:
getMinimumStretchedHeight in interface Stretchable
Returns:
- the minimum height that the component should stretch itself down to in pixels.

setMinimumStretchedHeight

public void setMinimumStretchedHeight(Extent newValue)
Sets the minimum height that the component should stretch itself down to in pixels.

Specified by:
setMinimumStretchedHeight in interface Stretchable
Parameters:
newValue - - a new Extent value that MUST be in pixel units.

getMaximumStretchedHeight

public Extent getMaximumStretchedHeight()
Specified by:
getMaximumStretchedHeight in interface Stretchable
Returns:
- the maximum height that the component should stretch itself up to in pixels.

setMaximumStretchedHeight

public void setMaximumStretchedHeight(Extent newValue)
Sets the maximum height that the component should stretch itself up to in pixels.

Specified by:
setMaximumStretchedHeight in interface Stretchable
Parameters:
newValue - - a new Extent value that MUST be in pixel units.

getLayoutStyle

public int getLayoutStyle()

setLayoutStyle

public void setLayoutStyle(int layoutStyle)

getAlignment

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

Specified by:
getAlignment in interface Alignable
Returns:
the alignment

setAlignment

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

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

EchoPoint API - 3.0.0b5
App Webcontainer