Class ScriptAction

All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action, SyntaxAction

public class ScriptAction extends DefaultSyntaxAction
This class executes a script every time it is called. Anything can be done using any script.
See Also:
  • Constructor Details

    • ScriptAction

      public ScriptAction()
  • Method Details

    • actionPerformed

      public void actionPerformed(JTextComponent target, SyntaxDocument sDoc, int dot, ActionEvent e)
      Description copied from class: DefaultSyntaxAction
      Convenience method that will be called if the Action is performed on a JTextComponent. SyntaxActions should generally override this method.
      Overrides:
      actionPerformed in class DefaultSyntaxAction
      Parameters:
      target - (non-null JTextComponent from Action.getSource
      sDoc - (SyntaxDOcument of the text component, could be null)
      dot - (position of caret at text document)
      e - actual ActionEvent passed to actionPerformed
    • setFunction

      public void setFunction(String name)
    • config

      public void config(Configuration config, String name)
      Description copied from interface: SyntaxAction
      Configure the actions in this class
      Specified by:
      config in interface SyntaxAction
      Overrides:
      config in class DefaultSyntaxAction
      name - Name of the action, (prefixed by Action.) will be obtained from the property Key as the text following the Action.
    • getScriptFromURL

      public void getScriptFromURL(String url)
      Parameters:
      url -