Class NamedQueryChoicePanel

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.inductiveautomation.ignition.designer.db.namedquery.NamedQueryChoicePanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class NamedQueryChoicePanel extends JPanel
Panel used to select a named query by path and set the parameters. Displays the actual query and description. Components that use this panel can register a ChangeListener to be notified when entries change.
See Also:
  • Constructor Details

    • NamedQueryChoicePanel

      public NamedQueryChoicePanel(DesignerContext designerContext, boolean updateQueriesOnly)
      For use when you need the choice panel constructed before you can make your buttons. Call setButtons to add browse buttons afterwards, if needed.
    • NamedQueryChoicePanel

      public NamedQueryChoicePanel(DesignerContext designerContext, JButton[] buttons, boolean updateQueriesOnly)
      Constructor. Buttons will be added to the right side of the parameters table, in the order they appear. This component will take care of show/hide, enable/disable; buttons need to take care of their action and tooltips.
  • Method Details

    • setButtons

      public void setButtons(JButton[] buttons)
    • createExtraTopRowComponent

      protected Optional<JComponent> createExtraTopRowComponent()
    • createParameterTable

      protected ParameterChoiceTable createParameterTable()
    • setComponentsEnabled

      public void setComponentsEnabled(boolean enabled)
    • getTable

      public ParameterChoiceTable getTable()
      Gets the parameter table, so that the action buttons passed in to this class can alter the table contents.
    • getTableValueColumn

      public int getTableValueColumn()
      Some action buttons will want to know what column they should edit.
      Returns:
      The editable column number
    • setConfig

      public void setConfig(String path, Map<String,Object> args)
      Update these panels with a new path or args.
      Parameters:
      path - A NamedQuery path. Null path will not update the path field.
      args - Arguments of the NamedQuery. May be null.
    • setPath

      public void setPath(String path)
    • getPath

      public String getPath()
    • getParams

      public Map<String,Object> getParams()
    • 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.