|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo.AbstractComponent
net.sf.jzeno.echo.components.CustomComponent
net.sf.jzeno.echo.databinding.DynaCheckBox
public class DynaCheckBox
Checkbox that can be bound to a boolean (primitive) or
Boolean
(object) property.
| Field Summary | |
|---|---|
static int |
BOTTOM
|
static int |
CENTER
|
static int |
LEFT
|
static int |
RIGHT
|
static int |
TOP
|
| Constructor Summary | |
|---|---|
DynaCheckBox()
Creates an unbound component. |
|
DynaCheckBox(java.lang.Class beanClass,
java.lang.String propertyName,
java.lang.String constructionHints)
Creates a databound checkbox. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
Invoked when an action occurs. |
void |
applyContext()
|
void |
applyStyle(Style style)
Sets stylistic properties of this component based on a Style
object. |
java.lang.String |
getCssClass()
|
java.lang.String |
getCssClassDisabled()
|
Font |
getFont()
Returns the font. |
int |
getStateMargin()
|
java.lang.String |
getText()
Gets the label that appears after the checkbox. |
java.lang.String |
getToolTipText()
Gets the tooltip that appears when the user hoovers over the checkbox. |
boolean |
isAsync()
|
boolean |
isReadOnly()
Returns whether or not this checkbox is read-only. |
boolean |
isSelected()
Deprecated. read the boolean property you've bound this checkbox to. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
Used internally. |
void |
rebind()
This operation causes the component to reset it's content to that of the domain model. |
void |
setActionCommand(java.lang.String command)
|
void |
setAsync(boolean async)
|
void |
setCssClass(java.lang.String cssClass)
|
void |
setCssClassDisabled(java.lang.String cssClass)
|
void |
setFocused(boolean focused)
Sets the input focus on this component |
void |
setFont(Font font)
Sets the font of the component. |
void |
setReadOnly(boolean readOnly)
Sets whether or not this checkbox is read-only. |
void |
setSelected(boolean selected)
Deprecated. write to the boolean property you've bound this checkbox to. |
void |
setStateMargin(int i)
Sets the size of the margin to be displayed between the state indicator of the toggle button and its icon and text. |
void |
setText(java.lang.String text)
Sets the label that appears after the checkbox. |
void |
setToolTipText(java.lang.String tip)
Sets the tooltip that appears when the user hoovers over the checkbox. |
| Methods inherited from class net.sf.jzeno.echo.components.CustomComponent |
|---|
addValidator, fireActionEvent, fireActionEvent, fireActionEvent, getActionCommand, getBean, getBeanClass, getDecorator, getNullObject, getProperty, getValidationErrors, getValidators, getValue, isBound, isMarkedInvalid, isRequired, isValid, markInvalid, markValid, preRender, removeValidator, setBean, setBeanClass, setDecorator, setNullObject, setProperty, setRequired, setValue, traceValue, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.jzeno.echo.EventSource |
|---|
getActionCommand |
| Field Detail |
|---|
public static final int TOP
public static final int CENTER
public static final int BOTTOM
public static final int LEFT
public static final int RIGHT
| Constructor Detail |
|---|
public DynaCheckBox()
Creates an unbound component.
public DynaCheckBox(java.lang.Class beanClass,
java.lang.String propertyName,
java.lang.String constructionHints)
Creates a databound checkbox. You should bind it to a boolean or Boolean property.
| Method Detail |
|---|
public void rebind()
RebindableComponentThis operation causes the component to reset it's content to that of the domain model.
rebind in interface RebindableComponentrebind in class CustomComponentpublic void propertyChange(java.beans.PropertyChangeEvent evt)
Used internally.
propertyChange in interface java.beans.PropertyChangeListenerpublic boolean isReadOnly()
Returns whether or not this checkbox is read-only. If a checkbox is read-only it only visualizes the boolean it is bound to, but the user can not change the state of the checkbox.
isReadOnly in interface PropertyComponentisReadOnly in class CustomComponentpublic void setReadOnly(boolean readOnly)
Sets whether or not this checkbox is read-only. If a checkbox is read-only it only visualizes the boolean it is bound to, but the user can not change the state of the checkbox. The checkbox will be disabled.
It is also possible to specify the same, with inverse logic, through the enabled property. This method is needed because all PropertyComponent implementations must support it.
setReadOnly in interface PropertyComponentsetReadOnly in class CustomComponentpublic void setText(java.lang.String text)
Sets the label that appears after the checkbox.
public java.lang.String getText()
Gets the label that appears after the checkbox.
public void setToolTipText(java.lang.String tip)
Sets the tooltip that appears when the user hoovers over the checkbox.
public java.lang.String getToolTipText()
Gets the tooltip that appears when the user hoovers over the checkbox.
public void setSelected(boolean selected)
Sets the selection state of the checkbox. The same effect can be achieved by changing the boolean property that this checkbox is bound to. We advise you to do this, instead of using the setSelected method.
public boolean isSelected()
Gets the selection state of the checkbox. The same effect can be achieved by reading the boolean property that this checkbox is bound to. We advise you to do this, instead of using the isSelected method.
public void setFocused(boolean focused)
Sets the input focus on this component
setFocused in interface ComponentsetFocused in class AbstractComponentfocused - True if the component is to be focused.public void setActionCommand(java.lang.String command)
setActionCommand in interface EventSourcesetActionCommand in class CustomComponentpublic void actionPerformed(ActionEvent e)
ActionListener
actionPerformed in interface ActionListenere - The event describing the action.public void setStateMargin(int i)
newValue - The size of the margin between the state indicator and the
toggle button's text, in pixels.public int getStateMargin()
public void applyStyle(Style style)
ComponentStyle
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 ComponentapplyStyle in class AbstractComponentstyle - The style object from which to retrieve properties for this
Component.public void applyContext()
applyContext in interface Precreationpublic boolean isAsync()
public void setAsync(boolean async)
public void setFont(Font font)
Component
setFont in interface ComponentsetFont in class AbstractComponentfont - The new font of the component.public Font getFont()
Component
getFont in interface ComponentgetFont in class AbstractComponentpublic java.lang.String getCssClass()
public void setCssClass(java.lang.String cssClass)
public java.lang.String getCssClassDisabled()
public void setCssClassDisabled(java.lang.String cssClass)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||