java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.inductiveautomation.ignition.designer.db.namedquery.AbstractModePanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
DirectModePanel, ExpressionModePanel

public abstract class AbstractModePanel extends JPanel
Abstract base class for mode panels (Direct and Expression modes). Provides common functionality for displaying and managing query paths and parameters.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getPath

      public String getPath()
      Gets the current query path.
      Returns:
      The query path
    • setPath

      public void setPath(String path)
      Sets the query path.
      Parameters:
      path - The query path to set
    • getTable

      public ParameterChoiceTable getTable()
      Gets the parameter table.
      Returns:
      The parameter choice table
    • setConfig

      public void setConfig(String path, Map<String,Object> args)
      Sets the configuration with path and parameters.
      Parameters:
      path - The query path
      args - The parameter arguments
    • getParams

      public Map<String,Object> getParams()
      Gets the current parameters.
      Returns:
      Map of parameter names to values
    • addChangeListener

      public void addChangeListener(ChangeListener listener)
      Adds a change listener to the parameter table.
      Parameters:
      listener - The change listener to add
    • setComponentsEnabled

      public void setComponentsEnabled(boolean enabled)
      Enables or disables the panel components.
      Parameters:
      enabled - Whether to enable the components
    • updateButtons

      public void updateButtons(JComponent[] buttons)
      Updates the action buttons in the button bar.
      Parameters:
      buttons - The new buttons to display
    • createParamPanel

      protected JPanel createParamPanel()
      Creates the parameter panel with table, scroll pane, and button bar. This method implements the common structure while allowing subclasses to customize specific parts.
      Returns:
      The parameter panel
    • createParameterTable

      protected abstract ParameterChoiceTable createParameterTable()
      Creates the parameter table. Subclasses can override to provide custom table implementations.
      Returns:
      The parameter choice table
    • updateDisplay

      public abstract void updateDisplay(String queryPath)
      Updates the display based on the query path. Subclasses implement mode-specific update logic.
      Parameters:
      queryPath - The query path