NextApp Echo
1.1.4

nextapp.echo
Class ContainerPane

java.lang.Object
  extended bynextapp.echo.Component
      extended bynextapp.echo.AbstractPane
          extended bynextapp.echo.ContainerPane
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
StackedPane

public class ContainerPane
extends AbstractPane

A container used to lay out panes within a window.

Only AbstractPanes, e.g. ContainerPanes, ContentPanes, and HttpPanes may be added as children to a ContainerPane. Adding components that do not subclass AbstractPane will result in undocumented behavior.

ContainerPanes may only be added as children to Windows and other ContainerPanes.

See Also:
Serialized Form

Field Summary
static java.lang.String CONTENT_CHANGED_PROPERTY
           
private  int orientation
           
static java.lang.String ORIENTATION_CHANGED_PROPERTY
           
static int ORIENTATION_HORIZONTAL
          Describes a horizontally oriented pane whose child panes are laid out left to right.
static int ORIENTATION_VERTICAL
          Describes a vertically oriented pane whose child panes are laid out top to bottom.
static java.lang.String PREFERRED_HEIGHT_CHANGED_PROPERTY
           
static java.lang.String PREFERRED_HEIGHT_EXTENT_CHANGED_PROPERTY
           
static java.lang.String PREFERRED_WIDTH_CHANGED_PROPERTY
           
static java.lang.String PREFERRED_WIDTH_EXTENT_CHANGED_PROPERTY
           
private  Extent preferredHeightExtent
           
private  Extent preferredWidthExtent
           
static java.lang.String STYLE_ORIENTATION
          A style constant for the Orientation property.
 
Fields inherited from class nextapp.echo.AbstractPane
PROPORTIONAL, RESIZABLE_CHANGED_PROPERTY, STYLE_RESIZABLE
 
Fields inherited from class nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, listenerList, locale, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, TAB_INDEX_CHANGED_PROPERTY, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
ContainerPane()
          Creates an empty container pane with a horizontal orientation.
ContainerPane(int orientation)
          Creates an empty container pane with the specified orientation.
 
Method Summary
 void add(AbstractPane pane)
          Adds a subpane at the end of this container pane.
 void add(AbstractPane pane, int index)
          Adds a subpane at a specified position.
 void applyStyle(Style style)
          Sets stylistic properties of this component based on a Style object.
 Extent getHeightExtent()
          Calculates the height of the pane.
 int getOrientation()
          Returns the orientation of the pane.
 int getPreferredHeight()
          Deprecated. Use getPreferredHeightExtent().
 Extent getPreferredHeightExtent()
          Returns the preferred height of the pane.
 int getPreferredWidth()
          Deprecated. Use getPreferredWidthExtent().
 Extent getPreferredWidthExtent()
          Returns the preferred width of the pane.
 Extent getWidthExtent()
          Calculates the width of the pane.
 void remove(AbstractPane pane)
          Removes a subpane.
 void setOrientation(int newValue)
          Sets the orientation of the pane.
 void setPreferredHeight(int newValue)
          Deprecated. Use setPreferredHeightExtent().
 void setPreferredHeightExtent(Extent newValue)
          Sets the preferred height of the container.
 void setPreferredWidth(int newValue)
          Deprecated. Use setPreferredWidthExtent().
 void setPreferredWidthExtent(Extent newValue)
          Sets the preferred width of the container.
 
Methods inherited from class nextapp.echo.AbstractPane
getHeight, getWidth, isResizable, setResizable
 
Methods inherited from class nextapp.echo.Component
add, add, addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getLocale, getParent, getTabIndex, indexOf, init, isAncestorOf, isEnabled, isFocused, isRegistered, isShowing, isVisible, processHierarchyEvent, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setEnabled, setFocused, setFont, setForeground, setIdentifier, setLocale, setRegistered, setTabIndex, setVisible, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_CHANGED_PROPERTY

public static final java.lang.String CONTENT_CHANGED_PROPERTY
See Also:
Constant Field Values

ORIENTATION_CHANGED_PROPERTY

public static final java.lang.String ORIENTATION_CHANGED_PROPERTY
See Also:
Constant Field Values

PREFERRED_HEIGHT_CHANGED_PROPERTY

public static final java.lang.String PREFERRED_HEIGHT_CHANGED_PROPERTY
See Also:
Constant Field Values

PREFERRED_HEIGHT_EXTENT_CHANGED_PROPERTY

public static final java.lang.String PREFERRED_HEIGHT_EXTENT_CHANGED_PROPERTY
See Also:
Constant Field Values

PREFERRED_WIDTH_CHANGED_PROPERTY

public static final java.lang.String PREFERRED_WIDTH_CHANGED_PROPERTY
See Also:
Constant Field Values

PREFERRED_WIDTH_EXTENT_CHANGED_PROPERTY

public static final java.lang.String PREFERRED_WIDTH_EXTENT_CHANGED_PROPERTY
See Also:
Constant Field Values

STYLE_ORIENTATION

public static final java.lang.String STYLE_ORIENTATION
A style constant for the Orientation property. Values of this key must be of type java.lang.Integer.

