Package com.iizix.prop.ui.table
Class TableCombo
java.lang.Object
com.iizix.prop.ui.table.TableCombo
The TableCombo is used for a cell in a table in conjunction with a content provider.
The table registers the comboboxes to use with an ID. Each instance is created from the table component prior to use in cells.
This class is thread-safe.
- Author:
- Christopher Mindus
Field Summary
Method Summary
Modifier and TypeMethodDescriptionKString[]
Gets the contents as strings.String[]
Gets the contents as strings.getTable()
Gets the table associated with this table combo.int
getType()
Gets the contents type.boolean
Returns if this combo contents should be editable.void
setKStringContents
(Collection<KString> list) Sets the KString contents of this combo.void
setStringContents
(Collection<String> list) Sets the string contents of this combo.toString()
Converts to a debug string.
Field Details
id
public final int idThe unique ID of this table combo instance.
Method Details
getTable
Gets the table associated with this table combo.isEditable
public boolean isEditable()Returns if this combo contents should be editable.- Returns:
- true if it is editable by the user.
setStringContents
Sets the string contents of this combo. It can only be set once.- Parameters:
list
- The list of non-null strings.- Throws:
NullPointerException
- If the list is null or has null items.IllegalStateException
- If the contents already has been set.
setKStringContents
Sets the KString contents of this combo. It can only be set once.- Parameters:
list
- The list of non-null KStrings.- Throws:
NullPointerException
- If the list is null or has null items.IllegalStateException
- If the contents already has been set.
getType
public int getType()Gets the contents type.- Returns:
- The contents type: -1 if not set, 0=String contents, 1=KString contents.
getStringContents
Gets the contents as strings.- Returns:
- An array of strings, or null for not strings contents.
getKStringContents
Gets the contents as strings.- Returns:
- An array of strings, or null for not strings contents.
toString
Converts to a debug string.