nextapp.echo
Class Grid.Cell

java.lang.Object
  extended by nextapp.echo.Grid.Cell
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener, Component, ComponentPeer, FastComponentContainer
Direct Known Subclasses:
DynaGrid.Cell
Enclosing class:
Grid

public static class Grid.Cell
extends java.lang.Object
implements Component, ComponentPeer, java.beans.PropertyChangeListener, FastComponentContainer

A container component representing a single cell of a grid.


Nested Class Summary
static class Grid.Cell.ExternalState
           
 
Field Summary
static java.lang.String BACKGROUND_IMAGE_CHANGED_PROPERTY
           
static int BOTTOM
           
static java.lang.String FLOW_CHANGED_PROPERTY
           
static int FLOW_DOWN
          A flow value that indicates that a cell should attempt to flow into vacant cells below it.
static int FLOW_LEFT
          A flow value that indicates that a cell should attempt to flow into vacant cells to its left.
static java.lang.String FLOW_PRIORITY_CHANGED_PROPERTY
           
static int FLOW_RIGHT
          A flow value that indicates that a cell should attempt to flow into vacant cells to its right.
static int FLOW_UP
          A flow value that indicates that a cell should attempt to flow into vacant cells above it.
static java.lang.String HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY
           
static java.lang.String INSETS_CHANGED_PROPERTY
           
static int LEFT
           
static java.lang.String LINE_WRAP_CHANGED_PROPERTY
           
static java.lang.String POSITION_CHANGED_PROPERTY
           
static int RIGHT
           
static java.lang.String STYLE_BACKGROUND_IMAGE
          A style constant for the Background Image 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_LINE_WRAP
          A style constant for the Line Wrap property.
static java.lang.String STYLE_VERTICAL_ALIGNMENT
          A style constant for the Vertical Alignment property.
static int TOP
           
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
 
Fields inherited from interface nextapp.echoservlet.ComponentPeer
IGNORE_PROPERTY_CHANGE
 
Constructor Summary
Grid.Cell()
          Creates a new empty Cell.
Grid.Cell(Component c)
          Creates a new Cell containing the given Component.
Grid.Cell(int columnSpan, int rowSpan)
          Creates a new Cell with a column and row span.
Grid.Cell(int columnSpan, int rowSpan, Component c)
          Creates a new Cell containing a Component with a column and row span.
 
