org.odftoolkit.simple.form
Class RadioButton

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

public class RadioButton
extends FormControl

This class represents the form control of radio button, 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
 boolean getCurrentSelected()
          Get current selection status of this radio button
 boolean getDefaultSelected()
          Get the default selection status of this radio button
 String getId()
          Get the control id.
static RadioButton getInstanceOf(FormRadioElement element)
          Get an instance of radio button by an instance of FormRadioElement, while searching the document content to make a bind with the DrawControl which already reference to this radio button.
 String getLabel()
          Get the label content of this radio button
 String getName()
          Get the control name.
static Iterator<FormControl> getSimpleIterator(Form container)
          Get a simple iterator for radio buttons.
 String getValue()
          Get the default value of this control.
 void setControlImplementation(String controlImpl)
          Set the implementation of this control.
 void setCurrentSelected(boolean isSelected)
          Set current selection status of this radio button, it override the default status
 void setDefaultSelected(boolean isSelected)
          Set the default selection status of this radio button
 void setId(String id)
          Set the control id.
 void setLabel(String label)
          Set the label content of this radio button
 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 RadioButton getInstanceOf(FormRadioElement element)
Get an instance of radio button by an instance of FormRadioElement, while searching the document content to make a bind with the DrawControl which already reference to this radio button.

Parameters:
element - - an instance of FormRadioElement
Returns:
an instance of radio button

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 radio button

Parameters:
label - - the label content of this radio button

getLabel

public String getLabel()
Get the label content of this radio button

Returns:
the label content of this radio button

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.

getValue

public String getValue()
Get the default value of this control.

Parameters:
default - value

setValue

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

Parameters:
value - - default value

setDefaultSelected

public void setDefaultSelected(boolean isSelected)
Set the default selection status of this radio button

Parameters:
isSelected - - true means selected; false means unselected

getDefaultSelected

public boolean getDefaultSelected()
Get the default selection status of this radio button

Returns:
true means selected; false means unselected

setCurrentSelected

public void setCurrentSelected(boolean isSelected)
Set current selection status of this radio button, it override the default status

Parameters:
isSelected - - true means selected; false means unselected

getCurrentSelected

public boolean getCurrentSelected()
Get current selection status of this radio button

Returns:
true means selected; false means unselected

getSimpleIterator

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

Parameters:
container - - an instance of form where to traverse the radio buttons


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