com.cc.framework.ui.control
Class CheckboxControl

java.lang.Object
  extended bycom.cc.framework.ui.control.Control
      extended bycom.cc.framework.ui.control.CheckboxControl
All Implemented Interfaces:
AccessControlled, ActionBehavior, CheckboxDataModel, CheckboxStateModel, ClientHandler, DataModel, java.io.Serializable, StateModel
Direct Known Subclasses:
RadioControl

public class CheckboxControl
extends Control
implements CheckboxStateModel, CheckboxDataModel

The Checkbox control

Since:
1.0
Version:
$Revision: 1.22 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  java.lang.Boolean checked
          The check state
private  CheckboxDesignModel designModel
          DesignModel for the control
private static long serialVersionUID
          Serial Version UID
 
Fields inherited from class com.cc.framework.ui.control.Control
log
 
Fields inherited from interface com.cc.framework.ui.model.StateModel
PROP_CONTROL
 
Constructor Summary
CheckboxControl()
          Constructor
CheckboxControl(CheckboxDesignModel designModel)
          Constructor
 
Method Summary
 DataModel getDataModel()
          Returns the data model of the Control
 ControlDesignModel getDesignModel()
          Returns the design model of the control
 StateModel getStateModel()
          Returns the state model of the control
 java.lang.String getValue()
          Returns the value
 java.lang.Boolean isChecked()
          Returns if the checkbox is selected
 void reset()
          Resets the actual state of a control to the initial state
 void setChecked(java.lang.Boolean checked)
          Indicates that this option is selected.
 void setDesignModel(CheckboxDesignModel designModel)
          Sets the design model
 void setValue(RequestContext ctx, ControlValuePath path, java.lang.String[] values)
          The values "on" or "off" are passed in by the HTTP-Request
 
Methods inherited from class com.cc.framework.ui.control.Control
addButton, allowAjaxRendering, execute, execute, execute, execute, execute, execute, execute, getAction, getAjaxId, getButtons, getControlName, getDesignRules, getFrameworkString, getHandler, getHandlers, getHeight, getHelp, getId, getLocaleName, getName, getPermission, getPrincipal, getProperty, getRunAt, getStyle, getStyleClass, getStyleId, getSummary, getTabIndex, getTooltip, getTransaction, getUniqueStyleId, getWidth, isAjaxEnabled, isDisabled, isFormElement, markDirty, onHelp, setAjaxAttribute, setHandler, setPrincipal, show, showButton, synchronizeState, synchronizeState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cc.framework.ui.model.StateModel
synchronizeState
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

designModel

private CheckboxDesignModel designModel
DesignModel for the control


checked

private java.lang.Boolean checked
The check state

Constructor Detail

CheckboxControl

public CheckboxControl()
Constructor


CheckboxControl

public CheckboxControl(CheckboxDesignModel designModel)
Constructor

Parameters:
designModel - CheckboxDesignModel
Method Detail

getDataModel

public DataModel getDataModel()
Description copied from class: Control
Returns the data model of the Control

Specified by:
getDataModel in class Control
Returns:
The data model
See Also:
Control.getDataModel()

setDesignModel

public void setDesignModel(CheckboxDesignModel designModel)
Sets the design model

Parameters:
designModel - The design model

getDesignModel

public ControlDesignModel getDesignModel()
Description copied from class: Control
Returns the design model of the control

Specified by:
getDesignModel in class Control
Returns:
The ControlDesignModel
See Also:
Control.getDesignModel()

getStateModel

public StateModel getStateModel()
Description copied from class: Control
Returns the state model of the control

Specified by:
getStateModel in class Control
Returns:
The state model
See Also:
Control.getStateModel()

reset

public void reset()
Description copied from interface: StateModel
Resets the actual state of a control to the initial state

Specified by:
reset in interface StateModel
See Also:
StateModel.reset()

isChecked

public java.lang.Boolean isChecked()
Description copied from interface: CheckboxDataModel
Returns if the checkbox is selected

Specified by:
isChecked in interface CheckboxDataModel
Returns:
true if selected, false otherwise.
See Also:
CheckboxDataModel.isChecked()

setChecked

public void setChecked(java.lang.Boolean checked)
Description copied from interface: CheckboxDataModel
Indicates that this option is selected.

Specified by:
setChecked in interface CheckboxDataModel
Parameters:
checked - True if the checkbox should be selected
See Also:
CheckboxDataModel.setChecked(java.lang.Boolean)

getValue

public java.lang.String getValue()
Returns the value

Returns:
The value

setValue

public void setValue(RequestContext ctx,
                     ControlValuePath path,
                     java.lang.String[] values)
The values "on" or "off" are passed in by the HTTP-Request

Overrides:
setValue in class Control
Parameters:
ctx - The Action Context
path - Path Name of the input element
values - the values to set
See Also:
Control.setValue(com.cc.framework.adapter.RequestContext, com.cc.framework.ui.control.ControlValuePath, java.lang.String[])


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.