nextapp.echo
Class Panel

java.lang.Object
  extended by nextapp.echo.AbstractComponent
      extended by nextapp.echo.Panel
All Implemented Interfaces:
java.io.Serializable, Component
Direct Known Subclasses:
FontChooser.DefaultPreviewPanel, Panel

public class Panel
extends AbstractComponent

A rectangular container.

See Also:
Serialized Form

Field Summary
static Insets DEFAULT_INSETS
          A default insets object used for panels, that has zero-pixel margins.
static java.lang.String HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY
           
static java.lang.String INSETS_CHANGED_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_VERTICAL_ALIGNMENT
          A style constant for the Vertical Alignment property.
static java.lang.String VERTICAL_ALIGNMENT_CHANGED_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
Panel()
          Creates a new Panel.
 
Method Summary
 void applyStyle(Style style)
          Sets stylistic properties of this component based on a Style object.
 int getHorizontalAlignment()
          Returns the horizontal alignment of the contents of this panel.
 Insets getInsets()
          Returns the insets (margins) of the panel.
 int getVerticalAlignment()
          Returns the vertical alignment of the contents of this panel.
 void setHorizontalAlignment(int newValue)
          Sets the horizontal alignment of the contents of this panel.
 void setInsets(Insets newValue)
          Sets the insets (margins) of the pane.
 void setVerticalAlignment(int newValue)
          Sets the vertical alignment of the contents of this panel.
 
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_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_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

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

VERTICAL_ALIGNMENT_CHANGED_PROPERTY

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

DEFAULT_INSETS

public static final Insets DEFAULT_INSETS
A default insets object used for panels, that has zero-pixel margins.

Constructor Detail

Panel

public Panel()
Creates a new Panel.

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)

getHorizontalAlignment

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

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

getInsets

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

Returns:
The insets of the panel.

getVerticalAlignment

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

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

setHorizontalAlignment

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

Parameters:
newValue - The horizontal alignment of the contents of this panel, 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.

setVerticalAlignment

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

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