Class ParameterChoiceTable

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
com.jidesoft.grid.JideTable
com.jidesoft.grid.ContextSensitiveTable
com.jidesoft.grid.NavigableTable
com.jidesoft.grid.CellStyleTable
com.jidesoft.grid.CellSpanTable
com.jidesoft.grid.CategorizedTable
com.jidesoft.grid.SortableTable
com.inductiveautomation.ignition.designer.db.namedquery.ParameterChoiceTable
All Implemented Interfaces:
com.jidesoft.grid.IndexChangeListener, com.jidesoft.grid.SortListener, com.jidesoft.grid.TableAdapter, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable

public class ParameterChoiceTable extends com.jidesoft.grid.SortableTable
Table used to fill in a NamedQuery's parameters with a value. Classes which use this can register a ChangeListener to find out when the table model changes.
See Also:
  • Field Details

  • Constructor Details

    • ParameterChoiceTable

      public ParameterChoiceTable()
  • Method Details

    • setParams

      @Deprecated public void setParams(@Nullable Map<String,Object> params)
      Deprecated.
    • setParams

      public void setParams(@Nullable String path, @Nullable Map<String,Object> params)
      This method does not directly update the table. Instead, it caches values to use when the table is updated.
      Parameters:
      params - is a map of id/value pairs for parameters. May be null.
    • update

      @Deprecated public void update(NamedQuery query)
      Deprecated.
    • update

      public void update(@Nullable String path, @Nullable NamedQuery query)
      Updates the parameter table based on the parameters in the named query passed in. We'll try to use existing values where they exist, falling back to cached values if we need to, falling back to an empty string if all else fails.
      Parameters:
      path - is the path to the query
      query - is an updated named query.
    • getParams

      public Map<String,Object> getParams()
      Gets the parameters currently displayed in the table and returns them as a hashmap.
      Returns:
      hashmap of parameter names (string) and values (object)
    • prepareEditor

      public Component prepareEditor(@Nonnull TableCellEditor editor, int row, int column)
      Overrides:
      prepareEditor in class com.jidesoft.grid.CellSpanTable
    • getCellRenderer

      public TableCellRenderer getCellRenderer(int row, int column)
      Overrides:
      getCellRenderer in class com.jidesoft.grid.CellSpanTable
    • getCellEditor

      public TableCellEditor getCellEditor(int row, int column)
      Overrides:
      getCellEditor in class com.jidesoft.grid.CellSpanTable
    • addChangeListener

      public void addChangeListener(ChangeListener listener)
      Adds a ChangeListener that will be notified when the table model changes.
      Parameters:
      listener - Not null.
    • removeChangeListener

      public void removeChangeListener(ChangeListener listener)
      Removes a previously added ChangeListener. No effect if the listener was not already added
      Parameters:
      listener - Not null.
    • fireStateChanged

      protected void fireStateChanged()
      Tell all the listeners who care that something important changed.