Class ListBox
java.lang.Object
com.independentsoft.office.odf.forms.Control
com.independentsoft.office.odf.forms.ListBox
- All Implemented Interfaces:
IFormContent,IContentElement
Defines an input control that allows a user to select one or more items from a list. It is an alternative representation for a group of radio buttons.
-
Field Summary
Fields inherited from class com.independentsoft.office.odf.forms.Control
eventListeners, parent, properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object that is a deep copy of the current instance.Gets the column values of the list source result set that are used to fill the data field values.Returns all content elements.Gets the specific concrete rendition or implementation of a control that should be instantiated.Gets the name of a column in the result set defined by a (data-aware) form.Gets the default value of an input control.getID()Gets an identifier for a control element.getName()Gets the name of a form or control element.Contains a collection of Option objects.Returns the parent content element.intgetSize()Gets the number of rows that are visible at a time in a combo box list or a list box list.Gets the source for the list entries in a list or combo box.Specifies how to populate the entry list in a combo box or list box control.intGets tabbing navigation order of controls within a form.getTitle()Gets additional information about a control.booleanSpecifies whether a control can accept user input.booleanSpecifies whether a list in a combobox or listbox element is always visible or is only visible when the user clicks the drop-down button.booleanSpecifies whether a user can select multiple items from a list box.booleanSpecifies whether a control is included in the tabbing navigation order.booleanSpecifies whether a control is printed when a user prints a document in which the control is contained.booleanSpecifies whether a user can modify the value of a control.Read-only controls are included in a tabbing navigation sequence.voidsetBoundColumn(String boundColumn)Sets the column values of the list source result set that are used to fill the data field values.voidsetControlImplementation(String controlImplementation)Sets the specific concrete rendition or implementation of a control that should be instantiated.voidsetDataField(String dataField)Sets the name of a column in the result set defined by a (data-aware) form.voidsetDefaultValue(String defaultValue)Sets the default value of an input control.voidsetDisabled(boolean isDisabled)Specifies whether a control can accept user input.voidsetDropDown(boolean isDropDown)Specifies whether a list in a combobox or listbox element is always visible or is only visible when the user clicks the drop-down button.voidsetEnableMultiSelection(boolean enableMultiSelection)Specifies whether a user can select multiple items from a list box.voidsetEnableTabbingNavigation(boolean enableTabbingNavigation)Specifies whether a control is included in the tabbing navigation order.voidSets an identifier for a control element.voidSets the name of a form or control element.voidsetParent(IContentElement parent)Sets the parent content element.voidsetPrintable(boolean isPrintable)Specifies whether a control is printed when a user prints a document in which the control is contained.voidsetReadOnly(boolean isReadOnly)Specifies whether a user can modify the value of a control.Read-only controls are included in a tabbing navigation sequence.voidsetSize(int size)Sets the number of rows that are visible at a time in a combo box list or a list box list.voidSets the source for the list entries in a list or combo box.voidsetSourceType(ListSourceType sourceType)Specifies how to populate the entry list in a combo box or list box control.voidsetTabIndex(int tabIndex)Sets tabbing navigation order of controls within a form.voidSets additional information about a control.toString()Converts the value of the current ListBox object to its equivalent string representation.Methods inherited from class com.independentsoft.office.odf.forms.Control
getEventListeners, getProperties
-
Constructor Details
-
ListBox
public ListBox()Initializes a new instance of the ListBox class.
-
-
Method Details
-
getContentElements
Returns all content elements.- Specified by:
getContentElementsin interfaceIContentElement- Specified by:
getContentElementsin classControl- Returns:
- A collection of content elements.
-
getParent
Returns the parent content element.- Specified by:
getParentin interfaceIContentElement- Overrides:
getParentin classControl- Returns:
- the parent
-
setParent
Sets the parent content element.- Specified by:
setParentin interfaceIContentElement- Overrides:
setParentin classControl- Parameters:
parent- the new parent
-
clone
Creates a new object that is a deep copy of the current instance.- Specified by:
clonein interfaceIContentElement- Specified by:
clonein interfaceIFormContent- Specified by:
clonein classControl- Returns:
- A new object that is a copy of this instance.
-
toString
Converts the value of the current ListBox object to its equivalent string representation. -
getOptions
Contains a collection of Option objects.- Returns:
- the options
-
getName
Gets the name of a form or control element.- Returns:
- the name
-
setName
Sets the name of a form or control element.- Parameters:
name- the new name
-
getControlImplementation
Gets the specific concrete rendition or implementation of a control that should be instantiated.- Returns:
- the control implementation
-
setControlImplementation
Sets the specific concrete rendition or implementation of a control that should be instantiated.- Parameters:
controlImplementation- the new control implementation
-
getID
Gets an identifier for a control element.- Returns:
- the id
-
setID
Sets an identifier for a control element.- Parameters:
id- the new id
-
getDefaultValue
Gets the default value of an input control.- Returns:
- the default value
-
setDefaultValue
Sets the default value of an input control.- Parameters:
defaultValue- the new default 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
-
isReadOnly
public boolean isReadOnly()Specifies whether a user can modify the value of a control.Read-only controls are included in a tabbing navigation sequence.- Returns:
- true, if is read only
-
setReadOnly
public void setReadOnly(boolean isReadOnly)Specifies whether a user can modify the value of a control.Read-only controls are included in a tabbing navigation sequence.- 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
-
getTitle
Gets additional information about a control.- Returns:
- the title
-
setTitle
Sets additional information about a control.- Parameters:
title- the new title
-
isEnableMultiSelection
public boolean isEnableMultiSelection()Specifies whether a user can select multiple items from a list box.- Returns:
- true, if is enable multi selection
-
setEnableMultiSelection
public void setEnableMultiSelection(boolean enableMultiSelection)Specifies whether a user can select multiple items from a list box.- Parameters:
enableMultiSelection- the new enable multi selection
-
isDropDown
public boolean isDropDown()Specifies whether a list in a combobox or listbox element 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 or listbox element 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
-
getBoundColumn
Gets the column values of the list source result set that are used to fill the data field values.- Returns:
- the bound column
-
setBoundColumn
Sets the column values of the list source result set that are used to fill the data field values.- Parameters:
boundColumn- the new bound column
-
getDataField
Gets 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
Sets 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
-
getSource
Gets the source for the list entries in a list or combo box.- Returns:
- the source
-
setSource
Sets the source for the list entries in a list or combo box.- Parameters:
source- the new source
-
getSourceType
Specifies how to populate the entry list in a combo box or list box control.- Returns:
- the source type
-
setSourceType
Specifies how to populate the entry list in a combo box or list box control.- Parameters:
sourceType- the new source type
-