Method Summary
 void add(Component c)
          Component implementation
 void add(Component c, int n)
          Adds the specified Component as the nth child All component add operations use this method to add components.
 void addAncillaryService(Service service)
          ComponentPeer implementation
 void addHierarchyListener(HierarchyListener l)
          Adds a hierarchy listener to be notified when this component's state in the hierarchy changes.
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds a property change listener to this component.
 void applyStyle(Style style)
          Sets stylistic properties of this component based on a Style object.
 void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
          Reports a bound property change.
 void firePropertyChange(java.lang.String propertyName, char oldValue, char newValue)
          Reports a bound property change.
 void firePropertyChange(java.lang.String propertyName, double oldValue, double newValue)
          Reports a bound property change.
 void firePropertyChange(java.lang.String propertyName, float oldValue, float newValue)
          Reports a bound property change.
 void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
          Reports a bound property change.
 void firePropertyChange(java.lang.String propertyName, long oldValue, long newValue)
          Reports a bound property change.
 void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
          Reports a bound property change.
 Id generateId()
           
 Color getBackground()
          Returns the background color of the component.
 ImageReference getBackgroundImage()
          Returns the background image of the cell.
 Color[] getBorderColors()
           
 int[] getBorderSize()
           
 Color getBottomBorderColors()
           
 int getBottomBorderSize()
           
 Color getCalculatedBackground()
          Returns the background color in which the component will be rendered.
 Font getCalculatedFont()
          Returns the font in which the component will be rendered.
 Color getCalculatedForeground()
          Returns the foreground color in which the component will be rendered.
 java.lang.String getClientId()
           Gets the reuseable Id, this is used to keep component peer id constant over show/hide cycles.
 int getColumn()
          Returns the horizontal coordinate of the cell.
 int getColumnSpan()
          Returns the number of columns that this cell will span.
 Component getComponent()
          Returns the component that is handled by this peer.
 Component getComponent(int n)
          Gets the nth immediate child component.
 int getComponentCount()
          Returns the number of immediate child components.
 Component[] getComponents()
          Returns an array of all immediate child components.
 EchoInstance getEchoInstance()
          Returns the EchoInstance object to which this component belongs, or null if it is not bound to any instance.
 int getFlow()
          Returns the directions that this cell will flow into empty cells around it.
 int getFlowPriority()
          Returns the priority with which this cell should attempt to flow.
 java.lang.String getFocusedElementId()
           
 Font getFont()
          Returns the font.
 Color getForeground()
          Returns the foreground of the component.
 int getHorizontalAlignment()
          Returns the horizontal alignment of the contents of this panel.
 Id getId()
          Returns the Id by which this peer is identified on the client.
 java.lang.Object getIdentifier()
          Returns the identifier for this component.
 Insets getInsets()
          Returns the insets of the cell.
 InstancePeer getInstancePeer()
          Returns the InstancePeer with which this peer is associated.
 Color getLeftBorderColors()
           
 int getLeftBorderSize()
           
 boolean getLineWrap()
          Returns whether lines of text should be wrapped if necessary.
 EventListenerList getListenerList()
           
 java.util.Locale getLocale()
          Returns the locale of the component.
 Component getParent()
          Returns the parent component.
 ComponentPeer getParentComponentPeer()
          Returns the peer of the associated component's component.
 ComponentPeer getPeer(Component component)
          Returns the peer of the specified component.
 Coordinate getPosition()
          Returns the coordinate position of the cell within the grid.
 Color getRightBorderColors()
           
 int getRightBorderSize()
           
 int getRow()
          Returns the vertical coordinate of the cell.
 int getRowSpan()
          Returns the number of rows that this cell will span.
 Color getTopBorderColors()
           
 int getTopBorderSize()
           
 int getVerticalAlignment()
          Returns the vertical alignment of the contents of this panel.
 int indexOf(Component c)
          Returns the index of the specified component if it a child of this Component, or -1 if it is not.
 void init()
           
 boolean isAncestorOf(Component c)
          Determines if this component is an ancestor of the specified component.
 boolean isEnabled()
          Returns true if the component is enabled.
 boolean isFocused()
          Returns true if the component is focused.
 boolean isInitialized()
           
 boolean isRecursivelyVisible()
           
 boolean isRegistered()
          Returns true if the component is registered to an application.
 boolean isSelectableForScriptRecorder()
           
 boolean isShowing()
          Returns true if the component is registered and all of its ancestors are visible.
 boolean isVisible()
          Returns the component's visibility state.
 void processHierarchyEvent(long changeFlags, Component changed, Component changedParent)
           
 void propertyChange(java.beans.PropertyChangeEvent e)
           
 void redraw()
          Requests that the component be redrawn on the client.
 void registerAncillaryServices()
           
 void registered()
          Called when the component is registered.
 void remove(Component c)
          Removes the specified child component.
 void remove(int n)
          Removes the component at the given index.
 void removeAll()
          Removes all child Components.
 void removeAncillaryService(Service service)
          Removes an ancillary service from this ComponentPeer.
 void removeHierarchyListener(HierarchyListener l)
          Removes a hierarchy listener from being notified when this component's state in the hierarchy changes.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes a property change listener from this component.
 void render(RenderingContext rc, Element parent)
          A method that should be overridden for the ComponentPeer to produce HTML output.
 void setBackground(Color newValue)
          Sets the background color of the component.
 void setBackgroundImage(ImageReference newValue)
          Sets the background image of the cell.
 void setBorderColor(Color color)
           
 void setBorderColor(int border, Color color)
           
 void setBorderColors(Color left, Color right, Color top, Color bottom)
           
 void setBorderSize(int size)
           
 void setBorderSize(int border, int size)
           
 void setBorderSize(int left, int right, int top, int bottom)
           
 void setClientId(java.lang.String reusableId)
           Sets the reuseable Id, this is used to keep component peer id constant over show/hide cycles.
 void setColumnSpan(int newValue)
          Sets the number of columns that this cell will span.
 void setComponent(Component c)
           
 void setEnabled(boolean newValue)
          Sets whether the component is enabled.
 void setFlow(int newValue)
          Sets the directions that this cell will flow into empty cells around it.
 void setFlowPriority(int newValue)
          Sets the priority with which this cell should attempt to flow.
 void setFocused(boolean newValue)
          Sets whether the component is focused.
 void setFont(Font font)
          Sets the font of the component.
 void setForeground(Color newValue)
          Sets the foreground color of the component.
 void setHorizontalAlignment(int newValue)
          Sets the horizontal alignment of the contents of this panel.
 void setId(Id generateId)
           
 void setIdentifier(java.lang.Object newValue)
          Sets the identifier for this component.
 void setInitialized(boolean initialized)
           
 void setInsets(Insets newValue)
          Sets the insets of the cell.
 void setInstancePeer(InstancePeer instancePeer)
           
 void setLineWrap(boolean newValue)
          Sets whether lines of text should be wrapped if necessary.
 void setLocale(java.util.Locale newValue)
          Sets the locale of the component.
 void setParent(Component parent)
           
 void setPosition(Coordinate newValue)
          Sets the coordinate position of this cell in the grid.
 void setRegistered(boolean b)
           
 void setRowSpan(int newValue)
          Sets the number of rows that this cell will span.
 void setSelectableForScriptRecorder(boolean b)
           
 void setVerticalAlignment(int newValue)
          Sets the vertical alignment of the contents of this panel.
 void setVisible(boolean newValue)
          Sets the component visible or invisible.
 void superApplyStyle(Style style)
           
 void unregisterAncillaryServices()
           
 void unregistered()
          Called when the component is unregistered.
 void update()
          Forces the component to be re-rendered immediately.
 void validate()
          Validates this component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLOW_DOWN

