net.sf.jzeno.echo.databinding
Class DynaButton

java.lang.Object
  extended by net.sf.jzeno.echo.databinding.DynaButton
All Implemented Interfaces:
Borderable, MouseCursorable, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, AllwaysRebind, PropertyComponent, RebindableComponent, EventSink, EventSource, Precreation, TemplateVariableSource, Component, ClientActionProducer, ComponentPeer, FastComponent, Renderable
Direct Known Subclasses:
DynaSaveButton, ReRunButton, StopButton, ViewStackTraceButton

public class DynaButton
extends java.lang.Object
implements Component, Borderable, MouseCursorable, Precreation, RebindableComponent, FastComponent, ComponentPeer, Renderable, java.beans.PropertyChangeListener, AllwaysRebind, TemplateVariableSource, ClientActionProducer, EventSource, EventSink

Represents a visual button

See Also:
Serialized Form

Nested Class Summary
static class DynaButton.ExternalState
           
static class DynaButton.InternalState
           
 
Nested classes/interfaces inherited from interface echopoint.positionable.Borderable
Borderable.NestedStyleInfo
 
Nested classes/interfaces inherited from interface echopoint.positionable.MouseCursorable
MouseCursorable.NestedStyleInfo
 
Field Summary
 
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 echopoint.positionable.Borderable
BORDER_DASHED, BORDER_DOTTED, BORDER_DOUBLE, BORDER_GROOVE, BORDER_INSET, BORDER_NONE, BORDER_OUTSET, BORDER_RIDGE, BORDER_SOLID, borderStyleSymbolics, STYLE_BORDER_COLOR, STYLE_BORDER_SIZE, STYLE_BORDER_STYLE, STYLE_BOTTOM_BORDER_COLOR, STYLE_BOTTOM_BORDER_SIZE, STYLE_BOTTOM_BORDER_STYLE, STYLE_LEFT_BORDER_COLOR, STYLE_LEFT_BORDER_SIZE, STYLE_LEFT_BORDER_STYLE, STYLE_RIGHT_BORDER_COLOR, STYLE_RIGHT_BORDER_SIZE, STYLE_RIGHT_BORDER_STYLE, STYLE_TOP_BORDER_COLOR, STYLE_TOP_BORDER_SIZE, STYLE_TOP_BORDER_STYLE
 
Fields inherited from interface echopoint.positionable.MouseCursorable
borderStyleSymbolics, CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, STYLE_MOUSE_CURSOR, STYLE_MOUSE_CURSOR_URI
 
Fields inherited from interface nextapp.echoservlet.ComponentPeer
IGNORE_PROPERTY_CHANGE
 
Fields inherited from interface nextapp.echoservlet.html.Renderable
INDENT_STRING
 
Constructor Summary
DynaButton()
           Creates an initially unbound button.
DynaButton(java.lang.Class beanClass, java.lang.String property, java.lang.String constructionHints)
           Creates a databound button.
DynaButton(java.lang.String label)
           Creates an initially unbound button, and sets a fixed text on this button.
 
