net.sourceforge.jsxe
Class ActionPlugin

java.lang.Object
  extended bynet.sourceforge.jsxe.ActionPlugin
Direct Known Subclasses:
ActionPlugin.Broken, ViewPlugin

public abstract class ActionPlugin
extends Object

This defines the general interface that all plugins for jsXe must implement. There are two types of plugins, ViewPlugins and ActionPlugins. ViewPlugins specify a view that can be used to edit XML documents. ActionPlugins add actions to jsXe allowing it to do extra tasks such as XSLT transformation.

Since:
jsXe 0.3 beta
Version:
$Id: ActionPlugin.java,v 1.12 2006/02/04 00:39:54 ian_lewis Exp $
Author:
Ian Lewis (IanLewis@member.fsf.org)

Nested Class Summary
static class ActionPlugin.Broken
           
 
Constructor Summary
ActionPlugin()
          Constructs an ActionPlugin with the supplied values.
 
Method Summary
protected  void addAction(String name, Action action)
          Allows subclasses to add actions to the ActionSet for the plugin.
 ActionSet getActionSet()
          Gets the ActionSet for this plugin.
 OptionsPanel getOptionsPanel(DocumentBuffer buffer)
          Gets the options panel for setting general plugin options.
 JMenu getPluginMenu()
          Returns the menu that appears in the tools menu in jsXe.
 Properties getProperties()
          The properties to add to jsXe when the plugin is loaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionPlugin

public ActionPlugin()
Constructs an ActionPlugin with the supplied values.

Method Detail

getPluginMenu

public JMenu getPluginMenu()
Returns the menu that appears in the tools menu in jsXe. This can include menu items for actions that are included with the plugin. The default implementation returns null.

Returns:
the menu for this plugin.

getOptionsPanel

public OptionsPanel getOptionsPanel(DocumentBuffer buffer)
Gets the options panel for setting general plugin options. The default implementation returns null.

Returns:
an OptionsPanel for editing this plugin's options

getProperties

public Properties getProperties()
The properties to add to jsXe when the plugin is loaded. The default iplementation returns an empty properties set.

Returns:
the plugin's properties

addAction

protected void addAction(String name,
                         Action action)
Allows subclasses to add actions to the ActionSet for the plugin. Normally this would be done during initialization of the plugin.

Parameters:
name - the name of the action
action - the action itself

getActionSet

public ActionSet getActionSet()
Gets the ActionSet for this plugin. These actions can be executed through menus and such.

Returns:
the ActionSet containing actions added by this plugin.