|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.Grid.Cell
public static class Grid.Cell
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.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 |
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 |
---|
public static final int FLOW_DOWN
public static final int FLOW_LEFT
public static final int FLOW_RIGHT
public static final int FLOW_UP
public static final java.lang.String STYLE_BACKGROUND_IMAGE
public static final java.lang.String STYLE_HORIZONTAL_ALIGNMENT
public static final java.lang.String STYLE_INSETS
public static final java.lang.String STYLE_LINE_WRAP
public static final java.lang.String STYLE_VERTICAL_ALIGNMENT
public static final java.lang.String BACKGROUND_IMAGE_CHANGED_PROPERTY
public static final java.lang.String FLOW_CHANGED_PROPERTY
public static final java.lang.String FLOW_PRIORITY_CHANGED_PROPERTY
public static final java.lang.String HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY
public static final java.lang.String LINE_WRAP_CHANGED_PROPERTY
public static final java.lang.String INSETS_CHANGED_PROPERTY
public static final java.lang.String POSITION_CHANGED_PROPERTY
public static final java.lang.String VERTICAL_ALIGNMENT_CHANGED_PROPERTY
public static final int LEFT
public static final int RIGHT
public static final int TOP
public static final int BOTTOM
Constructor Detail |
---|
public Grid.Cell()
public Grid.Cell(Component c)
c
- The component that this cell should contain.public Grid.Cell(int columnSpan, int rowSpan)
columnSpan
- The number of columns this cell should span.rowSpan
- The number of rows this cell should span.public Grid.Cell(int columnSpan, int rowSpan, Component c)
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 |
---|
public void applyStyle(Style style)
Component
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.
applyStyle
in interface Component
style
- The style object from which to retrieve properties for this
Component
.Component.applyStyle(Style)
public ImageReference getBackgroundImage()
public final int getColumn()
public final int getColumnSpan()
public int getFlow()
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_DOWN
Indicates the cell will flow
down.public int getFlowPriority()
public int getHorizontalAlignment()
public Insets getInsets()
public boolean getLineWrap()
public Coordinate getPosition()
public final int getRow()
public final int getRowSpan()
public int getVerticalAlignment()
public void setBackgroundImage(ImageReference newValue)
newValue
- the new background image for the cell.public final void setColumnSpan(int newValue)
newValue
- The number of columns that this cell will span.public void setFlow(int newValue)
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_DOWN
Indicates the cell will flow
down.public void setFlowPriority(int newValue)
newValue
- The new flow priority value of this cell.public void setHorizontalAlignment(int newValue)
newValue
- The horizontal alignment of the contents of this panel,
one of the following values.
public void setInsets(Insets newValue)
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.public void setLineWrap(boolean newValue)
newValue
- True if lines of text should be wrapped if necessary.public void setPosition(Coordinate newValue)
newValue
- The new position for the cell.public final void setRowSpan(int newValue)
newValue
- The number of rows that this cell will span.public void setVerticalAlignment(int newValue)
newValue
- The vertical alignment of the contents of this panel, one
of the following values.
public void setBorderSize(int border, int size)
public void setBorderSize(int size)
public void setBorderSize(int left, int right, int top, int bottom)
public int getLeftBorderSize()
public int getTopBorderSize()
public int getRightBorderSize()
public int getBottomBorderSize()
public int[] getBorderSize()
public void setBorderColor(int border, Color color)
public void setBorderColor(Color color)
public void setBorderColors(Color left, Color right, Color top, Color bottom)
public Color getLeftBorderColors()
public Color getRightBorderColors()
public Color getTopBorderColors()
public Color getBottomBorderColors()
public Color[] getBorderColors()
public void add(Component c)
add
in interface Component
c
- The child component to add.public void add(Component c, int n)
Component
add
in interface Component
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.public void addHierarchyListener(HierarchyListener l)
Component
addHierarchyListener
in interface Component
l
- The HierarchyListener
to add.public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Component
addPropertyChangeListener
in interface Component
l
- The listener to add.public void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
Component
firePropertyChange
in interface Component
propertyName
- The name of the changed property.oldValue
- The previous value of the property.newValue
- The present value of the property.public void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
Component
firePropertyChange
in interface Component
propertyName
- The name of the changed property.oldValue
- The previous value of the property.newValue
- The present value of the property.public void firePropertyChange(java.lang.String propertyName, char oldValue, char newValue)
Component
firePropertyChange
in interface Component
propertyName
- The name of the changed property.oldValue
- The previous value of the property.newValue
- The present value of the property.public void firePropertyChange(java.lang.String propertyName, double oldValue, double newValue)
Component
firePropertyChange
in interface Component
propertyName
- The name of the changed property.oldValue
- The previous value of the property.newValue
- The present value of the property.public void firePropertyChange(java.lang.String propertyName, float oldValue, float newValue)
Component
firePropertyChange
in interface Component
propertyName
- The name of the changed property.oldValue
- The previous value of the property.newValue
- The present value of the property.public void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
Component
firePropertyChange
in interface Component
propertyName
- The name of the changed property.oldValue
- The previous value of the property.newValue
- The present value of the property.public void firePropertyChange(java.lang.String propertyName, long oldValue, long newValue)
Component
firePropertyChange
in interface Component
propertyName
- The name of the changed property.oldValue
- The previous value of the property.newValue
- The present value of the property.public java.lang.String getClientId()
Component
Gets the reuseable Id, this is used to keep component peer id constant over show/hide cycles.
getClientId
in interface Component
public Component getComponent(int n)
Component
getComponent
in interface Component
n
- The index of the component to retrieve.
public int getComponentCount()
Component
getComponentCount
in interface Component
public Component[] getComponents()
Component
getComponents
in interface Component
public EchoInstance getEchoInstance()
Component
getEchoInstance
in interface Component
public Font getFont()
Component
getFont
in interface Component
public java.lang.Object getIdentifier()
Component
getIdentifier
in interface Component
public EventListenerList getListenerList()
getListenerList
in interface Component
public java.util.Locale getLocale()
Component
getLocale
in interface Component
public Component getParent()
Component
getParent
in interface Component
public int indexOf(Component c)
Component
indexOf
in interface Component
c
- The component to determine the index of.
public void init()
init
in interface Component
public boolean isAncestorOf(Component c)
Component
isAncestorOf
in interface Component
c
- The component to test for ancestry.
public boolean isEnabled()
Component
isEnabled
in interface Component
public boolean isFocused()
Component
isFocused
in interface Component
public boolean isRecursivelyVisible()
isRecursivelyVisible
in interface Component
public boolean isRegistered()
Component
isRegistered
in interface Component
public boolean isShowing()
Component
isShowing
in interface Component
public boolean isVisible()
Component
isVisible
in interface Component
public void processHierarchyEvent(long changeFlags, Component changed, Component changedParent)
processHierarchyEvent
in interface Component
public boolean isInitialized()
public void setInitialized(boolean initialized)
public void removeHierarchyListener(HierarchyListener l)
Component
removeHierarchyListener
in interface Component
l
- The HierarchyListener
to remove.public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Component
removePropertyChangeListener
in interface Component
l
- The listener to be removed.public Color getBackground()
Component
getBackground
in interface Component
public Color getForeground()
Component
getForeground
in interface Component
public void setBackground(Color newValue)
Component
setBackground
in interface Component
newValue
- The new background color of the component.public void setForeground(Color newValue)
Component
setForeground
in interface Component
newValue
- The new foreground color of the component.public void setClientId(java.lang.String reusableId)
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 !
setClientId
in interface Component
public void setEnabled(boolean newValue)
Component
setEnabled
in interface Component
newValue
- True if the component is enabled.public void setFocused(boolean newValue)
Component
setFocused
in interface Component
newValue
- True if the component is to be focused.public void setFont(Font font)
Component
setFont
in interface Component
font
- The new font of the component.public void setIdentifier(java.lang.Object newValue)
Component
setIdentifier
in interface Component
newValue
- The new identifier for this component.public void setLocale(java.util.Locale newValue)
Component
setLocale
in interface Component
newValue
- The new locale for the component.public void setParent(Component parent)
setParent
in interface Component
public void setRegistered(boolean b)
setRegistered
in interface Component
public void setVisible(boolean newValue)
Component
setVisible
in interface Component
newValue
- The new visibility state of the component.public void update()
Component
update
in interface Component
public void superApplyStyle(Style style)
public void remove(Component c)
Component
remove
in interface Component
c
- The child component to remove.public void remove(int n)
Component
remove
in interface Component
n
- The index of the child component to remove.public void removeAll()
Component
removeAll
in interface Component
public InstancePeer getInstancePeer()
ComponentPeer
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.
public void validate()
Component
validate()
is not inadvisable.
validate
in interface Component
public void addAncillaryService(Service service)
addAncillaryService
in interface ComponentPeer
service
- The ancillary service to be added.public Id generateId()
generateId
in interface ComponentPeer
public Component getComponent()
ComponentPeer
getComponent
in interface ComponentPeer
public java.lang.String getFocusedElementId()
getFocusedElementId
in interface ComponentPeer
public Id getId()
ComponentPeer
Id
by which this peer is identified on the
client.
getId
in interface ComponentPeer
Id
by which this peer is identified on the
client.public ComponentPeer getPeer(Component component)
ComponentPeer
getPeer
in interface ComponentPeer
component
- The component whose peer is to be returned.
public void redraw()
ComponentPeer
redraw
in interface ComponentPeer
public void registerAncillaryServices()
registerAncillaryServices
in interface ComponentPeer
public void removeAncillaryService(Service service)
ComponentPeer
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
removeAncillaryService
in interface ComponentPeer
service
- The ancillary service to be removed.public void setComponent(Component c)
setComponent
in interface ComponentPeer
public void setId(Id generateId)
setId
in interface ComponentPeer
public void setInstancePeer(InstancePeer instancePeer)
setInstancePeer
in interface ComponentPeer
public void unregisterAncillaryServices()
unregisterAncillaryServices
in interface ComponentPeer
public ComponentPeer getParentComponentPeer()
ComponentPeer
getParentComponentPeer
in interface ComponentPeer
public Color getCalculatedBackground()
ComponentPeer
getCalculatedBackground
in interface ComponentPeer
public Font getCalculatedFont()
ComponentPeer
getCalculatedFont
in interface ComponentPeer
public Color getCalculatedForeground()
ComponentPeer
getCalculatedForeground
in interface ComponentPeer
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
public void registered()
ComponentPeer
registered
in interface ComponentPeer
public void unregistered()
ComponentPeer
unregistered
in interface ComponentPeer
public void render(RenderingContext rc, Element parent)
ComponentPeer
render
in interface ComponentPeer
rc
- A rendering context provided by the Connection
.parent
- The element that will contain content rendered by this
ComponentPeer
.public boolean isSelectableForScriptRecorder()
isSelectableForScriptRecorder
in interface Component
public void setSelectableForScriptRecorder(boolean b)
setSelectableForScriptRecorder
in interface Component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |