org.odftoolkit.simple.form
Class CheckBox

java.lang.Object
  extended by org.odftoolkit.simple.Component
      extended by org.odftoolkit.simple.form.FormControl
          extended by org.odftoolkit.simple.form.CheckBox

public class CheckBox
extends FormControl

This class represents the form control of Check Box, provides methods to get/set the form properties and the style formatting of this control.

Since:
0.8

Field Summary
 
Fields inherited from class org.odftoolkit.simple.form.FormControl
drawingShape, formElement, mElement, mFormProperties
 
Method Summary
 FormTypeDefinition.FormCheckboxState getCurrentState()
          Get current state of this check box
 FormTypeDefinition.FormCheckboxState getDefaultState()
          Get the default state of this check box
 String getId()
          Get the control id.
static CheckBox getInstanceOf(FormCheckboxElement element)
          Get an instance of check box by an instance of FormCheckboxElement, while searching the document content to make a bind with the DrawControl which already reference to this check box.
 String getLabel()
          Get the label content of this check box
 String getName()
          Get the control name.
static Iterator<FormControl> getSimpleIterator(Form container)
          Get a simple iterator for check boxes.
 String getValue()
          Get the default value of this control, it will be override by current value.
 void setControlImplementation(String controlImpl)
          Set the implementation of this control.
 void setCurrentState(FormTypeDefinition.FormCheckboxState state)
          Set current state of this check box
 void setDefaultState(FormTypeDefinition.FormCheckboxState state)
          Set the default state of this check box
 void setId(String id)
          Set the control id.
 void setLabel(String label)
          Set the label content of this check box
 void setName(String name)
          Set the control name.
 void setValue(String value)
          Set the default value of this control, it will be override by current value.
 
Methods inherited from class org.odftoolkit.simple.form.FormControl
getDrawControl, getOdfElement, getRectangle, remove, setAnchorType, setFormProperty, setRectangle
 
Methods inherited from class org.odftoolkit.simple.Component
getComponentByElement, getOwnerDocument, registerComponent, unregisterComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstanceOf

public static CheckBox getInstanceOf(FormCheckboxElement element)
Get an instance of check box by an instance of FormCheckboxElement, while searching the document content to make a bind with the DrawControl which already reference to this check box.

Parameters:
element - - an instance of FormCheckboxElement
Returns:
an instance of check box

setControlImplementation

public void setControlImplementation(String controlImpl)
Description copied from class: FormControl
Set the implementation of this control.

Specified by:
setControlImplementation in class FormControl
Parameters:
controlImpl - - the implementation description of this control

getId

public String getId()
Description copied from class: FormControl
Get the control id.

Specified by:
getId in class FormControl
Returns:
the control id.

setId

public void setId(String id)
Description copied from class: FormControl
Set the control id.

Specified by:
setId in class FormControl
Parameters:
id - -the control id.

setLabel

public void setLabel(String label)
Set the label content of this check box

Parameters:
label - - the label of this check box

getLabel

public String getLabel()
Get the label content of this check box

Parameters:
label - - the label of this check box

getName

public String getName()
Description copied from class: FormControl
Get the control name.

Specified by:
getName in class FormControl
Returns:
the control name.

setName

public void setName(String name)
Description copied from class: FormControl
Set the control name.

Specified by:
setName in class FormControl
Parameters:
name - - the control name.

setValue

public void setValue(String value)
Set the default value of this control, it will be override by current value.

Parameters:
value - - the default value

getValue

public String getValue()
Get the default value of this control, it will be override by current value.

Returns:
the default value

setDefaultState

public void setDefaultState(FormTypeDefinition.FormCheckboxState state)
Set the default state of this check box

Parameters:
state - - default state of this check box

getDefaultState

public FormTypeDefinition.FormCheckboxState getDefaultState()
Get the default state of this check box

Returns:
default state of this check box

setCurrentState

public void setCurrentState(FormTypeDefinition.FormCheckboxState state)
Set current state of this check box

Parameters:
state - - current state of this check box

getCurrentState

public FormTypeDefinition.FormCheckboxState getCurrentState()
Get current state of this check box

Returns:
current state of this check box

getSimpleIterator

public static Iterator<FormControl> getSimpleIterator(Form container)
Get a simple iterator for check boxes.

Parameters:
container - - an instance of form where to traverse the check boxes


Copyright © 2010-2017 The Apache Software Foundation. All Rights Reserved.