Class AbstractMultiExtensionFunctionScriptEditor<K extends Comparable<K>>

Type Parameters:
K - The key to store the scripts under.
All Implemented Interfaces:
Locatable, ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
KeyEventScriptEditor, MessageHandlerEditor

public abstract class AbstractMultiExtensionFunctionScriptEditor<K extends Comparable<K>> extends GlobalScriptEditor.ScriptConfigPanel implements Locatable
An alternative to AbstractMultiScriptEditor, which embeds a 'modern' ExtensionFunctionPanel instead.
See Also:
  • Field Details

    • splitPane

      protected JSplitPane splitPane
    • scriptArea

      protected com.inductiveautomation.ignition.designer.gui.tools.ExtensionFunctionPanel scriptArea
    • list

      protected JList<K extends Comparable<K>> list
    • scripts

      protected Map<K extends Comparable<K>,String> scripts
    • listModel

      protected MapListModel listModel
    • currentEdit

      protected K extends Comparable<K> currentEdit
    • LIST_NORMAL

      protected static Font LIST_NORMAL
    • LIST_DISABLED

      protected static Font LIST_DISABLED
  • Constructor Details

    • AbstractMultiExtensionFunctionScriptEditor

      protected AbstractMultiExtensionFunctionScriptEditor()
  • Method Details

    • initComponents

      protected void initComponents()
    • getScriptEditorPanel

      protected com.inductiveautomation.ignition.designer.gui.tools.ExtensionFunctionPanel getScriptEditorPanel()
    • createScriptEditor

      protected com.inductiveautomation.ignition.designer.gui.tools.ExtensionFunctionPanel createScriptEditor()
    • getUserScript

      protected String getUserScript()
      Retrieve the script to actually store into the scripts map.
    • setUserScript

      protected void setUserScript(K key)
      Apply the script from key to the current script area.
    • getCompilableScript

      protected String getCompilableScript(K key)
      Retrieve a compileable version of the script under key. Used during the save to ensure script isn't obviously wrong.
    • buildDescriptor

      protected abstract com.inductiveautomation.ignition.common.script.typing.ExtensionFunctionDescriptor buildDescriptor()
    • getDefaultNewScript

      protected String getDefaultNewScript()
    • configureListCell

      protected void configureListCell(JLabel cell, K item, boolean isSelected)
    • isReconfigureActionPresent

      protected abstract boolean isReconfigureActionPresent()
      Should item's keys be reconfigurable?
    • getNoun

      protected abstract String getNoun()
      Return of name of the thing being configured, "timer" for "timer scripts", etc."
    • getNewIcon

      protected abstract Icon getNewIcon()
    • getDeleteIcon

      protected abstract Icon getDeleteIcon()
    • getReconfigureIcon

      protected abstract Icon getReconfigureIcon()
    • doNew

      protected void doNew()
    • toString

      protected String toString(K key)
    • getCappedNoun

      protected String getCappedNoun()
    • chooseNewKey

      protected abstract K chooseNewKey()
    • doDelete

      protected void doDelete()
    • reconfigureKey

      protected abstract K reconfigureKey(K key)
    • doReconfigure

      protected void doReconfigure()
    • getScripts

      protected abstract Map<K,String> getScripts(ScriptConfig sc)
    • storeScripts

      protected abstract void storeScripts(ScriptConfig sc, Map<K,String> scripts)
    • init

      public boolean init(ScriptConfig sc)
      Specified by:
      init in class GlobalScriptEditor.ScriptConfigPanel
    • doSave

      public void doSave(ScriptConfig sc) throws PropertyVetoException
      Specified by:
      doSave in class GlobalScriptEditor.ScriptConfigPanel
      Throws:
      PropertyVetoException
    • installHints

      public void installHints(Map<String,List<ScriptFunctionHint>> hints)
      Specified by:
      installHints in class GlobalScriptEditor.ScriptConfigPanel
    • toLocatableValue

      protected abstract String toLocatableValue(K key)
    • locate

      public void locate(Location location)
      Specified by:
      locate in interface Locatable