Type Parameters:
T - the type of the resource
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
AccelerometerScriptTab, AuthChallengeScriptTab, BarcodeScriptTab, BluetoothScriptTab, FormSubmissionScriptTab, KeyEventScriptTab, KeystrokeScriptTab, MenubarScriptTab, MessageHandlerScriptTab, NfcScanScriptTab, PageStartupScriptTab, ScheduledScriptTab, ShutdownInterceptScriptTab, ShutdownScriptTab, StartupScriptTab, TagChangeScriptTab, TimerScriptTab, UpdateScriptTab

public abstract class EventScriptTab<T> extends ResourceEditor<T>
Abstract base class for event script tabs. Extends ResourceEditor to provide common functionality for script editing.
See Also:
  • Field Details

    • scriptEditor

      protected com.inductiveautomation.ignition.designer.gui.tools.ExtensionFunctionPanel scriptEditor
    • scope

      protected int scope
    • editorPanel

      protected JPanel editorPanel
    • enabledCheckbox

      protected JCheckBox enabledCheckbox
    • titleKey

      protected String titleKey
  • Constructor Details

  • Method Details

    • getTabTitle

      public String getTabTitle()
      Overrides:
      getTabTitle in class ResourceEditor<T>
    • initEditorPanel

      protected void initEditorPanel()
      Initializes the editor panel with a script editor and enabled checkbox. This is the default behavior for setting up the editor panel. Subclasses can override the `init` method if they require custom initialization and do not wish to call this default setup.
    • resourceDescriptor

      protected ResourceDescriptor resourceDescriptor()
      Description copied from class: ResourceEditor
      Returns the resource descriptor for the workspace.

      By default, this implementation supports TabbedResourceWorkspace. Subclasses should override this method to provide a specific resource descriptor for the type of resource they are working with.

      Overrides:
      resourceDescriptor in class ResourceEditor<T>
    • dispose

      public void dispose()
      Provides a default implementation to shut down the python editor. Unregisters the completion provider from the ScriptIndexer to avoid memory leaks or dangling references.
      Overrides:
      dispose in class ResourceEditor<T>
    • getScriptHints

      protected Supplier<PackageTreeNode> getScriptHints()
      Defaults to Gateway hints.
    • getFunctionDescriptor

      protected abstract com.inductiveautomation.ignition.common.script.typing.ExtensionFunctionDescriptor getFunctionDescriptor()
      Returns the descriptor for the extension function associated with this script editor.