nextapp.echo
Class ContentPane

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

public class ContentPane
extends AbstractPane

A pane to which content components may be added.

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

See Also:
Serialized Form

Field Summary
static java.lang.String BACKGROUND_IMAGE_PROPERTIES_CHANGED_PROPERTY
           
static Insets DEFAULT_INSETS
          A default Insets object that provides 10-pixel margins on the top, bottom, left, and right sides of the content pane.
static java.lang.String HEIGHT_CHANGED_PROPERTY
           
static java.lang.String HEIGHT_EXTENT_CHANGED_PROPERTY
           
static java.lang.String HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY
           
static java.lang.String INSETS_CHANGED_PROPERTY
           
static int SCROLL_BAR_ALWAYS
          A scroll bar policy that will cause scroll bars to always appear, without regard for whether they are required.
static int SCROLL_BAR_AUTO
          A scroll bar policy that will cause scroll bars to be visible if they are necessary, and invisible if they are not.
static int SCROLL_BAR_NEVER
          A scroll bar policy that will cause scroll bars never to appear, without regard for whether they are required.
static java.lang.String SCROLL_BAR_POLICY_CHANGED_PROPERTY
           
static java.lang.String SCROLL_BAR_X_CHANGED_PROPERTY
           
static java.lang.String SCROLL_BAR_Y_CHANGED_PROPERTY
           
static java.lang.String STYLE_BACKGROUND_IMAGE
          A style constant for the Background Image property.
static java.lang.String STYLE_BACKGROUND_IMAGE_PROPERTIES
          A style constant for the Background Image Properties property.
static java.lang.String STYLE_HEIGHT
          A style constant for the Height property.
static java.lang.String STYLE_HEIGHT_EXTENT
          A style constant for the Height Extent property.
static java.lang.String STYLE_HORIZONTAL_ALIGNMENT
          A style constant for the Horizontal Alignment property.
static java.lang.String STYLE_INSETS
          A style constant for the Insets property.
static java.lang.String STYLE_SCROLL_BAR_POLICY
          A style constant for the Scroll Bar Policy property.
static java.lang.String STYLE_VERTICAL_ALIGNMENT
          A style constant for the Vertical Alignment property.
static java.lang.String STYLE_WIDTH
          A style constant for the Width property.
static java.lang.String STYLE_WIDTH_EXTENT
          A style constant for the Width Extent property.
static java.lang.String VERTICAL_ALIGNMENT_CHANGED_PROPERTY
           
static java.lang.String WIDTH_CHANGED_PROPERTY
           
static java.lang.String WIDTH_EXTENT_CHANGED_PROPERTY
           
 
Fields inherited from class nextapp.echo.AbstractPane
PROPORTIONAL, RESIZABLE_CHANGED_PROPERTY, STYLE_RESIZABLE
 
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
ContentPane()
          Creates a content pane.
 
Method Summary
 void addCssFile(java.lang.String file)
           
 void applyStyle(Style style)
          Sets stylistic properties of this component based on a Style object.
 ImageReference getBackgroundImage()
          Returns the background image.
 BackgroundImageProperties getBackgroundImageProperties()
          Returns the background image properties for this content pane.
 java.util.List getCssFiles()
           
 Extent getHeightExtent()
          Returns the height of the pane.
 int getHorizontalAlignment()
          Returns the horizontal alignment of the contents of this pane.
 Insets getInsets()
          Returns the insets (margins) of the pane.
 int getScrollBarPolicy()
          Returns the scroll bar policy.
 int getScrollBarX()
          Returns the position of the horizontal scroll bar, in pixels offset from the left of the pane.
 int getScrollBarY()
          Returns the position of the vertical scroll bar, in pixels offset from the top the pane.
 int getVerticalAlignment()
          Returns the vertical alignment of the contents of this pane.
 Extent getWidthExtent()
          Returns the width of the pane.
 boolean isCssStyled()
           
 boolean isScrollBarPositionModified()
           
 void setBackgroundImage(ImageReference newValue)
          Sets the background image.
 void setBackgroundImageProperties(BackgroundImageProperties newValue)
          Sets the background image properties for this content pane.
 void setCssStyled(boolean cssStyled)
           
 void setHeight(int newValue)
          Sets the height of the pane in pixels.
 void setHeightExtent(Extent newValue)
          Sets the height of the pane.
 void setHorizontalAlignment(int newValue)
          Sets the horizontal alignment of the contents of this pane.
 void setInsets(Insets newValue)
          Sets the insets (margins) of the pane.
 void setScrollBarPolicy(int newValue)
          Sets the scroll bar policy.
 void setScrollBarPositionModified(boolean scrollBarModifiedByApplication)
           
 void setScrollBarX(int newValue)
          Sets the position of the horizontal scroll bar, in pixels offset from the left of the pane.
 void setScrollBarY(int newValue)
          Sets the position of the vertical scroll bar, in pixels offset from the top of the pane.
 void setVerticalAlignment(int newValue)
          Sets the vertical alignment of the contents of this pane.
 void setWidth(int newValue)
          Sets the width of the pane in pixels.
 void setWidthExtent(Extent newValue)
          Sets the width of the pane.
 
