Package com.independentsoft.office.odf.forms

# Class ComboBox

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

All Implemented Interfaces:
  `IFormContent`, `IContentElement`

public class ComboBox extends Control
Defines a control which allows displaying and editing of text, and contains a list of possible values for that text.

- ## Field Summary

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

  `eventListeners, parent, properties`

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ComboBox`
  `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.
  `String`
  `getCurrentValue()`
  Gets the current status of an input control.
  `String`
  `getDataField()`
  Specifies the name of a column in the result set defined by a (data-aware) form.
  `String`
  `getDefaultValue()`
  Gets the default value of an input control.
  `String`
  `getID()`
  Gets an identifier for a control element.
  `List<Item>`
  `getItems()`
  Contains a collection of Item objects.
  `int`
  `getMaximumLength()`
  Gets the maximum number of characters that a user can enter in an input control.
  `String`
  `getName()`
  Gets the name of a form or control element.
  `IContentElement`
  `getParent()`
  Returns the parent content element.
  `int`
  `getSize()`
  Gets the number of rows that are visible at a time in a combo box list or a list box list.
  `String`
  `getSource()`
  Gets the source for the list entries in a list or combo box.
  `ListSourceType`
  `getSourceType()`
  Specifies how to populate the entry list in a combo box or list box control.
  `int`
  `getTabIndex()`
  Gets tabbing navigation order of controls within a form.
  `String`
  `getTitle()`
  Gets additional information about a control.
  `boolean`
  `isConvertEmptyToNull()`
  Specifies whether empty current values are regarded as NULL.
  `boolean`
  `isDisabled()`
  Specifies whether a control can accept user input.
  `boolean`
  `isDropDown()`
  Specifies whether a list in a ComboBox is always visible or is only visible when the user clicks the drop-down button.
  `boolean`
  `isEnableAutoComplete()`
  Specifies whether a control is included in the tabbing navigation order.
  `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`
  `isReadOnly()`
  Specifies whether a user can modify the value of a control.
  `void`
  `setControlImplementation​(String controlImplementation)`
  Sets the specific concrete rendition or implementation of a control that should be instantiated.
  `void`
  `setConvertEmptyToNull​(boolean convertEmptyToNull)`
  Specifies whether empty current values are regarded as NULL.
  `void`
  `setCurrentValue​(String currentValue)`
  Sets the current status of an input control.
  `void`
  `setDataField​(String dataField)`
  Specifies the name of a column in the result set defined by a (data-aware) form.
  `void`
  `setDefaultValue​(String defaultValue)`
  Sets the default value of an input control.
  `void`
  `setDisabled​(boolean isDisabled)`
  Specifies whether a control can accept user input.
  `void`
  `setDropDown​(boolean isDropDown)`
  Specifies whether a list in a ComboBox is always visible or is only visible when the user clicks the drop-down button.
  `void`
  `setEnableAutoComplete​(boolean enableAutoComplete)`
  Specifies whether a control is included in the tabbing navigation order.
  `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`
  `setMaximumLength​(int maximumLength)`
  Sets the maximum number of characters that a user can enter in an input 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`
  `setReadOnly​(boolean isReadOnly)`
  Specifies whether a user can modify the value of a control.
  `void`
  `setSize​(int size)`
  Sets the number of rows that are visible at a time in a combo box list or a list box list.
  `void`
  `setSource​(String source)`
  Sets the source for the list entries in a list or combo box.
  `void`
  `setSourceType​(ListSourceType sourceType)`
  Specifies how to populate the entry list in a combo box or list box control.
  `void`
  `setTabIndex​(int tabIndex)`
  Sets tabbing navigation order of controls within a form.
  `void`
  `setTitle​(String title)`
  Sets additional information about a control.
  `String`
  `toString()`
  Converts the value of the current ComboBox 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

  - ### ComboBox

    public ComboBox()
    Initializes a new instance of the ComboBox 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 ComboBox 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 ComboBox object to its equivalent string representation.
    Overrides:
      `toString` in class `Object`
    Returns:
      the string

  - ### getItems

    public List<Item> getItems()
    Contains a collection of Item objects.
    Returns:
      the items

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

  - ### getDefaultValue

    public String getDefaultValue()
    Gets the default value of an input control.
    Returns:
      the default value

  - ### setDefaultValue

    public void setDefaultValue​(String defaultValue)
    Sets the default value of an input control.
    Parameters:
      `defaultValue` - the new default value

  - ### getCurrentValue

    public String getCurrentValue()
    Gets the current status of an input control.
    Returns:
      the current value

  - ### setCurrentValue

    public void setCurrentValue​(String currentValue)
    Sets the current status of an input control.
    Parameters:
      `currentValue` - the new current 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

  - ### getMaximumLength

    public int getMaximumLength()
    Gets the maximum number of characters that a user can enter in an input control.
    Returns:
      the maximum length

  - ### setMaximumLength

    public void setMaximumLength​(int maximumLength)
    Sets the maximum number of characters that a user can enter in an input control.
    Parameters:
      `maximumLength` - the new maximum length

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

  - ### isReadOnly

    public boolean isReadOnly()
    Specifies whether a user can modify the value of a control.
    Returns:
      true, if is read only

  - ### setReadOnly

    public void setReadOnly​(boolean isReadOnly)
    Specifies whether a user can modify the value of a control.
    Parameters:
      `isReadOnly` - the new read only

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

  - ### isEnableAutoComplete

    public boolean isEnableAutoComplete()
    Specifies whether a control is included in the tabbing navigation order.
    Returns:
      true, if is enable auto complete

  - ### setEnableAutoComplete

    public void setEnableAutoComplete​(boolean enableAutoComplete)
    Specifies whether a control is included in the tabbing navigation order.
    Parameters:
      `enableAutoComplete` - the new enable auto complete

  - ### isDropDown

    public boolean isDropDown()
    Specifies whether a list in a ComboBox is always visible or is only visible when the user clicks the drop-down button.
    Returns:
      true, if is drop down

  - ### setDropDown

    public void setDropDown​(boolean isDropDown)
    Specifies whether a list in a ComboBox is always visible or is only visible when the user clicks the drop-down button.
    Parameters:
      `isDropDown` - the new drop down

  - ### getSize

    public int getSize()
    Gets the number of rows that are visible at a time in a combo box list or a list box list.
    Returns:
      the size

  - ### setSize

    public void setSize​(int size)
    Sets the number of rows that are visible at a time in a combo box list or a list box list.
    Parameters:
      `size` - the new size

  - ### isConvertEmptyToNull

    public boolean isConvertEmptyToNull()
    Specifies whether empty current values are regarded as NULL.
    Returns:
      true, if is convert empty to null

  - ### setConvertEmptyToNull

    public void setConvertEmptyToNull​(boolean convertEmptyToNull)
    Specifies whether empty current values are regarded as NULL.
    Parameters:
      `convertEmptyToNull` - the new convert empty to null

  - ### getSource

    public String getSource()
    Gets the source for the list entries in a list or combo box.
    Returns:
      the source

  - ### setSource

    public void setSource​(String source)
    Sets the source for the list entries in a list or combo box.
    Parameters:
      `source` - the new source

  - ### getSourceType

    public ListSourceType getSourceType()
    Specifies how to populate the entry list in a combo box or list box control.
    Returns:
      the source type

  - ### setSourceType

    public void setSourceType​(ListSourceType sourceType)
    Specifies how to populate the entry list in a combo box or list box control.
    Parameters:
      `sourceType` - the new source type