NextApp Echo
App Container 1.1.4

nextapp.echoservlet.ui
Class CheckBoxUI

java.lang.Object
  extended bynextapp.echoservlet.ComponentPeer
      extended bynextapp.echoservlet.ui.AbstractButtonUI
          extended bynextapp.echoservlet.ui.ToggleButtonUI
              extended bynextapp.echoservlet.ui.CheckBoxUI
All Implemented Interfaces:
Alignment, ClientActionProducer, ClientInputProducer, ControllerFieldInitialState, java.util.EventListener, nextapp.echo.event.ImageUpdateListener, java.beans.PropertyChangeListener, java.io.Serializable

public class CheckBoxUI
extends ToggleButtonUI
implements ClientInputProducer, ControllerFieldInitialState

A peer for CheckBox components.

See Also:
Serialized Form

Field Summary
static Service SERVICE_CHECK_BOX_OFF
          A service that renders the default deselected check box image.
static Service SERVICE_CHECK_BOX_ON
          A service that renders the default selected check box image.
 
Fields inherited from class nextapp.echoservlet.ui.ToggleButtonUI
ROLLOVER_SELECTED_ICON_IMAGE, SELECTED_ICON_IMAGE, SERVICE_TOGGLE_BUTTON_SCRIPT, TOGGLE_IMAGE_PREFIX
 
Fields inherited from class nextapp.echoservlet.ui.AbstractButtonUI
ICON_IMAGE, imageManager, renderedActive, ROLLOVER_ICON_IMAGE
 
Constructor Summary
CheckBoxUI()
           
 
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.ui.ToggleButtonUI
getScriptCustomStateIconToggleRollover, getStateId, getStateImageUri, propertyChange, registered, unregistered
 
Methods inherited from class nextapp.echoservlet.ui.AbstractButtonUI
clientAction, getHorizontalAlignment, getVerticalAlignment, imageUpdate, render
 
Methods inherited from class nextapp.echoservlet.ComponentPeer
addAncillaryService, generateId, getBackground, getChildCount, getChildren, getComponent, getFocusedElementId, getFont, getForeground, getId, getInstancePeer, getParent, getPeer, getTabIndex, redraw, removeAncillaryService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nextapp.echoservlet.ClientInputProducer
getId
 

Field Detail

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.

Constructor Detail

CheckBoxUI

public CheckBoxUI()
Method Detail

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 Buttons, this will normally send input to the server. On ToggleButtons, 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)

NextApp Echo
App Container 1.1.4