Package com.independentsoft.office.odf.forms

# Class CheckBox

java.lang.Object
com.independentsoft.office.odf.forms.Control
com.independentsoft.office.odf.forms.CheckBox

All Implemented Interfaces:
  `IFormContent`, `IContentElement`

public class CheckBox extends Control
Defines an on/off control.

- ## Field Summary

  ### Fields inherited from class com.independentsoft.office.odf.forms.Control

  `eventListeners, parent, properties`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CheckBox()`
  Initializes a new instance of the CheckBox class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CheckBox`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `List<IContentElement>`
  `getContentElements()`
  Returns all content elements.
  `String`
  `getControlImplementation()`
  Gets the specific concrete rendition or implementation of a control that should be instantiated.
  `CheckBoxState`
  `getCurrentState()`
  Gets the state of a check box control.
  `String`
  `getDataField()`
  Specifies the name of a column in the result set defined by a (data-aware) form.
  `CheckBoxState`
  `getDefaultState()`
  Gets the default state of a check box control.
  `String`
  `getID()`
  Gets an identifier for a control element.
  `ImageAlignment`
  `getImageAlignment()`
  Specifies which border (start, end) or axis (center) of an image and a text are to be aligned.
  `ImagePosition`
  `getImagePosition()`
  Gets the location of an image relative to the text of a control.
  `String`
  `getLabel()`
  Gets the text for a control.
  `String`
  `getName()`
  Gets the name of a form or control element.
  `IContentElement`
  `getParent()`
  Returns the parent content element.
  `int`
  `getTabIndex()`
  Gets tabbing navigation order of controls within a form.
  `String`
  `getTitle()`
  Gets additional information about a control.
  `String`
  `getValue()`
  Gets the default value of an input control.
  `VisualEffect`
  `getVisualEffect()`
  Gets the visual effect to apply to a control.
  `boolean`
  `isDisabled()`
  Specifies whether a control can accept user input.
  `boolean`
  `isEnableTabbingNavigation()`
  Specifies whether a control is included in the tabbing navigation order.
  `boolean`
  `isPrintable()`
  Specifies whether a control is printed when a user prints a document in which the control is contained.
  `boolean`
  `isTristate()`
  Gets the check box can have the values of checked, unchecked and unknown.
  `void`
  `setControlImplementation​(String controlImplementation)`
  Sets the specific concrete rendition or implementation of a control that should be instantiated.
  `void`
  `setCurrentState​(CheckBoxState currentState)`
  Sets the state of a check box control.
  `void`
  `setDataField​(String dataField)`
  Specifies the name of a column in the result set defined by a (data-aware) form.
  `void`
  `setDefaultState​(CheckBoxState currentState)`
  Sets the default state of a check box control.
  `void`
  `setDisabled​(boolean isDisabled)`
  Specifies whether a control can accept user input.
  `void`
  `setEnableTabbingNavigation​(boolean enableTabbingNavigation)`
  Specifies whether a control is included in the tabbing navigation order.
  `void`
  `setID​(String id)`
  Sets an identifier for a control element.
  `void`
  `setImageAlignment​(ImageAlignment imageAlignment)`
  Specifies which border (start, end) or axis (center) of an image and a text are to be aligned.
  `void`
  `setImagePosition​(ImagePosition imagePosition)`
  Sets the location of an image relative to the text of a control.
  `void`
  `setLabel​(String label)`
  Sets the text for a control.
  `void`
  `setName​(String name)`
  Sets the name of a form or control element.
  `void`
  `setParent​(IContentElement parent)`
  Sets the parent content element.
  `void`
  `setPrintable​(boolean isPrintable)`
  Specifies whether a control is printed when a user prints a document in which the control is contained.
  `void`
  `setTabIndex​(int tabIndex)`
  Sets tabbing navigation order of controls within a form.
  `void`
  `setTitle​(String title)`
  Sets additional information about a control.
  `void`
  `setTristate​(boolean isTristate)`
  Sets the check box can have the values of checked, unchecked and unknown.
  `void`
  `setValue​(String value)`
  Sets the default value of an input control.
  `void`
  `setVisualEffect​(VisualEffect visualEffect)`
  Sets the visual effect to apply to a control.
  `String`
  `toString()`
  Converts the value of the current CheckBox object to its equivalent string representation.

  ### Methods inherited from class com.independentsoft.office.odf.forms.Control

  `getEventListeners, getProperties`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### CheckBox

    public CheckBox()
    Initializes a new instance of the CheckBox class.

