Class Option

java.lang.Object
com.independentsoft.office.odf.forms.Option
All Implemented Interfaces:
IContentElement

public class Option extends Object implements IContentElement
Defines a list item for a listbox control.
  • Constructor Details

    • Option

      public Option()
      Initializes a new instance of the Option class.
  • Method Details

    • getContentElements

      public List<IContentElement> getContentElements()
      Returns all content elements.
      Specified by:
      getContentElements in interface IContentElement
      Returns:
      A collection of content elements.
    • getParent

      public IContentElement getParent()
      Returns the parent content element.
      Specified by:
      getParent in interface IContentElement
      Returns:
      the parent
    • setParent

      public void setParent(IContentElement parent)
      Sets the parent content element.
      Specified by:
      setParent in interface IContentElement
      Parameters:
      parent - the new parent
    • clone

      public Option clone()
      Creates a new object that is a deep copy of the current instance.
      Specified by:
      clone in interface IContentElement
      Overrides:
      clone in class Object
      Returns:
      A new object that is a copy of this instance.
    • toString

      public String toString()
      Converts the value of the current Option object to its equivalent string representation.
      Overrides:
      toString in class Object
      Returns:
      the string
    • 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

      public String getLabel()
      Gets the text for a control.
      Returns:
      the label
    • setLabel

      public void setLabel(String label)
      Sets the text for a control.
      Parameters:
      label - the new label
    • getValue

      public String getValue()
      Gets the default value of an input control.
      Returns:
      the value
    • setValue

      public void setValue(String value)
      Sets the default value of an input control.
      Parameters:
      value - the new value