Class Option
java.lang.Object
com.independentsoft.office.odf.forms.Option
- All Implemented Interfaces:
IContentElement
Defines a list item for a listbox control.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object that is a deep copy of the current instance.Returns all content elements.getLabel()Gets the text for a control.Returns the parent content element.getValue()Gets the default value of an input control.booleanSpecifies the state of a radio button or option element.booleanSpecifies the default state of a radio button or option.voidsetCurrentSelected(boolean isCurrentSelected)Specifies the state of a radio button or option element.voidSets the text for a control.voidsetParent(IContentElement parent)Sets the parent content element.voidsetSelected(boolean isSelected)Specifies the default state of a radio button or option.voidSets the default value of an input control.toString()Converts the value of the current Option object to its equivalent string representation.
-
Constructor Details
-
Option
public Option()Initializes a new instance of the Option class.
-
-
Method Details
-
getContentElements
Returns all content elements.- Specified by:
getContentElementsin interfaceIContentElement- Returns:
- A collection of content elements.
-
getParent
Returns the parent content element.- Specified by:
getParentin interfaceIContentElement- Returns:
- the parent
-
setParent
Sets the parent content element.- Specified by:
setParentin interfaceIContentElement- Parameters:
parent- the new parent
-
clone
Creates a new object that is a deep copy of the current instance.- Specified by:
clonein interfaceIContentElement- Overrides:
clonein classObject- Returns:
- A new object that is a copy of this instance.
-
toString
Converts the value of the current Option object to its equivalent string representation. -
isCurrentSelected
public boolean isCurrentSelected()Specifies the state of a radio button or option element.- Returns:
- true, if is current selected
-
setCurrentSelected
public void setCurrentSelected(boolean isCurrentSelected)Specifies the state of a radio button or option element.- Parameters:
isCurrentSelected- the new current selected
-
isSelected
public boolean isSelected()Specifies the default state of a radio button or option. A control initializes to the default state specified by this attribute.- Returns:
- true, if is selected
-
setSelected
public void setSelected(boolean isSelected)Specifies the default state of a radio button or option. A control initializes to the default state specified by this attribute.- Parameters:
isSelected- the new selected
-
getLabel
Gets the text for a control.- Returns:
- the label
-
setLabel
Sets the text for a control.- Parameters:
label- the new label
-
getValue
Gets the default value of an input control.- Returns:
- the value
-
setValue
Sets the default value of an input control.- Parameters:
value- the new value
-