- ## Method Details

  - ### getContentElements

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

  - ### getParent

    public IContentElement getParent()
    Returns the parent content element.
    Specified by:
      `getParent` in interface `IContentElement`
    Overrides:
      `getParent` in class `Control`
    Returns:
      the parent

  - ### setParent

    public void setParent​(IContentElement parent)
    Sets the parent content element.
    Specified by:
      `setParent` in interface `IContentElement`
    Overrides:
      `setParent` in class `Control`
    Parameters:
      `parent` - the new parent

  - ### clone

    public CheckBox clone()
    Creates a new object that is a deep copy of the current instance.
    Specified by:
      `clone` in interface `IContentElement`
    Specified by:
      `clone` in interface `IFormContent`
    Specified by:
      `clone` in class `Control`
    Returns:
      A new object that is a copy of this instance.

  - ### toString

    public String toString()
    Converts the value of the current CheckBox object to its equivalent string representation.
    Overrides:
      `toString` in class `Object`
    Returns:
      the string

  - ### getName

    public String getName()
    Gets the name of a form or control element.
    Returns:
      the name

  - ### setName

    public void setName​(String name)
    Sets the name of a form or control element.
    Parameters:
      `name` - the new name

  - ### getControlImplementation

    public String getControlImplementation()
    Gets the specific concrete rendition or implementation of a control that should be instantiated.
    Returns:
      the control implementation

  - ### setControlImplementation

    public void setControlImplementation​(String controlImplementation)
    Sets the specific concrete rendition or implementation of a control that should be instantiated.
    Parameters:
      `controlImplementation` - the new control implementation

  - ### getID

    public String getID()
    Gets an identifier for a control element.
    Returns:
      the id

  - ### setID

    public void setID​(String id)
    Sets an identifier for a control element.
    Parameters:
      `id` - the new id

  - ### 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

  - ### isDisabled

    public boolean isDisabled()
    Specifies whether a control can accept user input.
    Returns:
      true, if is disabled

  - ### setDisabled

    public void setDisabled​(boolean isDisabled)
    Specifies whether a control can accept user input.
    Parameters:
      `isDisabled` - the new disabled

  - ### isPrintable

    public boolean isPrintable()
    Specifies whether a control is printed when a user prints a document in which the control is contained.
    Returns:
      true, if is printable

  - ### setPrintable

    public void setPrintable​(boolean isPrintable)
    Specifies whether a control is printed when a user prints a document in which the control is contained.
    Parameters:
      `isPrintable` - the new printable

  - ### getTabIndex

    public int getTabIndex()
    Gets tabbing navigation order of controls within a form.
    Returns:
      the tab index

  - ### setTabIndex

    public void setTabIndex​(int tabIndex)
    Sets tabbing navigation order of controls within a form.
    Parameters:
      `tabIndex` - the new tab index

  - ### isEnableTabbingNavigation

    public boolean isEnableTabbingNavigation()
    Specifies whether a control is included in the tabbing navigation order. The defined values are: -false: control is not included in tabbing navigation order. -true: control is included in tabbing navigation order.
    Returns:
      true, if is enable tabbing navigation

  - ### setEnableTabbingNavigation

    public void setEnableTabbingNavigation​(boolean enableTabbingNavigation)
    Specifies whether a control is included in the tabbing navigation order. The defined values are: -false: control is not included in tabbing navigation order. -true: control is included in tabbing navigation order.
    Parameters:
      `enableTabbingNavigation` - the new enable tabbing navigation

  - ### getTitle

    public String getTitle()
    Gets additional information about a control.
    Returns:
      the title

  - ### setTitle

    public void setTitle​(String title)
    Sets additional information about a control.
    Parameters:
      `title` - the new title

  - ### getDataField

    public String getDataField()
    Specifies the name of a column in the result set defined by a (data-aware) form. A control interchanges content with its column when: -the current row of a form changes, the control is initialized with the value from its column. -the user changes the content of a control, this changed value is written back to its column.
    Returns:
      the data field

  - ### setDataField

    public void setDataField​(String dataField)
    Specifies the name of a column in the result set defined by a (data-aware) form. A control interchanges content with its column when: -the current row of a form changes, the control is initialized with the value from its column. -the user changes the content of a control, this changed value is written back to its column.
    Parameters:
      `dataField` - the new data field

  - ### getCurrentState

    public CheckBoxState getCurrentState()
    Gets the state of a check box control.
    Returns:
      the current state

  - ### setCurrentState

    public void setCurrentState​(CheckBoxState currentState)
    Sets the state of a check box control.
    Parameters:
      `currentState` - the new current state

  - ### getDefaultState

    public CheckBoxState getDefaultState()
    Gets the default state of a check box control.
    Returns:
      the default state

  - ### setDefaultState

    public void setDefaultState​(CheckBoxState currentState)
    Sets the default state of a check box control.
    Parameters:
      `currentState` - the new default state

  - ### isTristate

    public boolean isTristate()
    Gets the check box can have the values of checked, unchecked and unknown.
    Returns:
      true, if is tristate

  - ### setTristate

    public void setTristate​(boolean isTristate)
    Sets the check box can have the values of checked, unchecked and unknown.
    Parameters:
      `isTristate` - the new tristate

  - ### 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

  - ### getVisualEffect

    public VisualEffect getVisualEffect()
    Gets the visual effect to apply to a control.
    Returns:
      the visual effect

  - ### setVisualEffect

    public void setVisualEffect​(VisualEffect visualEffect)
    Sets the visual effect to apply to a control.
    Parameters:
      `visualEffect` - the new visual effect

  - ### getImagePosition

    public ImagePosition getImagePosition()
    Gets the location of an image relative to the text of a control.
    Returns:
      the image position

  - ### setImagePosition

    public void setImagePosition​(ImagePosition imagePosition)
    Sets the location of an image relative to the text of a control.
    Parameters:
      `imagePosition` - the new image position

  - ### getImageAlignment

    public ImageAlignment getImageAlignment()
    Specifies which border (start, end) or axis (center) of an image and a text are to be aligned.
    Returns:
      the image alignment

  - ### setImageAlignment

    public void setImageAlignment​(ImageAlignment imageAlignment)
    Specifies which border (start, end) or axis (center) of an image and a text are to be aligned.
    Parameters:
      `imageAlignment` - the new image alignment