public static final int FLOW_DOWN
A flow value that indicates that a cell should attempt to flow into vacant cells below it.

See Also:
Constant Field Values

FLOW_LEFT

public static final int FLOW_LEFT
A flow value that indicates that a cell should attempt to flow into vacant cells to its left.

See Also:
Constant Field Values

FLOW_RIGHT

public static final int FLOW_RIGHT
A flow value that indicates that a cell should attempt to flow into vacant cells to its right.

See Also:
Constant Field Values

FLOW_UP

public static final int FLOW_UP
A flow value that indicates that a cell should attempt to flow into vacant cells above it.

See Also:
Constant Field Values

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_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_LINE_WRAP

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

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

BACKGROUND_IMAGE_CHANGED_PROPERTY

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

FLOW_CHANGED_PROPERTY

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

FLOW_PRIORITY_CHANGED_PROPERTY

public static final java.lang.String FLOW_PRIORITY_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

LINE_WRAP_CHANGED_PROPERTY

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

INSETS_CHANGED_PROPERTY

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

POSITION_CHANGED_PROPERTY

public static final java.lang.String POSITION_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

LEFT

public static final int LEFT
See Also:
Constant Field Values

RIGHT

public static final int RIGHT
See Also:
Constant Field Values

TOP

public static final int TOP
See Also:
Constant Field Values

BOTTOM

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

Grid.Cell

public Grid.Cell()
Creates a new empty Cell.


Grid.Cell

public Grid.Cell(Component c)
Creates a new Cell containing the given Component.

Parameters:
c - The component that this cell should contain.

Grid.Cell

public Grid.Cell(int columnSpan,
                 int rowSpan)
Creates a new Cell with a column and row span.

Parameters:
columnSpan - The number of columns this cell should span.
rowSpan - The number of rows this cell should span.

Grid.Cell

public Grid.Cell(int columnSpan,
                 int rowSpan,
                 Component c)
Creates a new Cell containing a Component with a column and row span.

Parameters:
columnSpan - The number of columns this cell should span.
rowSpan - The number of rows this cell should span.
c - The component that this cell should contain.
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
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 of the cell.

