Module jEdit

Class AbstractContextOptionPane

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, OptionPane
Direct Known Subclasses:
BrowserContextOptionPane, ContextOptionPane

public abstract class AbstractContextOptionPane extends AbstractOptionPane
An abstract base class for context menu editors. Provides the base UI and functionality for creating a context menu populated with jEdit actions.
Since:
jEdit 4.3pre13
Version:
$Id: AbstractContextOptionPane.java 25314 2020-05-04 22:20:12Z kpouer $
Author:
Slava Pestov, Marcelo Vanzin
See Also:
  • Constructor Details

    • AbstractContextOptionPane

      protected AbstractContextOptionPane(String name, String caption)
      Constructor that takes a name as an argument, for use by subclasses.
      Parameters:
      name - Name of the option pane.
      caption - String to use as the caption of the context menu configuration list.
      Since:
      jEdit 4.3pre13
    • AbstractContextOptionPane

      protected AbstractContextOptionPane(String name, String caption, ActionContext actionContext)
      Constructor that takes a name as an argument, for use by subclasses.
      Parameters:
      name - Name of the option pane.
      caption - String to use as the caption of the context menu configuration list.
      actionContext - the actionContext
      Since:
      jEdit 4.5pre1
  • Method Details

    • _init

      protected void _init()
      Initializes the pane's UI.
      Overrides:
      _init in class AbstractOptionPane
    • getContextMenu

      protected abstract String getContextMenu()
      Returns the context menu to be edited. The default implementation returns jEdit's context menu. Subclasses overriding this method should also override saveContextMenu.
      Since:
      jEdit 4.3pre13
    • saveContextMenu

      protected abstract void saveContextMenu(String menu)
      Saves the context menu configuration.
      Since:
      jEdit 4.3pre13
    • addButton

      protected void addButton(JComponent c)
      Adds a widget to the "buttons" panel at the bottom. The component will be added at the very right of the button row (separated from the normal buttons).
      Since:
      jEdit 4.3pre13
    • _save

      protected void _save()
      Description copied from class: AbstractOptionPane
      Called when the options dialog's "ok" button is clicked. This should save any properties being edited in this option pane.
      Overrides:
      _save in class AbstractOptionPane