nextapp.echo
Class AbstractPane

java.lang.Object
  extended by nextapp.echo.AbstractComponent
      extended by nextapp.echo.AbstractPane
All Implemented Interfaces:
java.io.Serializable, Component
Direct Known Subclasses:
ContainerPane, ContentPane, FilePane, HttpPane

public abstract class AbstractPane
extends AbstractComponent

A base class from which all panes (e.g. ContainerPane and ContentPane) are derived.

See Also:
Serialized Form

Field Summary
static int PROPORTIONAL
          Deprecated.  
static java.lang.String RESIZABLE_CHANGED_PROPERTY
           
static java.lang.String STYLE_RESIZABLE
          A style constant for the Resizable property.
 
Fields inherited from interface nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, SELECTABLE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
AbstractPane()
          Default constructor.
 
Method Summary
 void applyStyle(Style style)
          Sets stylistic properties of this component based on a Style object.
 int getHeight()
          Returns the height of the pane, in pixels.
 Extent getHeightExtent()
          Returns the height of the pane as an Extent.
 int getWidth()
          Returns the width of the pane, in pixels.
 Extent getWidthExtent()
          Returns the width of the pane as an Extent.
 boolean isResizable()
          Returns whether the pane is resizable.
 void setResizable(boolean newValue)
          Sets whether the pane is resizable.
 
Methods inherited from class nextapp.echo.AbstractComponent
add, add, addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getClientId, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getListenerList, getLocale, getParent, indexOf, init, isAncestorOf, isDifferent, isEnabled, isFocused, isRecursivelyVisible, isRegistered, isSelectableForScriptRecorder, isShowing, isVisible, processHierarchyEvent, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setClientId, setEnabled, setFocused, setFont, setForeground, setIdentifier, setLocale, setParent, setRegistered, setSelectableForScriptRecorder, setVisible, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STYLE_RESIZABLE

public static final java.lang.String STYLE_RESIZABLE
A style constant for the Resizable property. Values of this key must be of type java.lang.Boolean.

See Also:
Constant Field Values

RESIZABLE_CHANGED_PROPERTY

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

PROPORTIONAL

public static final int PROPORTIONAL
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

AbstractPane

public AbstractPane()
Default constructor.

Method Detail

applyStyle

public void applyStyle(Style style)
Description copied from interface: 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.

Specified by:
applyStyle in interface Component
Overrides:
applyStyle in class AbstractComponent
Parameters:
style - The style object from which to retrieve properties for this Component.
See Also:
Component.applyStyle(Style)

getHeight

public int getHeight()
Returns the height of the pane, in pixels. Default implementation returns getHeightExtent().getValue() if getHeightExtent() returns non-null and the extent's getUnits() method returns Extent.PX. Otherwise returns EchoConstants.UNDEFINED_SIZE.

Returns:
The height of the pane, in pixels.

getHeightExtent

public Extent getHeightExtent()
Returns the height of the pane as an Extent. Default implementation returns null.

Returns:
The height of the pane as an Extent.

getWidth

public int getWidth()
Returns the width of the pane, in pixels. Default implementation returns getWidthExtent().getValue() if getWidthExtent() returns non-null and the extent's getUnits() method returns Extent.PX. Otherwise returns EchoConstants.UNDEFINED_SIZE.

Returns:
The width of the pane, in pixels.

getWidthExtent

public Extent getWidthExtent()
Returns the width of the pane as an Extent. Default implementation returns null.

Returns:
The width of the pane as an Extent.

isResizable

public boolean isResizable()
Returns whether the pane is resizable.

Returns:
True if the pane is resizable.

setResizable

public void setResizable(boolean newValue)
Sets whether the pane is resizable.

Parameters:
newValue - True if the pane should be resizable.