Returns:
The background image of the cell.

getColumn

public final int getColumn()
Returns the horizontal coordinate of the cell.

Returns:
The horizontal coordinate of the cell.

getColumnSpan

public final int getColumnSpan()
Returns the number of columns that this cell will span.

Returns:
The number of columns that this cell will span.

getFlow

public int getFlow()
Returns the directions that this cell will flow into empty cells around it. A bitmask will be returned indicating whether the cell will occupy cells above, below, to the left, and/or to the right of it if they are empty.

Returns:
A bitmask indicating which directions the cell will flow, which may consist of the following values:
  • FLOW_UP Indicates the cell will flow up.
  • FLOW_LEFT Indicates the cell will flow left.
  • FLOW_RIGHT Indicates the cell will flow right.
  • FLOW_DOWNIndicates the cell will flow down.

getFlowPriority

public int getFlowPriority()
Returns the priority with which this cell should attempt to flow. When grids are being rendered, cells with higher flow priority values will be given the opportunity to flow into neighboring cells before those with lower values. By default all cells have a flow priority of zero.

Returns:
The flow priority value of this cell.

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 of the cell.

Returns:
The insets of the cell. A null value indicates that the internal margins of the cell are those provided in the "CellMargin" property of the grid.

getLineWrap

public boolean getLineWrap()
Returns whether lines of text should be wrapped if necessary.

Returns:
True if lines of text should be wrapped if necessary

getPosition

public Coordinate getPosition()
Returns the coordinate position of the cell within the grid.

Returns:
The coordinate position of the cell within the grid.

getRow

public final int getRow()
Returns the vertical coordinate of the cell.

Returns:
The vertical coordinate of the cell.

getRowSpan

public final int getRowSpan()
Returns the number of rows that this cell will span.

Returns:
The number of rows that this cell will span.

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

setBackgroundImage

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

Parameters:
newValue - the new background image for the cell.

setColumnSpan

public final void setColumnSpan(int newValue)
Sets the number of columns that this cell will span.

Parameters:
newValue - The number of columns that this cell will span.

setFlow

public void setFlow(int newValue)
Sets the directions that this cell will flow into empty cells around it. The bitmask contains information about whether the cell will occupy cells above, below, to the left, and/or to the right of it if they are empty.

Parameters:
newValue - bitmask indicating which directions the cell will flow, which may consist of the following values:
  • FLOW_UP Indicates the cell will flow up.
  • FLOW_LEFT Indicates the cell will flow left.
  • FLOW_RIGHT Indicates the cell will flow right.
  • FLOW_DOWNIndicates the cell will flow down.

setFlowPriority

public void setFlowPriority(int newValue)
Sets the priority with which this cell should attempt to flow. When grids are being rendered, cells with higher flow priority values will be given the opportunity to flow into neighboring cells before those with lower values. By default all cells have a flow priority of zero.

Parameters:
newValue - The new flow priority value of this cell.

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 of the cell.

Parameters:
newValue - The new insets of the cell. A null value indicates that the internal margins of the cell are those provided in the "CellMargin" property of the grid.

setLineWrap

public void setLineWrap(boolean newValue)
Sets whether lines of text should be wrapped if necessary.

Parameters:
newValue - True if lines of text should be wrapped if necessary.

setPosition

public void setPosition(Coordinate newValue)
Sets the coordinate position of this cell in the grid. If a cell is currently located at the specified position in the grid, it will be removed.

Parameters:
newValue - The new position for the cell.

setRowSpan

public final void setRowSpan(int newValue)
Sets the number of rows that this cell will span.

Parameters:
newValue - The number of rows that this cell will span.

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

setBorderSize

public void setBorderSize(int border,
                          int size)

setBorderSize

public void setBorderSize(int size)

setBorderSize

public void setBorderSize(int left,
                          int right,
                          int top,
                          int bottom)

getLeftBorderSize

public int getLeftBorderSize()

getTopBorderSize

public int getTopBorderSize()

getRightBorderSize

public int getRightBorderSize()

getBottomBorderSize

public int getBottomBorderSize()

getBorderSize

