nextapp.echoservlet.ui
Class CheckBoxUI
java.lang.Object
nextapp.echoservlet.AbstractComponentPeer
nextapp.echoservlet.ui.AbstractButtonUI
nextapp.echoservlet.ui.ToggleButtonUI
nextapp.echoservlet.ui.CheckBoxUI
- All Implemented Interfaces:
- java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, ImageUpdateListener, Alignment, ClientActionProducer, ClientInputProducer, ComponentPeer, ControllerFieldInitialState
public class CheckBoxUI
- extends ToggleButtonUI
- implements ClientInputProducer, ControllerFieldInitialState
A peer for CheckBox
components.
- See Also:
- Serialized Form
Method Summary |
void |
clientInput(java.lang.String input)
Called when a client sends an input string through an input field. |
java.lang.String |
getControllerFieldValue()
Returns the value that will be rendered in the component's hidden
state element in the controller form. |
java.lang.String |
getDefaultStateImageUri(RenderingContext rc,
boolean selected)
Returns the URI of the default image used to represent the toggle
button's state. |
java.lang.String |
getScriptAction(RenderingContext rc)
Returns JavaScript code that will be executed when the button is
clicked. |
Methods inherited from class nextapp.echoservlet.AbstractComponentPeer |
addAncillaryService, generateId, getCalculatedBackground, getCalculatedFont, getCalculatedForeground, getChildCount, getChildren, getComponent, getFocusedElementId, getId, getInstancePeer, getParentComponentPeer, getPeer, redraw, registerAncillaryServices, removeAncillaryService, setComponent, setId, setInstancePeer, unregisterAncillaryServices |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERVICE_CHECK_BOX_OFF
public static final Service SERVICE_CHECK_BOX_OFF
- A service that renders the default deselected check box image.
SERVICE_CHECK_BOX_ON
public static final Service SERVICE_CHECK_BOX_ON
- A service that renders the default selected check box image.
CheckBoxUI
public CheckBoxUI()
clientInput
public void clientInput(java.lang.String input)
- Description copied from interface:
ClientInputProducer
- Called when a client sends an input string through an input field.
- Specified by:
clientInput
in interface ClientInputProducer
- Parameters:
input
- The data in the hidden input field in the controller form
as last known.- See Also:
ClientInputProducer.clientInput(String)
getControllerFieldValue
public java.lang.String getControllerFieldValue()
- Description copied from interface:
ControllerFieldInitialState
- Returns the value that will be rendered in the component's hidden
state element in the controller form.
- Specified by:
getControllerFieldValue
in interface ControllerFieldInitialState
- Returns:
- The value that will be rendered in the component's hidden
state element in the controller form.
- See Also:
ControllerFieldInitialState.getControllerFieldValue()
getDefaultStateImageUri
public java.lang.String getDefaultStateImageUri(RenderingContext rc,
boolean selected)
- Description copied from class:
ToggleButtonUI
- Returns the URI of the default image used to represent the toggle
button's state.
- Specified by:
getDefaultStateImageUri
in class ToggleButtonUI
- Parameters:
rc
- The RenderingContext
to which the button is being
rendered.selected
- True if the selected state image is being requested.
- Returns:
- The URI of the default state image.
- See Also:
ToggleButtonUI.getDefaultStateImageUri(RenderingContext, boolean)
getScriptAction
public java.lang.String getScriptAction(RenderingContext rc)
- Description copied from class:
AbstractButtonUI
- Returns JavaScript code that will be executed when the button is
clicked. On plain
Button
s, this will normally
send input to the server. On ToggleButton
s, the
selection state will change and input may also be sent to the
server if desired by the application.
- Specified by:
getScriptAction
in class AbstractButtonUI
- Parameters:
rc
- The RenderingContext
being used for the
rendering of the button.
- Returns:
- A JavaScript method call that will be executed when the
button is clicked. The returned string must be valid
HTML.
- See Also:
AbstractButtonUI.getScriptAction(RenderingContext)