Methods inherited from class nextapp.echo.AbstractPane
getHeight, getWidth, isResizable, setResizable
 
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_BACKGROUND_IMAGE

public static final java.lang.String STYLE_BACKGROUND_IMAGE
A style constant for the Background Image property. Values of this key must be of type nextapp.echo.ImageReference.

See Also:
Constant Field Values

STYLE_BACKGROUND_IMAGE_PROPERTIES

public static final java.lang.String STYLE_BACKGROUND_IMAGE_PROPERTIES
A style constant for the Background Image Properties property. Values of this key must be of type nextapp.echo.BackgroundImageProperties

See Also:
Constant Field Values

STYLE_HEIGHT

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

See Also:
Constant Field Values

STYLE_HEIGHT_EXTENT

public static final java.lang.String STYLE_HEIGHT_EXTENT
A style constant for the Height Extent property. Values of this key must be of type nextapp.echo.Extent.

See Also:
Constant Field Values

STYLE_HORIZONTAL_ALIGNMENT

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

See Also:
Constant Field Values

STYLE_INSETS

public static final java.lang.String STYLE_INSETS
A style constant for the Insets property. Values of this key must be of type nextapp.echo.Insets.

See Also:
Constant Field Values

STYLE_SCROLL_BAR_POLICY

public static final java.lang.String STYLE_SCROLL_BAR_POLICY
A style constant for the Scroll Bar Policy property. Values of this key must be of type java.lang.Integer.

See Also:
Constant Field Values

STYLE_VERTICAL_ALIGNMENT

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

See Also:
Constant Field Values

STYLE_WIDTH

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

See Also:
Constant Field Values

STYLE_WIDTH_EXTENT

public static final java.lang.String STYLE_WIDTH_EXTENT
A style constant for the Width Extent property. Values of this key must be of type nextapp.echo.Extent.

See Also:
Constant Field Values

BACKGROUND_IMAGE_PROPERTIES_CHANGED_PROPERTY

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

HEIGHT_CHANGED_PROPERTY

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

HEIGHT_EXTENT_CHANGED_PROPERTY

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

HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY

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

INSETS_CHANGED_PROPERTY

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

SCROLL_BAR_POLICY_CHANGED_PROPERTY

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

SCROLL_BAR_X_CHANGED_PROPERTY

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

SCROLL_BAR_Y_CHANGED_PROPERTY

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

VERTICAL_ALIGNMENT_CHANGED_PROPERTY

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

WIDTH_CHANGED_PROPERTY

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

WIDTH_EXTENT_CHANGED_PROPERTY

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

SCROLL_BAR_AUTO

public static final int SCROLL_BAR_AUTO
A scroll bar policy that will cause scroll bars to be visible if they are necessary, and invisible if they are not.

See Also:
Constant Field Values

SCROLL_BAR_ALWAYS

public static final int SCROLL_BAR_ALWAYS
A scroll bar policy that will cause scroll bars to always appear, without regard for whether they are required.

See Also:
Constant Field Values

SCROLL_BAR_NEVER

public static final int SCROLL_BAR_NEVER
A scroll bar policy that will cause scroll bars never to appear, without regard for whether they are required.

See Also:
Constant Field Values

DEFAULT_INSETS

public static final Insets DEFAULT_INSETS
A default Insets object that provides 10-pixel margins on the top, bottom, left, and right sides of the content pane.

Constructor Detail

ContentPane

public ContentPane()
Creates a content pane.

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 AbstractPane
Parameters:
style - The style object from which to retrieve properties for this Component.
See Also:
Component.applyStyle(Style)

getBackgroundImage

public ImageReference getBackgroundImage()
Returns the background image.

Returns:
The background image.

getBackgroundImageProperties

public BackgroundImageProperties getBackgroundImageProperties()
Returns the background image properties for this content pane.

Returns:
The background image properties for this content pane.