public int[] getBorderSize()

setBorderColor

public void setBorderColor(int border,
                           Color color)

setBorderColor

public void setBorderColor(Color color)

setBorderColors

public void setBorderColors(Color left,
                            Color right,
                            Color top,
                            Color bottom)

getLeftBorderColors

public Color getLeftBorderColors()

getRightBorderColors

public Color getRightBorderColors()

getTopBorderColors

public Color getTopBorderColors()

getBottomBorderColors

public Color getBottomBorderColors()

getBorderColors

public Color[] getBorderColors()

add

public void add(Component c)
Component implementation

Specified by:
add in interface Component
Parameters:
c - The child component to add.

add

public void add(Component c,
                int n)
Description copied from interface: Component
Adds the specified Component as the nth child All component add operations use this method to add components. Components that require notification of all child additions should override this method (making sure to call the superclass' implementation).

Specified by:
add in interface Component
Parameters:
c - The child component to add.
n - The index at which to add the child component, or -1 to add the component at the end.

addHierarchyListener

public void addHierarchyListener(HierarchyListener l)
Description copied from interface: Component
Adds a hierarchy listener to be notified when this component's state in the hierarchy changes.

Specified by:
addHierarchyListener in interface Component
Parameters:
l - The HierarchyListener to add.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from interface: Component
Adds a property change listener to this component.

Specified by:
addPropertyChangeListener in interface Component
Parameters:
l - The listener to add.

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               java.lang.Object oldValue,
                               java.lang.Object newValue)
Description copied from interface: Component
Reports a bound property change.

Specified by:
firePropertyChange in interface Component
Parameters:
propertyName - The name of the changed property.
oldValue - The previous value of the property.
newValue - The present value of the property.

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               boolean oldValue,
                               boolean newValue)
Description copied from interface: Component
Reports a bound property change.

Specified by:
firePropertyChange in interface Component
Parameters:
propertyName - The name of the changed property.
oldValue - The previous value of the property.
newValue - The present value of the property.

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               char oldValue,
                               char newValue)
Description copied from interface: Component
Reports a bound property change.

Specified by:
firePropertyChange in interface Component
Parameters:
propertyName - The name of the changed property.
oldValue - The previous value of the property.
newValue - The present value of the property.

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               double oldValue,
                               double newValue)
Description copied from interface: Component
Reports a bound property change.

Specified by:
firePropertyChange in interface Component
Parameters:
propertyName - The name of the changed property.
oldValue - The previous value of the property.
newValue - The present value of the property.

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               float oldValue,
                               float newValue)
Description copied from interface: Component
Reports a bound property change.

Specified by:
firePropertyChange in interface Component
Parameters:
propertyName - The name of the changed property.
oldValue - The previous value of the property.
newValue - The present value of the property.

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               int oldValue,
                               int newValue)
Description copied from interface: Component
Reports a bound property change.

Specified by:
firePropertyChange in interface Component
Parameters:
propertyName - The name of the changed property.
oldValue - The previous value of the property.
newValue - The present value of the property.

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               long oldValue,
                               long newValue)
Description copied from interface: Component
Reports a bound property change.

Specified by:
firePropertyChange in interface Component
Parameters:
propertyName - The name of the changed property.
oldValue - The previous value of the property.
newValue - The present value of the property.

getClientId

public java.lang.String getClientId()
Description copied from interface: Component

Gets the reuseable Id, this is used to keep component peer id constant over show/hide cycles.

Specified by:
getClientId in interface Component

getComponent

public Component getComponent(int n)
Description copied from interface: Component
Gets the nth immediate child component.

Specified by:
getComponent in interface Component
Parameters:
n - The index of the component to retrieve.
Returns:
The component at index n.

getComponentCount

public int getComponentCount()
Description copied from interface: Component
Returns the number of immediate child components.

Specified by:
getComponentCount in interface Component
Returns:
The number of immediate child components.

getComponents

public Component[] getComponents()
Description copied from interface: Component
Returns an array of all immediate child components.

Specified by:
getComponents in interface Component
Returns:
An array of all immediate child components.

getEchoInstance