See Also:
Constant Field Values

ORIENTATION_HORIZONTAL

public static final int ORIENTATION_HORIZONTAL
Describes a horizontally oriented pane whose child panes are laid out left to right.

See Also:
Constant Field Values

ORIENTATION_VERTICAL

public static final int ORIENTATION_VERTICAL
Describes a vertically oriented pane whose child panes are laid out top to bottom.

See Also:
Constant Field Values

orientation

private int orientation

preferredHeightExtent

private Extent preferredHeightExtent

preferredWidthExtent

private Extent preferredWidthExtent
Constructor Detail

ContainerPane

public ContainerPane()
Creates an empty container pane with a horizontal orientation.


ContainerPane

public ContainerPane(int orientation)
Creates an empty container pane with the specified orientation.

Parameters:
orientation - The initial orientation of the container pane, one of the following values:
Method Detail

add

public void add(AbstractPane pane)
Adds a subpane at the end of this container pane.

Parameters:
pane - The subpane to add.

add

public void add(AbstractPane pane,
                int index)
Adds a subpane at a specified position.

Parameters:
pane - The subpane to add.
index - The position of the subpane.

applyStyle

public void applyStyle(Style style)
Description copied from class: Component
Sets stylistic properties of this component based on a Style object. The version of this method in Component will set foreground and background colors and the font from the style if they are present. Components should override this method if they allow more properties to be set from a style object, and should call super.applyStyle() if necessary.

Overrides:
applyStyle in class AbstractPane
See Also:
Component.applyStyle(Style)

getHeightExtent

public Extent getHeightExtent()
Calculates the height of the pane. If a value is provided for the preferred height of the pane, it is returned. Otherwise the height is calculated based on the contents of the pane. In the case of a horizontally oriented container pane, the height is determined to be the height of the tallest child pane. In the case of a vertically oriented container pane, the height is determined to be the sum of the individual heights of the child panes.

Overrides:
getHeightExtent in class AbstractPane
Returns:
The calculated height of the pane.
See Also:
AbstractPane.getHeightExtent()

getOrientation

public int getOrientation()
Returns the orientation of the pane.

Returns:
The orientation of the pane, one of the following values:
  • ORIENTATION_HORIZONTAL (the default)
  • ORIENTATION_VERTICAL

getPreferredHeight

public int getPreferredHeight()
Deprecated. Use getPreferredHeightExtent().

Returns the preferred width of the pane in pixels.

Returns:
The preferred width of the pane in pixels, or EchoConstants.UNDEFINED_SIZE if the width of the pane is not in pixels.

getPreferredHeightExtent

public Extent getPreferredHeightExtent()
Returns the preferred height of the pane.

Returns:
The preferred height of the pane.

getPreferredWidth

public int getPreferredWidth()
Deprecated. Use getPreferredWidthExtent().

Returns the preferred width of the pane in pixels.

Returns:
The preferred width of the pane in pixels, or EchoConstants.UNDEFINED_SIZE if the width of the pane is not in pixels.

getPreferredWidthExtent

public Extent getPreferredWidthExtent()
Returns the preferred width of the pane.

Returns:
The preferred width of the pane.

getWidthExtent

public Extent getWidthExtent()
Calculates the width of the pane. If a value is provided for the preferred width of the pane, it is returned. Otherwise the width is calculated based on the contents of the pane. In the case of a vertically oriented container pane, the width is determined to be the width of the widest child pane. In the case of a horizontally oriented container pane, the width is determined to be the sum of the individual widths of the child panes.

Overrides:
getWidthExtent in class AbstractPane
Returns:
The calculated width of the pane.
See Also:
AbstractPane.getWidthExtent()

remove

public void remove(AbstractPane pane)
Removes a subpane.

Parameters:
pane - The pane to remove.

setPreferredHeight

public void setPreferredHeight(int newValue)
Deprecated. Use setPreferredHeightExtent().

Sets the preferred height (in pixels) of the container.

Parameters:
newValue - The preferred height of the container. If the preferred height is set to EchoConstants.UNDEFINED_SIZE, the height will be determined based on the heights of the container's contents.

setPreferredHeightExtent

public void setPreferredHeightExtent(Extent newValue)
Sets the preferred height of the container.

Parameters:
newValue - The new preferred height of the container.

setOrientation

public void setOrientation(int newValue)
Sets the orientation of the pane.

Parameters:
newValue - The orientation of the pane, one of the following values:
  • ORIENTATION_HORIZONTAL (the default)
  • ORIENTATION_VERTICAL

setPreferredWidth

public void setPreferredWidth(int newValue)
Deprecated. Use setPreferredWidthExtent().

Sets the preferred width of the container.

Parameters:
newValue - The preferred width of the container. If the preferred width is set to PROPORTIONAL, the width will be determined based on the widths of the container's contents.

setPreferredWidthExtent

public void setPreferredWidthExtent(Extent newValue)
Sets the preferred width of the container.

Parameters:
newValue - The preferred width of the container.

NextApp Echo
1.1.4