Class TableCombo

java.lang.Object
com.iizix.prop.ui.table.TableCombo

public class TableCombo extends 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 Details

    • id

      public final int id
      The unique ID of this table combo instance.
  • Method Details

    • 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(Collection<String> list)
      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

      public void setKStringContents(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:
      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

      public 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 String toString()
      Converts to a debug string.
      Overrides:
      toString in class Object