Class DefaultSyntaxAction

All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action, SyntaxAction
Direct Known Subclasses:
ComboCompletionAction, CompleteWordAction, DeleteLinesAction, DuplicateLinesAction, FindNextAction, FindReplaceAction, GotoLineAction, HTMLPreviewAction, IndentAction, JIndentAction, JumpToPairAction, JUnindentAction, MapCompletionAction, PairAction, PythonIndentAction, QuickFindAction, RedoAction, ReflectCompletionAction, ScriptAction, ScriptRunnerAction, ShowAbbsAction, SmartHomeAction, SmartHomeSelectAction, TemplateAction, ToggleCommentsAction, ToggleComponentAction, UndoAction, UnindentAction, XmlPrettifyAction, XmlTagCompleteAction

public abstract class DefaultSyntaxAction extends TextAction implements SyntaxAction
The DefaultSyntaxAction. You can extend this class or implement the interface SyntaxAction to create your own actions.
See Also:
  • Field Details

  • Constructor Details

    • DefaultSyntaxAction

      public DefaultSyntaxAction(String actionName)
  • Method Details

    • 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
      Parameters:
      config -
      name - Name of the action, (prefixed by Action.) will be obtained from the property Key as the text following the Action.
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • actionPerformed

      public void actionPerformed(JTextComponent target, SyntaxDocument sDoc, int dot, ActionEvent e)
      Convenience method that will be called if the Action is performed on a JTextComponent. SyntaxActions should generally override this method.
      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
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setMenuText

      public final void setMenuText(String text)
      Configure the MenuText for the Action
      Parameters:
      text -
    • setToolTip

      public final void setToolTip(String text)
      Configure the ToolTip for the Action
      Parameters:
      text -
    • setLargeIcon

      public final void setLargeIcon(String url)
      Sets the Large Icon for this action from given url
      Parameters:
      url -
    • setSmallIcon

      public final void setSmallIcon(String url)
      Configure the SmallIcon for the Action
      Parameters:
      url -