public EchoInstance getEchoInstance()
Description copied from interface: Component
Returns the EchoInstance object to which this component belongs, or null if it is not bound to any instance.

Specified by:
getEchoInstance in interface Component
Returns:
The EchoInstance object to which this component belongs.

getFont

public Font getFont()
Description copied from interface: Component
Returns the font.

Specified by:
getFont in interface Component
Returns:
The font of the component.

getIdentifier

public java.lang.Object getIdentifier()
Description copied from interface: Component
Returns the identifier for this component. Every component may have an identifier. Identifiers are provided as a convenience to the application developer, and are not used internally in any manner.

Specified by:
getIdentifier in interface Component
Returns:
The identifier for this component.

getListenerList

public EventListenerList getListenerList()
Specified by:
getListenerList in interface Component

getLocale

public java.util.Locale getLocale()
Description copied from interface: Component
Returns the locale of the component. If the component does not have a locale, its ancestors will be queried for a locale. If no ancestors have locales set, the application instance's locale will be returned. If the component is not registered, the active application instance's will be returned.

Specified by:
getLocale in interface Component
Returns:
The locale for this component.

getParent

public Component getParent()
Description copied from interface: Component
Returns the parent component.

Specified by:
getParent in interface Component
Returns:
The parent component.

indexOf

public int indexOf(Component c)
Description copied from interface: Component
Returns the index of the specified component if it a child of this Component, or -1 if it is not.

Specified by:
indexOf in interface Component
Parameters:
c - The component to determine the index of.
Returns:
The index of the specified component.

init

public void init()
Specified by:
init in interface Component

isAncestorOf

public boolean isAncestorOf(Component c)
Description copied from interface: Component
Determines if this component is an ancestor of the specified component.

Specified by:
isAncestorOf in interface Component
Parameters:
c - The component to test for ancestry.
Returns:
true If this component is an ancestor of the specified component.

isEnabled

public boolean isEnabled()
Description copied from interface: Component
Returns true if the component is enabled.

Specified by:
isEnabled in interface Component
Returns:
True if the component is enabled.

isFocused

public boolean isFocused()
Description copied from interface: Component
Returns true if the component is focused.

Specified by:
isFocused in interface Component
Returns:
True if the component is focused.

isRecursivelyVisible

public boolean isRecursivelyVisible()
Specified by:
isRecursivelyVisible in interface Component

isRegistered

public boolean isRegistered()
Description copied from interface: Component
Returns true if the component is registered to an application.

Specified by:
isRegistered in interface Component
Returns:
True if the component is registered to an application.

isShowing

public boolean isShowing()
Description copied from interface: Component
Returns true if the component is registered and all of its ancestors are visible.

Specified by:
isShowing in interface Component
Returns:
True if the component is registered and all of its ancestors are visible.

isVisible

public boolean isVisible()
Description copied from interface: Component
Returns the component's visibility state.

Specified by:
isVisible in interface Component
Returns:
The component's visibility state.

processHierarchyEvent

public void processHierarchyEvent(long changeFlags,
                                  Component changed,
                                  Component changedParent)
Specified by:
processHierarchyEvent in interface Component

isInitialized

public boolean isInitialized()

setInitialized

public void setInitialized(boolean initialized)

removeHierarchyListener

public void removeHierarchyListener(HierarchyListener l)
Description copied from interface: Component
Removes a hierarchy listener from being notified when this component's state in the hierarchy changes.

Specified by:
removeHierarchyListener in interface Component
Parameters:
l - The HierarchyListener to remove.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from interface: Component
Removes a property change listener from this component.

Specified by:
removePropertyChangeListener in interface Component
Parameters:
l - The listener to be removed.

getBackground

public Color getBackground()
Description copied from interface: Component
Returns the background color of the component.

Specified by:
getBackground in interface Component
Returns:
The background color of the component.

getForeground

public Color getForeground()
Description copied from interface: Component
Returns the foreground of the component.

Specified by:
getForeground in interface Component
Returns:
The foreground of the component.

setBackground

public void setBackground(Color newValue)
Description copied from interface: Component
Sets the background color of the component.