getHorizontalAlignment

public int getHorizontalAlignment()
Returns the horizontal alignment of the contents of this pane.

Returns:
The horizontal alignment of the contents of this pane, one of the following values:
  • EchoConstants.LEFT (the default)
  • EchoConstants.CENTER
  • EchoConstants.RIGHT

getHeightExtent

public Extent getHeightExtent()
Returns the height of the pane.

Overrides:
getHeightExtent in class AbstractPane
Returns:
The height of the pane.

getInsets

public Insets getInsets()
Returns the insets (margins) of the pane.

Returns:
The insets of the pane.

getWidthExtent

public Extent getWidthExtent()
Returns the width of the pane.

Overrides:
getWidthExtent in class AbstractPane
Returns:
The width of the pane.

getScrollBarPolicy

public int getScrollBarPolicy()
Returns the scroll bar policy.

Returns:
The scroll bar policy, which should be one of the following:
  • SCROLL_BAR_ALWAYS
  • SCROLL_BAR_AUTO
  • SCROLL_BAR_NEVER

getScrollBarX

public int getScrollBarX()
Returns the position of the horizontal scroll bar, in pixels offset from the left of the pane.

Returns:
The position of the horizontal scroll bar.

getScrollBarY

public int getScrollBarY()
Returns the position of the vertical scroll bar, in pixels offset from the top the pane.

Returns:
The position of the vertical scroll bar.

getVerticalAlignment

public int getVerticalAlignment()
Returns the vertical alignment of the contents of this pane.

Returns:
The vertical alignment of the contents of this pane, one of the following values:
  • EchoConstants.TOP (the default)
  • EchoConstants.CENTER
  • EchoConstants.BOTTOM

setBackgroundImage

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

Parameters:
newValue - Then new background image.

setBackgroundImageProperties

public void setBackgroundImageProperties(BackgroundImageProperties newValue)
Sets the background image properties for this content pane.

Parameters:
newValue - The new background image properties for this content pane. Any previously set background image information is overridden by calling this method.

setHeight

public void setHeight(int newValue)
Sets the height of the pane in pixels.

Parameters:
newValue - The new height of the pane in pixels.

setHeightExtent

public void setHeightExtent(Extent newValue)
Sets the height of the pane.

Parameters:
newValue - the new height of the pane.

setHorizontalAlignment

public void setHorizontalAlignment(int newValue)
Sets the horizontal alignment of the contents of this pane.

Parameters:
newValue - The horizontal alignment of the contents of this pane, one of the following values.
  • EchoConstants.LEFT (the default)
  • EchoConstants.CENTER
  • EchoConstants.RIGHT

setInsets

public void setInsets(Insets newValue)
Sets the insets (margins) of the pane.

Parameters:
newValue - An insets object that specifies the size of each margin of this pane.

setScrollBarPolicy

public void setScrollBarPolicy(int newValue)
Sets the scroll bar policy.

Parameters:
newValue - The new scroll bar policy, one of the following:
  • SCROLL_BAR_ALWAYS
  • SCROLL_BAR_AUTO
  • SCROLL_BAR_NEVER

setScrollBarX

public void setScrollBarX(int newValue)
Sets the position of the horizontal scroll bar, in pixels offset from the left of the pane.

Parameters:
newValue - The new position of the horizontal scroll bar, in pixels.

setScrollBarY

public void setScrollBarY(int newValue)
Sets the position of the vertical scroll bar, in pixels offset from the top of the pane.

Parameters:
newValue - The new position of the vertical scroll bar, in pixels.

setVerticalAlignment

public void setVerticalAlignment(int newValue)
Sets the vertical alignment of the contents of this pane.

Parameters:
newValue - The vertical alignment of the contents of this pane, one of the following values.
  • EchoConstants.TOP (the default)
  • EchoConstants.CENTER
  • EchoConstants.BOTTOM

setWidth

public void setWidth(int newValue)
Sets the width of the pane in pixels.

Parameters:
newValue - The new width of the pane in pixels.

setWidthExtent

public void setWidthExtent(Extent newValue)
Sets the width of the pane.

Parameters:
newValue - The new width of the pane.

isScrollBarPositionModified

public boolean isScrollBarPositionModified()

setScrollBarPositionModified

public void setScrollBarPositionModified(boolean scrollBarModifiedByApplication)

getCssFiles

public java.util.List getCssFiles()

addCssFile

public void addCssFile(java.lang.String file)

isCssStyled

public boolean isCssStyled()

setCssStyled

public void setCssStyled(boolean cssStyled)