|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jzeno.echo.databinding.DynaLabel
public class DynaLabel
DynaLabel visualizes a string as a label on your screen.
Nested Class Summary | |
---|---|
static class |
DynaLabel.ExternalState
|
static class |
DynaLabel.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 | |
---|---|
static byte |
PERCENT_UNITS
|
static byte |
PIXEL_UNITS
|
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 | |
---|---|
DynaLabel()
Creates an initially unbound label. |
|
DynaLabel(java.lang.Class beanClass,
java.lang.String property,
java.lang.String constructionHints)
Creates a databound label. |
|
DynaLabel(java.lang.String label)
Creates an initially unbound label, and sets a fixed text on this label. |
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 |
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. |
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()
|
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()
|
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 |
getHeightUnits()
|
int |
getHorizontalAlignment()
Gets the horizontal alignment of the label. |
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. |
int |
getImageHeight()
|
int |
getImageWidth()
|
Insets |
getInsets()
|
InstancePeer |
getInstancePeer()
Returns the InstancePeer |
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.String |
getNullLabel()
Gets the label that is shown if the bound property is null . |
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 |
getVerticalAlignment()
Gets the vertical alignment of the label. |
int |
getVerticalTextPosition()
|
int |
getWidth()
|
int |
getWidthUnits()
|
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 |
isAllowLineWrap()
|
boolean |
isAncestorOf(Component c)
Determines if this component is an ancestor of the specified component. |
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 |
setAllowLineWrap(boolean allowLineWrap)
|
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 |
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 |
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 |
setHeightUnits(int heightUnits)
|
void |
setHorizontalAlignment(int alignment)
Sets the horizonal alignment of the label. |
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 |
setImageHeight(int imageHeight)
|
void |
setImageWidth(int imageWidth)
|
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 |
setNullLabel(java.lang.String nullLabel)
Sets the label that is shown if the bound property is null
|
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 |
setVerticalAlignment(int alignment)
Sets the vertical alignment of the label. |
void |
setVerticalTextPosition(int newValue)
|
void |
setVisible(boolean newValue)
Sets the component visible or invisible. |
void |
setWidth(int width)
|
void |
setWidthUnits(int widthUnits)
|
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 |
Field Detail |
---|
public static final byte PIXEL_UNITS
public static final byte PERCENT_UNITS
Constructor Detail |
---|
public DynaLabel()
Creates an initially unbound label.
public DynaLabel(java.lang.String label)
Creates an initially unbound label, and sets a fixed text on this label.
public DynaLabel(java.lang.Class beanClass, java.lang.String property, java.lang.String constructionHints)
Creates a databound label.
Method Detail |
---|
public void rebind()
RebindableComponent
This operation causes the component to reset it's content to that of the domain model.
rebind
in interface RebindableComponent
public java.lang.String getNullLabel()
Gets the label that is shown if the bound property is null
.
This allows you to show a sensible message for null values.
public void setNullLabel(java.lang.String nullLabel)
Sets the label that is shown if the bound property is null
public java.lang.String getToolTipText()
Sets the tooltip that is shown when the user hoovers over this label.
public void setToolTipText(java.lang.String toolTipText)
Gets the tooltip that is shown when the user hoovers over this label.
public void setText(java.lang.String text)
For unbound label components, sets the label's text directly.
public java.lang.String getText()
Gets the current text of the label.
public int getImageWidth()
public void setImageWidth(int imageWidth)
public int getImageHeight()
public void setImageHeight(int imageHeight)
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.
public java.lang.String getIconName()
Gets the name of the icon you want to show, instead of a text label. Also
see setIconName(String)
.
public void setIcon(ImageReference ir)
public ImageReference getIcon()
public void setBackground(Color color)
Component
setBackground
in interface Component
color
- The new background color of the component.public Color getBackground()
Component
getBackground
in interface Component
public void setForeground(Color color)
Component
setForeground
in interface Component
color
- The new foreground color of the component.public Color getForeground()
Component
getForeground
in interface Component
public int getHeight()
public void setHeight(int height)
public int getHeightUnits()
public void setHeightUnits(int heightUnits)
public int getWidth()
public void setWidth(int width)
public int getWidthUnits()
public void setWidthUnits(int widthUnits)
public int getBorderStyle()
Gets the border style of the button.
getBorderStyle
in interface Borderable
public void setBorderStyle(int style)
Sets the border style of the button. (See the Borderable interface in EchoPoint).
setBorderStyle
in interface Borderable
public Color getBorderColor()
getBorderColor
in interface Borderable
Color
of the Borderable's
border.public void setBorderColor(Color borderColor)
Borderable
Color
of the Borderable's
border.
This will also set the left, top, right and bottom border color.
setBorderColor
in interface Borderable
public int getBorderSize()
getBorderSize
in interface Borderable
Borderables's
border.public void setBorderSize(int borderSize)
Borderable
Borderables's
border.
This will also set the left, top, right and bottom border size.
setBorderSize
in interface Borderable
public Color getBottomBorderColor()
getBottomBorderColor
in interface Borderable
Color
of the Borderable's
bottom border.public int getBottomBorderSize()
getBottomBorderSize
in interface Borderable
Borderables's
bottom border.public int getBottomBorderStyle()
getBottomBorderStyle
in interface Borderable
Borderables's
bottom border.Borderable.getBorderStyle()
public Color getLeftBorderColor()
getLeftBorderColor
in interface Borderable
Color
of the Borderable's
left border.public int getLeftBorderSize()
getLeftBorderSize
in interface Borderable
Borderables's
left border.public int getLeftBorderStyle()
getLeftBorderStyle
in interface Borderable
Borderables's
left border.Borderable.getBorderStyle()
public Color getRightBorderColor()
getRightBorderColor
in interface Borderable
Color
of the Borderable's
right border.public int getRightBorderSize()
getRightBorderSize
in interface Borderable
Borderables's
right border.public int getRightBorderStyle()
getRightBorderStyle
in interface Borderable
Borderables's
right border.Borderable.getBorderStyle()
public Color getTopBorderColor()
getTopBorderColor
in interface Borderable
Color
of the Borderable's
top border.public int getTopBorderSize()
getTopBorderSize
in interface Borderable
Borderables's
top border.public int getTopBorderStyle()
getTopBorderStyle
in interface Borderable
Borderables's
top border.Borderable.getBorderStyle()
public void setBottomBorderColor(Color borderColor)
Borderable
Color
of the Borderable's
bottom border.
setBottomBorderColor
in interface Borderable
public void setBottomBorderSize(int borderSize)
Borderable
Borderables's
bottom border.
setBottomBorderSize
in interface Borderable
public void setBottomBorderStyle(int borderStyle)
Borderable
Borderables's
bottom border.
setBottomBorderStyle
in interface Borderable
Borderable.setBorderStyle(int)
public void setLeftBorderColor(Color borderColor)
Borderable
Color
of the Borderable's
left border.
setLeftBorderColor
in interface Borderable
public void setLeftBorderSize(int borderSize)
Borderable
Borderables's
left border.
setLeftBorderSize
in interface Borderable
public void setLeftBorderStyle(int borderStyle)
Borderable
Borderables's
left border.
setLeftBorderStyle
in interface Borderable
Borderable.setBorderStyle(int)
public void setRightBorderColor(Color borderColor)
Borderable
Color
of the Borderable's
right border.
setRightBorderColor
in interface Borderable
public void setRightBorderSize(int borderSize)
Borderable
Borderables's
right border.
setRightBorderSize
in interface Borderable
public void setRightBorderStyle(int borderStyle)
Borderable
Borderables's
right border.
setRightBorderStyle
in interface Borderable
Borderable.setBorderStyle(int)
public void setTopBorderColor(Color borderColor)
Borderable
Color
of the Borderable's
top border.
setTopBorderColor
in interface Borderable
public void setTopBorderSize(int borderSize)
Borderable
Borderables's
top border.
setTopBorderSize
in interface Borderable
public void setTopBorderStyle(int borderStyle)
Borderable
Borderables's
top border.
setTopBorderStyle
in interface Borderable
Borderable.setBorderStyle(int)
public int getMouseCursor()
MouseCursorable
getMouseCursor
in interface MouseCursorable
public java.lang.String getMouseCursorURI()
getMouseCursorURI
in interface MouseCursorable
public void setMouseCursor(int mouseCursor)
MouseCursorable
setMouseCursor
in interface MouseCursorable
mouseCursor
- - the mouse cursor to usepublic void setMouseCursorURI(java.lang.String mouseCursorURI)
MouseCursorable
setMouseCursorURI
in interface MouseCursorable
mouseCursorURI
- the URI to a custom platform mouse cursor.public void setHorizontalAlignment(int alignment)
Sets the horizonal alignment of the label. Use the constants in nextapp.echo.EchoConstants .
public int getHorizontalAlignment()
Gets the horizontal alignment of the label.
public void setVerticalAlignment(int alignment)
Sets the vertical alignment of the label. Use the constants in nextapp.echo.EchoConstants .
public int getVerticalAlignment()
Gets the vertical alignment of the label.
public void applyContext()
applyContext
in interface Precreation
public boolean isAllowLineWrap()
public void setAllowLineWrap(boolean allowLineWrap)
public void setVerticalTextPosition(int newValue)
public int getVerticalTextPosition()
public void setHorizontalTextPosition(int newValue)
public int getHorizontalTextPosition()
public void setFont(Font font)
Component
setFont
in interface Component
font
- The new font of the component.public Font getFont()
Component
getFont
in interface Component
public void addValidator(Validator validator)
PropertyComponent
Add extra validators to this component.
addValidator
in interface PropertyComponent
public java.lang.Object getBean()
PropertyComponent
Retrieve the root bean this editor is bound to.
getBean
in interface PropertyComponent
public java.lang.Class getBeanClass()
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.)
getBeanClass
in interface PropertyComponent
public Decorator getDecorator()
PropertyComponent
Gets the decorator, if any is configured.
getDecorator
in interface PropertyComponent
public java.lang.Object getNullObject()
getNullObject
in interface RebindableComponent
public java.lang.String getProperty()
PropertyComponent
Retrieve the property path to bind to on the domain model cluster.
getProperty
in interface PropertyComponent
public java.util.List getValidationErrors()
PropertyComponent
Retrieves a list of currently pending validation errors on this component.
getValidationErrors
in interface PropertyComponent
public java.util.List getValidators()
PropertyComponent
Retrieve the list of active validators on this component.
getValidators
in interface PropertyComponent
public java.lang.Object getValue()
PropertyComponent
Retrieve the property value from the domain model cluster.
getValue
in interface PropertyComponent
public boolean isBound()
public boolean isMarkedInvalid()
isMarkedInvalid
in interface PropertyComponent
public boolean isReadOnly()
isReadOnly
in interface PropertyComponent
public boolean isRequired()
PropertyComponent
Query if the editor is required to be filled in.
isRequired
in interface PropertyComponent
public boolean isValid()
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)
.
isValid
in interface PropertyComponent
public void markInvalid()
PropertyComponent
Marks the component as invalid. Typically puts a colored border around it to indicate the error.
markInvalid
in interface PropertyComponent
public void markValid()
PropertyComponent
Marks the component as valid (remove error marking)
markValid
in interface PropertyComponent
public void removeValidator(Validator validator)
PropertyComponent
Remove an existing validator from this component.
removeValidator
in interface PropertyComponent
public void setBean(java.lang.Object newBean)
PropertyComponent
sets the root bean for property-binding.
setBean
in interface PropertyComponent
public void setBeanClass(java.lang.Class beanClass)
PropertyComponent
Change the type of model bean this property component will be bound to.
setBeanClass
in interface PropertyComponent
public void setDecorator(Decorator decorator)
PropertyComponent
Sets the decorator.
setDecorator
in interface PropertyComponent
public void setNullObject(java.lang.Object nullObject)
RebindableComponent
This object should be returned by the implementor in getValue, when the property path ends in a null value.
setNullObject
in interface RebindableComponent
public void setProperty(java.lang.String propertyPath)
PropertyComponent
Set the property(path) to bind to on the domain model cluster.
setProperty
in interface PropertyComponent
public void setReadOnly(boolean readOnly)
PropertyComponent
Mark this component as read-only.
setReadOnly
in interface PropertyComponent
public void setRequired(boolean required)
PropertyComponent
Determine if the editor is required to be filled in.
setRequired
in interface PropertyComponent
public void setValue(java.lang.Object value)
PropertyComponent
Writes the supplied data into the property we are bound to.
setValue
in interface PropertyComponent
public java.util.List traceValue()
RebindableComponent
Reads the properties in this components property path, and traces all read properties, returning the actual property values in a List.
traceValue
in interface RebindableComponent
public void preRender()
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.
preRender
in interface PropertyComponent
public void add(Component c)
Component
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 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 Borderable
applyStyle
in interface MouseCursorable
applyStyle
in interface Component
style
- The style object from which to retrieve properties for this
Component
.Component.applyStyle(nextapp.echo.Style)
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 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 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 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 void setClientId(java.lang.String clientId)
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 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 validate()
Component
validate()
is not inadvisable.
validate
in interface Component
public void setCssClass(java.lang.String cssClass)
public java.lang.String getCssClass()
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 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 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
PropertyChangeListener.propertyChange(PropertyChangeEvent)
public void registered()
ComponentPeer
registered
in interface ComponentPeer
ComponentPeer.registered()
public void unregistered()
ComponentPeer
unregistered
in interface ComponentPeer
ComponentPeer.unregistered()
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
.ComponentPeer.render(RenderingContext, Element)
public void render(java.io.PrintWriter pw, int depth, boolean parentWhitespaceRelevant)
Renderable
render
in interface Renderable
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.public void renderTemplate(java.io.PrintWriter pw, int depth, boolean parentWhitespaceRelevant)
public void writeVariable(java.io.PrintWriter pw, java.lang.String name)
writeVariable
in interface TemplateVariableSource
public Insets getInsets()
public void setInsets(Insets insets)
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 |