Specified by:
setBackground in interface Component
Parameters:
newValue - The new background color of the component.

setForeground

public void setForeground(Color newValue)
Description copied from interface: Component
Sets the foreground color of the component.

Specified by:
setForeground in interface Component
Parameters:
newValue - The new foreground color of the component.

setClientId

public void setClientId(java.lang.String reusableId)
Description copied from interface: Component

Sets the reuseable Id, this is used to keep component peer id constant over show/hide cycles. Do not call from your application code !

Specified by:
setClientId in interface Component

setEnabled

public void setEnabled(boolean newValue)
Description copied from interface: Component
Sets whether the component is enabled.

Specified by:
setEnabled in interface Component
Parameters:
newValue - True if the component is enabled.

setFocused

public void setFocused(boolean newValue)
Description copied from interface: Component
Sets whether the component is focused.

Specified by:
setFocused in interface Component
Parameters:
newValue - True if the component is to be focused.

setFont

public void setFont(Font font)
Description copied from interface: Component
Sets the font of the component.

Specified by:
setFont in interface Component
Parameters:
font - The new font of the component.

setIdentifier

public void setIdentifier(java.lang.Object newValue)
Description copied from interface: Component
Sets the identifier for this component. Every component may have an identifier. Identifiers are provided as a convenience to the application developer, and are not used internally in any manner.

Specified by:
setIdentifier in interface Component
Parameters:
newValue - The new identifier for this component.

setLocale

public void setLocale(java.util.Locale newValue)
Description copied from interface: Component
Sets the locale of the component.

Specified by:
setLocale in interface Component
Parameters:
newValue - The new locale for the component.

setParent

public void setParent(Component parent)
Specified by:
setParent in interface Component

setRegistered

public void setRegistered(boolean b)
Specified by:
setRegistered in interface Component

setVisible

public void setVisible(boolean newValue)
Description copied from interface: Component
Sets the component visible or invisible.

Specified by:
setVisible in interface Component
Parameters:
newValue - The new visibility state of the component.

update

public void update()
Description copied from interface: Component
Forces the component to be re-rendered immediately. Fires a property change event indicating that any/all properties of the Component changed, forcing the container to re-render it.

Specified by:
update in interface Component

superApplyStyle

public void superApplyStyle(Style style)

remove