Method Summary
 void add(Component c)
          Adds the specified Component at the end of this Component's children.
 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)
          Component peer
 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 addValidator(Validator validator)
           Add extra validators to this component.
 void applyContext()
           
 void applyStyle(Style style)
          Sets stylistic properties of this component based on a Style object.
 void clientAction(java.lang.String action)
          Called when the user causes an action from the client.
 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()
           
 java.lang.String getActionCommand()
           
 Color getBackground()
          Returns the background color of the component.
 java.lang.Object getBean()
           Retrieve the root bean this editor is bound to.
 java.lang.Class getBeanClass()
           Determine the type of bean we are bound to.
 Color getBorderColor()
           
 int getBorderSize()
           
 int getBorderStyle()
           Gets the border style of the button.
 Color getBottomBorderColor()
           
 int getBottomBorderSize()
           
 int getBottomBorderStyle()
           
 int getButtonWidth()
          Deprecated.  
 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.
 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.
 java.lang.String getCssClass()
           
 java.lang.String getCssClassDisabled()
           
 Decorator getDecorator()
           Gets the decorator, if any is configured.
 EchoInstance getEchoInstance()
          Returns the EchoInstance object to which this component belongs, or null if it is not bound to any instance.
 java.lang.String getFocusedElementId()
           
 Font getFont()
          Returns the font.
 Color getForeground()
          Returns the foreground of the component.
 int getHeight()
           
 int getHorizontalTextPosition()
           
 ImageReference getIcon()
           
 java.lang.String getIconName()
           Gets the name of the icon you want to show, instead of a text label.
 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()
           
 InstancePeer getInstancePeer()
          Returns the InstancePeer with which this peer is associated.
 Color getLeftBorderColor()
           
 int getLeftBorderSize()
           
 int getLeftBorderStyle()
           
 EventListenerList getListenerList()
           
 java.util.Locale getLocale()
          Returns the locale of the component.
 int getMouseCursor()
          Returns the current mouse cursor in use.
 java.lang.String getMouseCursorURI()
           
 java.lang.Object getNullObject()
           
 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.
 java.lang.String getProperty()
           Retrieve the property path to bind to on the domain model cluster.
 Color getRightBorderColor()
           
 int getRightBorderSize()
           
 int getRightBorderStyle()
           
 java.lang.String getText()
           Gets the current text of the label.
 java.lang.String getToolTipText()
           Sets the tooltip that is shown when the user hoovers over this label.
 Color getTopBorderColor()
           
 int getTopBorderSize()
           
 int getTopBorderStyle()
           
 java.util.List getValidationErrors()
           Retrieves a list of currently pending validation errors on this component.
 java.util.List getValidators()
           Retrieve the list of active validators on this component.
 java.lang.Object getValue()
           Retrieve the property value from the domain model cluster.
 int getVerticalTextPosition()
           
 int getWidth()
           
 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 isAsync()
           
 boolean isBound()
           
 boolean isEnabled()
          Returns true if the component is enabled.
 boolean isFocused()
          Returns true if the component is focused.
 boolean isMarkedInvalid()
           
 boolean isReadOnly()
           
 boolean isRecursivelyVisible()
           
 boolean isRegistered()
          Returns true if the component is registered to an application.
 boolean isRequired()
           Query if the editor is required to be filled in.
 boolean isSelectableForScriptRecorder()
           
 boolean isShowing()
          Returns true if the component is registered and all of its ancestors are visible.
 boolean isValid()
           Check if this component contains valid user input.
 boolean isVisible()
          Returns the component's visibility state.
 void markInvalid()
           Marks the component as invalid.
 void markValid()
           Marks the component as valid (remove error marking)
 void preRender()
           Make changes to the visual representation of this component before Echo starts rendering the component.
 void processHierarchyEvent(long changeFlags, Component changed, Component changedParent)
           
 void propertyChange(java.beans.PropertyChangeEvent e)
           
 void rebind()
           This operation causes the component to reset it's content to that of the domain model.
 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 removeValidator(Validator validator)
           Remove an existing validator from this component.
 void render(java.io.PrintWriter pw, int depth, boolean parentWhitespaceRelevant)
          Renders the renderable object to the given PrintWriter.
 void render(RenderingContext rc, Element parent)
          A method that should be overridden for the ComponentPeer to produce HTML output.
 void renderTemplate(java.io.PrintWriter pw, int depth, boolean parentWhitespaceRelevant)
           
 void setActionCommand(java.lang.String command)
           
 void setAsync(boolean async)
           
 void setBackground(Color color)
          Sets the background color of the component.
 void setBean(java.lang.Object newBean)
           sets the root bean for property-binding.
 void setBeanClass(java.lang.Class beanClass)
           Change the type of model bean this property component will be bound to.
 void setBorderColor(Color borderColor)
          Sets the Color of the Borderable's border.
 void setBorderSize(int borderSize)
          Sets the size of the Borderables's border.
 void setBorderStyle(int style)
           Sets the border style of the button.
 void setBottomBorderColor(Color borderColor)
          Sets the Color of the Borderable's bottom border.
 void setBottomBorderSize(int borderSize)
          Sets the size of the Borderables's bottom border.
 void setBottomBorderStyle(int borderStyle)
          Sets the border style of the Borderables's bottom border.
 void setButtonWidth(int width)
          Deprecated.  
 void setClientId(java.lang.String clientId)
           Sets the reuseable Id, this is used to keep component peer id constant over show/hide cycles.
 void setComponent(Component c)
           
 void setCssClass(java.lang.String cssClass)
           
 void setCssClassDisabled(java.lang.String cssClassDisabled)
           
 void setDecorator(Decorator decorator)
           Sets the decorator.
 void setEnabled(boolean newValue)
          Sets whether the component is enabled.
 void setFocused(boolean newValue)
          Sets whether the component is focused.
 void setFont(Font font)
          Sets the font of the component.
 void setForeground(Color color)
          Sets the foreground color of the component.
 void setHeight(int height)
           
 void setHorizontalTextPosition(int newValue)
           
 void setIcon(ImageReference ir)
           
 void setIconName(java.lang.String iconName)
           Sets the name of the icon you want to show.
 void setId(Id generateId)
           
 void setIdentifier(java.lang.Object newValue)
          Sets the identifier for this component.
 void setInsets(Insets insets)
           
 void setInstancePeer(InstancePeer instancePeer)
           
 void setLeftBorderColor(Color borderColor)
          Sets the Color of the Borderable's left border.
 void setLeftBorderSize(int borderSize)
          Sets the size of the Borderables's left border.
 void setLeftBorderStyle(int borderStyle)
          Sets the border style of the Borderables's left border.
 void setLocale(java.util.Locale newValue)
          Sets the locale of the component.
 void setMouseCursor(int mouseCursor)
          Sets the mouse cursor to use.
 void setMouseCursorURI(java.lang.String mouseCursorURI)
          Sets the URI to a custom platform mouse cursor.
 void setNullObject(java.lang.Object nullObject)
           This object should be returned by the implementor in getValue, when the property path ends in a null value.
 void setParent(Component parent)
           
 void setProperty(java.lang.String propertyPath)
           Set the property(path) to bind to on the domain model cluster.
 void setReadOnly(boolean readOnly)
           Mark this component as read-only.
 void setRegistered(boolean b)
           
 void setRequired(boolean required)
           Determine if the editor is required to be filled in.
 void setRightBorderColor(Color borderColor)
          Sets the Color of the Borderable's right border.
 void setRightBorderSize(int borderSize)
          Sets the size of the Borderables's right border.
 void setRightBorderStyle(int borderStyle)
          Sets the border style of the Borderables's right border.
 void setSelectableForScriptRecorder(boolean b)
           
 void setText(java.lang.String text)
           For unbound label components, sets the label's text directly.
 void setToolTipText(java.lang.String toolTipText)
           Gets the tooltip that is shown when the user hoovers over this label.
 void setTopBorderColor(Color borderColor)
          Sets the Color of the Borderable's top border.
 void setTopBorderSize(int borderSize)
          Sets the size of the Borderables's top border.
 void setTopBorderStyle(int borderStyle)
          Sets the border style of the Borderables's top border.
 void setValue(java.lang.Object value)
           Writes the supplied data into the property we are bound to.
 void setVerticalTextPosition(int newValue)
           
 void setVisible(boolean newValue)
          Sets the component visible or invisible.
 void setWidth(int width)
           
 java.util.List traceValue()
           Reads the properties in this components property path, and traces all read properties, returning the actual property values in a List.
 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.
 void writeVariable(java.io.PrintWriter pw, java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynaButton

public DynaButton()

Creates an initially unbound button.


DynaButton

public DynaButton(java.lang.String label)

Creates an initially unbound button, and sets a fixed text on this button.


DynaButton

public DynaButton(java.lang.Class beanClass,
                  java.lang.String property,
                  java.lang.String constructionHints)

Creates a databound button.

Method Detail

rebind

public void rebind()
Description copied from interface: RebindableComponent

This operation causes the component to reset it's content to that of the domain model.

Specified by:
rebind in interface RebindableComponent

getToolTipText

public java.lang.String getToolTipText()

Sets the tooltip that is shown when the user hoovers over this label.


setToolTipText

public void setToolTipText(java.lang.String toolTipText)

Gets the tooltip that is shown when the user hoovers over this label.


setText

public void setText(java.lang.String text)

For unbound label components, sets the label's text directly.


getText

public java.lang.String getText()

Gets the current text of the label.


setIconName

public void setIconName(java.lang.String iconName)

Sets the name of the icon you want to show. Supply the name of the gif/png/jpg/... image you want to show as icon. This icon should be placed in the images folder, in the root of the web application. Labels can visualize both icons and text at the same time.


getIconName

public java.lang.String getIconName()

Gets the name of the icon you want to show, instead of a text label. Also see setIconName(String).


setIcon

public void setIcon(ImageReference ir)

getIcon

public ImageReference getIcon()

setBackground

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

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

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.

setForeground

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

Specified by:
setForeground in interface Component
Parameters:
color - The new foreground 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.

getHeight

public int getHeight()

setHeight

public void setHeight(int height)

getWidth

public int getWidth()

setWidth

public void setWidth(int width)

getButtonWidth

public int getButtonWidth()
Deprecated. 

implemented for backwards compatibility

Returns:

setButtonWidth

public void setButtonWidth(int width)
Deprecated. 

implemented for backwards compatibility


getBorderStyle

public int getBorderStyle()

Gets the border style of the button.

Specified by:
getBorderStyle in interface Borderable
Returns:
int the current border style

setBorderStyle

public void setBorderStyle(int style)

Sets the border style of the button. (See the Borderable interface in EchoPoint).

Specified by:
setBorderStyle in interface Borderable

getBorderColor

public Color getBorderColor()
Specified by:
getBorderColor in interface Borderable
Returns:
The Color of the Borderable's border.

setBorderColor

public void setBorderColor(Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's border. This will also set the left, top, right and bottom border color.

Specified by:
setBorderColor in interface Borderable

getBorderSize

public int getBorderSize()
Specified by:
getBorderSize in interface Borderable
Returns:
The size of the Borderables's border.

setBorderSize

public void setBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's border. This will also set the left, top, right and bottom border size.

Specified by:
setBorderSize in interface Borderable

getBottomBorderColor

public Color getBottomBorderColor()
Specified by:
getBottomBorderColor in interface Borderable
Returns:
The Color of the Borderable's bottom border.

getBottomBorderSize

public int getBottomBorderSize()
Specified by:
getBottomBorderSize in interface Borderable
Returns:
The size of the Borderables's bottom border.

getBottomBorderStyle

public int getBottomBorderStyle()
Specified by:
getBottomBorderStyle in interface Borderable
Returns:
The style of the Borderables's bottom border.
See Also:
Borderable.getBorderStyle()

getLeftBorderColor

public Color getLeftBorderColor()
Specified by:
getLeftBorderColor in interface Borderable
Returns:
The Color of the Borderable's left border.

getLeftBorderSize

public int getLeftBorderSize()
Specified by:
getLeftBorderSize in interface Borderable
Returns:
The size of the Borderables's left border.

getLeftBorderStyle

public int getLeftBorderStyle()
Specified by:
getLeftBorderStyle in interface Borderable
Returns:
The style of the Borderables's left border.
See Also:
Borderable.getBorderStyle()

getRightBorderColor

public Color getRightBorderColor()
Specified by:
getRightBorderColor in interface Borderable
Returns:
The Color of the Borderable's right border.

getRightBorderSize

public int getRightBorderSize()
Specified by:
getRightBorderSize in interface Borderable
Returns:
The size of the Borderables's right border.

getRightBorderStyle

public int getRightBorderStyle()
Specified by:
getRightBorderStyle in interface Borderable
Returns:
The style of the Borderables's right border.
See Also:
Borderable.getBorderStyle()

getTopBorderColor

public Color getTopBorderColor()
Specified by:
getTopBorderColor in interface Borderable
Returns:
The Color of the Borderable's top border.

getTopBorderSize

public int getTopBorderSize()
Specified by:
getTopBorderSize in interface Borderable
Returns:
The size of the Borderables's top border.

getTopBorderStyle

public int getTopBorderStyle()
Specified by:
getTopBorderStyle in interface Borderable
Returns:
The style of the Borderables's top border.
See Also:
Borderable.getBorderStyle()

setBottomBorderColor

public void setBottomBorderColor(Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's bottom border.

Specified by:
setBottomBorderColor in interface Borderable

setBottomBorderSize

public void setBottomBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's bottom border.

Specified by:
setBottomBorderSize in interface Borderable

setBottomBorderStyle

public void setBottomBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderables's bottom border.

Specified by:
setBottomBorderStyle in interface Borderable
See Also:
Borderable.setBorderStyle(int)

setLeftBorderColor

public void setLeftBorderColor(Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's left border.

Specified by:
setLeftBorderColor in interface Borderable

setLeftBorderSize

public void setLeftBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's left border.

Specified by:
setLeftBorderSize in interface Borderable

setLeftBorderStyle

public void setLeftBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderables's left border.

Specified by:
setLeftBorderStyle in interface Borderable
See Also:
Borderable.setBorderStyle(int)

setRightBorderColor

public void setRightBorderColor(Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's right border.

Specified by:
setRightBorderColor in interface Borderable

setRightBorderSize

public void setRightBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's right border.

Specified by:
setRightBorderSize in interface Borderable

setRightBorderStyle

public void setRightBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderables's right border.

Specified by:
setRightBorderStyle in interface Borderable
See Also:
Borderable.setBorderStyle(int)

setTopBorderColor

public void setTopBorderColor(Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's top border.

Specified by:
setTopBorderColor in interface Borderable

setTopBorderSize

public void setTopBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's top border.

Specified by:
setTopBorderSize in interface Borderable

setTopBorderStyle

public void setTopBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderables's top border.

Specified by:
setTopBorderStyle in interface Borderable
See Also:
Borderable.setBorderStyle(int)

getMouseCursor

public int getMouseCursor()
Description copied from interface: MouseCursorable
Returns the current mouse cursor in use. This will be one of the following values.

Specified by:
getMouseCursor in interface MouseCursorable
Returns:
The current mouse cursor in use.

getMouseCursorURI

public java.lang.String getMouseCursorURI()
Specified by:
getMouseCursorURI in interface MouseCursorable
Returns:
The custom URI for the mouse cursor or null

setMouseCursor

public void setMouseCursor(int mouseCursor)
Description copied from interface: MouseCursorable
Sets the mouse cursor to use. This will be one of the following values.

Specified by:
setMouseCursor in interface MouseCursorable
Parameters:
mouseCursor - - the mouse cursor to use

setMouseCursorURI

public void setMouseCursorURI(java.lang.String mouseCursorURI)
Description copied from interface: MouseCursorable
Sets the URI to a custom platform mouse cursor. This will only be used if the mosue cusor is set to CURSOR_CUSTOM.

Specified by:
setMouseCursorURI in interface MouseCursorable
Parameters:
mouseCursorURI - the URI to a custom platform mouse cursor.

applyContext

public void applyContext()
Specified by:
applyContext in interface Precreation

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.

getFont

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

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

addValidator

public void addValidator(Validator validator)
Description copied from interface: PropertyComponent

Add extra validators to this component.

Specified by:
addValidator in interface PropertyComponent

getBean

public java.lang.Object getBean()
Description copied from interface: PropertyComponent

Retrieve the root bean this editor is bound to.

Specified by:
getBean in interface PropertyComponent

getBeanClass

public java.lang.Class getBeanClass()
Description copied from interface: PropertyComponent

Determine the type of bean we are bound to.

During the lifecycle of a property component, this may NOT change ! In other words, if this component has been bound to, let's say, an Address object, this component must at all times remain bound to Address components ! (It may ofcourse change the specific instance to which it is bound, by calling setBean.)

Specified by:
getBeanClass in interface PropertyComponent

getDecorator

public Decorator getDecorator()
Description copied from interface: PropertyComponent

Gets the decorator, if any is configured.

Specified by:
getDecorator in interface PropertyComponent

getNullObject

public java.lang.Object getNullObject()
Specified by:
getNullObject in interface RebindableComponent

getProperty

public java.lang.String getProperty()
Description copied from interface: PropertyComponent

Retrieve the property path to bind to on the domain model cluster.

Specified by:
getProperty in interface PropertyComponent

getValidationErrors

public java.util.List getValidationErrors()
Description copied from interface: PropertyComponent

Retrieves a list of currently pending validation errors on this component.

Specified by:
getValidationErrors in interface PropertyComponent

getValidators

public java.util.List getValidators()
Description copied from interface: PropertyComponent

Retrieve the list of active validators on this component.

Specified by:
getValidators in interface PropertyComponent

getValue

public java.lang.Object getValue()
Description copied from interface: PropertyComponent

Retrieve the property value from the domain model cluster.

Specified by:
getValue in interface PropertyComponent

isBound

public boolean isBound()

isMarkedInvalid

public boolean isMarkedInvalid()
Specified by:
isMarkedInvalid in interface PropertyComponent

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface PropertyComponent

isRequired

public boolean isRequired()
Description copied from interface: PropertyComponent

Query if the editor is required to be filled in.

Specified by:
isRequired in interface PropertyComponent

isValid

public boolean isValid()
Description copied from interface: PropertyComponent

Check if this component contains valid user input. In itself this operation will not mark the component in error. In order to apply error marking on invalid components you should use EchoSupport.doValidationRecursively(Component).

Specified by:
isValid in interface PropertyComponent

markInvalid

public void markInvalid()
Description copied from interface: PropertyComponent

Marks the component as invalid. Typically puts a colored border around it to indicate the error.

Specified by:
markInvalid in interface PropertyComponent

markValid

public void markValid()
Description copied from interface: PropertyComponent

Marks the component as valid (remove error marking)

Specified by:
markValid in interface PropertyComponent

removeValidator

public void removeValidator(Validator validator)
Description copied from interface: PropertyComponent

Remove an existing validator from this component.

Specified by:
removeValidator in interface PropertyComponent

setBean

public void setBean(java.lang.Object newBean)
Description copied from interface: PropertyComponent

sets the root bean for property-binding.

Specified by:
setBean in interface PropertyComponent

setBeanClass

public void setBeanClass(java.lang.Class beanClass)
Description copied from interface: PropertyComponent

Change the type of model bean this property component will be bound to.

Specified by:
setBeanClass in interface PropertyComponent

setDecorator

public void setDecorator(Decorator decorator)
Description copied from interface: PropertyComponent

Sets the decorator.

Specified by:
setDecorator in interface PropertyComponent

setNullObject

public void setNullObject(java.lang.Object nullObject)
Description copied from interface: RebindableComponent

This object should be returned by the implementor in getValue, when the property path ends in a null value.

Specified by:
setNullObject in interface RebindableComponent

setProperty

public void setProperty(java.lang.String propertyPath)
Description copied from interface: PropertyComponent

Set the property(path) to bind to on the domain model cluster.

Specified by:
setProperty in interface PropertyComponent

setReadOnly

public void setReadOnly(boolean readOnly)
Description copied from interface: PropertyComponent

Mark this component as read-only.

Specified by:
setReadOnly in interface PropertyComponent

setRequired

public void setRequired(boolean required)
Description copied from interface: PropertyComponent

Determine if the editor is required to be filled in.

Specified by:
setRequired in interface PropertyComponent

setValue

public void setValue(java.lang.Object value)
Description copied from interface: PropertyComponent

Writes the supplied data into the property we are bound to.

Specified by:
setValue in interface PropertyComponent

traceValue

public java.util.List traceValue()
Description copied from interface: RebindableComponent

Reads the properties in this components property path, and traces all read properties, returning the actual property values in a List.

Specified by:
traceValue in interface RebindableComponent

preRender

public void preRender()
Description copied from interface: PropertyComponent

Make changes to the visual representation of this component before Echo starts rendering the component.

Do not modify any bound javabeans in this method, as the changes to these will not be reflected properly on the screen.

Specified by:
preRender in interface PropertyComponent

add

public void add(Component c)
Description copied from interface: Component
Adds the specified Component at the end of this Component's children.

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.

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 Borderable
Specified by:
applyStyle in interface MouseCursorable
Specified by:
applyStyle in interface Component
Parameters:
style - The style object from which to retrieve properties for this Component.
See Also:
Component.applyStyle(nextapp.echo.Style)

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.

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

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

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.

setClientId

public void setClientId(java.lang.String clientId)
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.

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

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)
Component peer

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.

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.

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
See Also:
PropertyChangeListener.propertyChange(PropertyChangeEvent)

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
See Also:
ComponentPeer.registered()

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
See Also:
ComponentPeer.unregistered()

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.
See Also:
ComponentPeer.render(RenderingContext, Element)

render

public void render(java.io.PrintWriter pw,
                   int depth,
                   boolean parentWhitespaceRelevant)
Description copied from interface: Renderable
Renders the renderable object to the given PrintWriter.

Specified by:
render in interface Renderable
Parameters:
pw - The PrintWriter to render to.
depth - The indentation depth that should be applied to the element being rendered.
parentWhitespaceRelevant - A flag that indicates whether the containing element is sensitive to white space.

renderTemplate

public void renderTemplate(java.io.PrintWriter pw,
                           int depth,
                           boolean parentWhitespaceRelevant)

writeVariable

public void writeVariable(java.io.PrintWriter pw,
                          java.lang.String name)
Specified by:
writeVariable in interface TemplateVariableSource

getInsets

public Insets getInsets()

setInsets

public void setInsets(Insets insets)

setActionCommand

public void setActionCommand(java.lang.String command)
Specified by:
setActionCommand in interface EventSource

getActionCommand

public java.lang.String getActionCommand()
Specified by:
getActionCommand in interface EventSource

clientAction

public void clientAction(java.lang.String action)
Description copied from interface: ClientActionProducer
Called when the user causes an action from the client.

Specified by:
clientAction in interface ClientActionProducer
Parameters:
action - The action command generated by the client.

isAsync

public boolean isAsync()

setAsync

public void setAsync(boolean async)

isSelectableForScriptRecorder

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

setSelectableForScriptRecorder

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

setCssClass

public void setCssClass(java.lang.String cssClass)

getCssClass

public java.lang.String getCssClass()

setCssClassDisabled

public void setCssClassDisabled(java.lang.String cssClassDisabled)

getCssClassDisabled

public java.lang.String getCssClassDisabled()

setVerticalTextPosition

public void setVerticalTextPosition(int newValue)

getVerticalTextPosition

public int getVerticalTextPosition()

setHorizontalTextPosition

public void setHorizontalTextPosition(int newValue)

getHorizontalTextPosition

public int getHorizontalTextPosition()