Package com.iizix.prop.ui.table
Class TableCombo
- java.lang.Object
-
- com.iizix.prop.ui.table.TableCombo
-
public class TableCombo extends java.lang.Object
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
Fields Modifier and Type Field Description int
id
The unique ID of this table combo instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KString[]
getKStringContents()
Gets the contents as strings.java.lang.String[]
getStringContents()
Gets the contents as strings.UITable
getTable()
Gets the table associated with this table combo.int
getType()
Gets the contents type.boolean
isEditable()
Returns if this combo contents should be editable.void
setKStringContents(java.util.Collection<KString> list)
Sets the KString contents of this combo.void
setStringContents(java.util.Collection<java.lang.String> list)
Sets the string contents of this combo.java.lang.String
toString()
Converts to a debug string.
-
-
-
Method Detail
-
getTable
public UITable 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
public void setStringContents(java.util.Collection<java.lang.String> list)
Sets the string contents of this combo. It can only be set once.- Parameters:
list
- The list of non-null strings.- Throws:
java.lang.NullPointerException
- If the list is null or has null items.java.lang.IllegalStateException
- If the contents already has been set.
-
setKStringContents
public void setKStringContents(java.util.Collection<KString> list)
Sets the KString contents of this combo. It can only be set once.- Parameters:
list
- The list of non-null KStrings.- Throws:
java.lang.NullPointerException
- If the list is null or has null items.java.lang.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
public java.lang.String[] getStringContents()
Gets the contents as strings.- Returns:
- An array of strings, or null for not strings contents.
-
getKStringContents
public KString[] getKStringContents()
Gets the contents as strings.- Returns:
- An array of strings, or null for not strings contents.
-
toString
public java.lang.String toString()
Converts to a debug string.- Overrides:
toString
in classjava.lang.Object
-
-