public void remove(Component c)
Description copied from interface: Component
Removes the specified child component. All component remove operations use this method to remove components. Components that require notification of all child removals should override this method (making sure to call the superclass' implementation).

Specified by:
remove in interface Component
Parameters:
c - The child component to remove.

remove

public void remove(int n)
Description copied from interface: Component
Removes the component at the given index.

Specified by:
remove in interface Component
Parameters:
n - The index of the child component to remove.

removeAll

public void removeAll()
Description copied from interface: Component
Removes all child Components.

Specified by:
removeAll in interface Component

getInstancePeer

public InstancePeer getInstancePeer()
Description copied from interface: ComponentPeer
Returns the InstancePeer with which this peer is associated. If the peer is unregistered, null will be returned.

Specified by:
getInstancePeer in interface ComponentPeer
Returns:
The InstancePeer with which this peer is associated.

validate

public void validate()
Description copied from interface: Component
Validates this component. This method will be called by the application container before the component is rendered. This method should be overridden if the component needs to be updated before being rendered. Validation occurs from the top of the component hierarchy down. Overriding methods should take care to first call super.validate() to ensure the superclass is validated as well.

If components above this one in the hierarchy are modified by an overriding implementation of this method, those components WILL NOT be automatically revalidated. Thus, performing such operations in validate() is not inadvisable.

Specified by:
validate in interface Component

addAncillaryService

public void addAncillaryService(Service service)
ComponentPeer implementation

Specified by:
addAncillaryService in interface ComponentPeer
Parameters:
service - The ancillary service to be added.

generateId

public Id generateId()
Specified by:
generateId in interface ComponentPeer

getComponent

public Component getComponent()
Description copied from interface: ComponentPeer
Returns the component that is handled by this peer.

Specified by:
getComponent in interface ComponentPeer
Returns:
The component that is handled by this peer.

getFocusedElementId

public java.lang.String getFocusedElementId()
Specified by:
getFocusedElementId in interface ComponentPeer

getId

public Id getId()
Description copied from interface: ComponentPeer
Returns the Id by which this peer is identified on the client.

Specified by:
getId in interface ComponentPeer
Returns:
The Id by which this peer is identified on the client.

getPeer

public ComponentPeer getPeer(Component component)
Description copied from interface: ComponentPeer
Returns the peer of the specified component.

Specified by:
getPeer in interface ComponentPeer
Parameters:
component - The component whose peer is to be returned.
Returns:
The peer of the specified component.

redraw

public void redraw()
Description copied from interface: ComponentPeer
Requests that the component be redrawn on the client.

Specified by:
redraw in interface ComponentPeer

registerAncillaryServices

public void registerAncillaryServices()
Specified by:
registerAncillaryServices in interface ComponentPeer

removeAncillaryService

public void removeAncillaryService(Service service)
Description copied from interface: ComponentPeer
Removes an ancillary service from this ComponentPeer. Ancillary services will be registered for the life of the ComponentPeer and automatically removed when it is unregistered. An ancillary service should be used by ONLY one peer, as the peer will register and unregister it from the ServiceRegistry as required.

Specified by:
removeAncillaryService in interface ComponentPeer
Parameters:
service - The ancillary service to be removed.

setComponent

public void setComponent(Component c)
Specified by:
setComponent in interface ComponentPeer

setId

public void setId(Id generateId)
Specified by:
setId in interface ComponentPeer

setInstancePeer

public void setInstancePeer(InstancePeer instancePeer)
Specified by:
setInstancePeer in interface ComponentPeer

unregisterAncillaryServices

public void unregisterAncillaryServices()
Specified by:
unregisterAncillaryServices in interface ComponentPeer

getParentComponentPeer

public ComponentPeer getParentComponentPeer()
Description copied from interface: ComponentPeer
Returns the peer of the associated component's component.

Specified by:
getParentComponentPeer in interface ComponentPeer
Returns:
The peer of the associated component's component.

getCalculatedBackground

public Color getCalculatedBackground()
Description copied from interface: ComponentPeer
Returns the background color in which the component will be rendered. The color will be determined by examining the represented component and then its ancestors until a background color can be determined.

Specified by:
getCalculatedBackground in interface ComponentPeer
Returns:
The background color in which the component will be rendered.

getCalculatedFont

public Font getCalculatedFont()
Description copied from interface: ComponentPeer
Returns the font in which the component will be rendered. The font will be determined by examining the represented component and then its ancestors until a font can be determined.

Specified by:
getCalculatedFont in interface ComponentPeer
Returns:
The font in which the component will be rendered.

getCalculatedForeground

public Color getCalculatedForeground()
Description copied from interface: ComponentPeer
Returns the foreground color in which the component will be rendered. The color will be determined by examining the represented component and then its ancestors until a foreground color can be determined.

Specified by:
getCalculatedForeground in interface ComponentPeer
Returns:
The foreground color in which the component will be rendered.

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

registered

public void registered()
Description copied from interface: ComponentPeer
Called when the component is registered. This method should be overridden if necessary.

Specified by:
registered in interface ComponentPeer

unregistered

public void unregistered()
Description copied from interface: ComponentPeer
Called when the component is unregistered. This method should be overridden if necessary.

Specified by:
unregistered in interface ComponentPeer

render

public void render(RenderingContext rc,
                   Element parent)
Description copied from interface: ComponentPeer
A method that should be overridden for the ComponentPeer to produce HTML output.

Specified by:
render in interface ComponentPeer
Parameters:
rc - A rendering context provided by the Connection.
parent - The element that will contain content rendered by this ComponentPeer.

isSelectableForScriptRecorder

public boolean isSelectableForScriptRecorder()
Specified by:
isSelectableForScriptRecorder in interface Component

setSelectableForScriptRecorder

public void setSelectableForScriptRecorder(boolean b)
Specified by:
setSelectableForScriptRecorder in interface Component