org.graffiti.plugin
Class GenericPluginAdapter

java.lang.Object
  extended by org.graffiti.plugin.GenericPluginAdapter
All Implemented Interfaces:
GenericPlugin

public abstract class GenericPluginAdapter
extends Object
implements GenericPlugin

An adapter class for the generic plugin interface.

Version:
$Revision: 5767 $

Method Summary
 boolean addJSeparatorAfterAlgorithm(int index)
          Used to specify whether a JSeparator should be added after an algorithm in the plugin menu of Gravisto.
 void configure(Preferences p)
          Runs configuration routines for the plugin, e.g.
 void doBeforeExit()
          The routines to perform before the editor will exit.
 Algorithm[] getAlgorithms()
          Returns the array of org.graffiti.algorithm.Algorithms the plugin contains.
 Class<?>[] getAttributes()
          Returns the attribute types provided by this plugin.
 String[] getDependencies()
          Returns the array containing the names of the plugin classes the current plugin depends on.
 ImageIcon getIcon()
          Returns the default icon for a plugin, which does not overwrite this method.
 InputSerializer[] getInputSerializers()
          Returns the input serializers the plugin provides.
 String getName()
          Returns the plugin's name.
 OutputSerializer[] getOutputSerializers()
          Returns the output serializers the plugin provides.
 PluginPathNode getPathInformation()
           
 String[] getViews()
          Returns the array of org.graffiti.plugin.view.Views the plugin contains.
 void interrupt()
          Interrupts the running plugin.
 boolean isSelectionListener()
          States whether this class wants to be registered as a SelectionListener.
 boolean isSessionListener()
          States whether this class wants to be registered as a SessionListener.
 boolean isViewListener()
          States whether this class wants to be registered as a ViewListener, i.e.
 boolean needsEditComponents()
          States whether this class needs up-to-date information about the current editcomponents.
 void stop()
          Stops a running plugin.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAlgorithms

public Algorithm[] getAlgorithms()
Returns the array of org.graffiti.algorithm.Algorithms the plugin contains.

Specified by:
getAlgorithms in interface GenericPlugin
Returns:
the array of org.graffiti.algorithm.Algorithms the plugin contains.

getAttributes

public Class<?>[] getAttributes()
Returns the attribute types provided by this plugin.

Specified by:
getAttributes in interface GenericPlugin
Returns:
the attribute types provided by this plugin.

getDependencies

public String[] getDependencies()
Returns the array containing the names of the plugin classes the current plugin depends on.

Specified by:
getDependencies in interface GenericPlugin
Returns:
the array containing the names of the plugin classes the current plugin depends on.

getIcon

public ImageIcon getIcon()
Returns the default icon for a plugin, which does not overwrite this method.

Specified by:
getIcon in interface GenericPlugin
Returns:
the default plugin icon for a plugin implementation, which does not overwrite this method.

getInputSerializers

public InputSerializer[] getInputSerializers()
Returns the input serializers the plugin provides.

Specified by:
getInputSerializers in interface GenericPlugin
Returns:
the input serializers the plugin provides.

getOutputSerializers

public OutputSerializer[] getOutputSerializers()
Returns the output serializers the plugin provides.

Specified by:
getOutputSerializers in interface GenericPlugin
Returns:
the output serializers the plugin provides.

isSelectionListener

public boolean isSelectionListener()
States whether this class wants to be registered as a SelectionListener.

Specified by:
isSelectionListener in interface GenericPlugin
Returns:
DOCUMENT ME!

isSessionListener

public boolean isSessionListener()
States whether this class wants to be registered as a SessionListener.

Specified by:
isSessionListener in interface GenericPlugin
Returns:
DOCUMENT ME!

isViewListener

public boolean isViewListener()
Description copied from interface: GenericPlugin
States whether this class wants to be registered as a ViewListener, i.e. if it wants to get informed when another view in the same session becomes active. This method is not called when another session is activated. Implement SessionListener if you are interested in session changed events.

Specified by:
isViewListener in interface GenericPlugin
Returns:
DOCUMENT ME!
See Also:
GenericPlugin.isViewListener()

getViews

public String[] getViews()
Returns the array of org.graffiti.plugin.view.Views the plugin contains.

Specified by:
getViews in interface GenericPlugin
Returns:
the array of org.graffiti.plugin.view.Views the plugin contains.

configure

public void configure(Preferences p)
Runs configuration routines for the plugin, e.g. load preferences etc.

Specified by:
configure in interface GenericPlugin
Parameters:
p - DOCUMENT ME!

doBeforeExit

public void doBeforeExit()
The routines to perform before the editor will exit.

Specified by:
doBeforeExit in interface GenericPlugin

interrupt

public void interrupt()
Interrupts the running plugin.

Specified by:
interrupt in interface GenericPlugin

needsEditComponents

public boolean needsEditComponents()
States whether this class needs up-to-date information about the current editcomponents. If this method returns true, it must implement interface NeedEditComponents.

Specified by:
needsEditComponents in interface GenericPlugin
Returns:
DOCUMENT ME!

stop

public void stop()
Stops a running plugin. Performs exit routines.

Specified by:
stop in interface GenericPlugin

getName

public String getName()
Returns the plugin's name. If the plugin has a name, a submenu in the plugin menu of Gravisto is created.

Specified by:
getName in interface GenericPlugin
Returns:
The plugin's name.

addJSeparatorAfterAlgorithm

public boolean addJSeparatorAfterAlgorithm(int index)
Used to specify whether a JSeparator should be added after an algorithm in the plugin menu of Gravisto. JSeparators are added when getName is implemented only.

Specified by:
addJSeparatorAfterAlgorithm in interface GenericPlugin
Parameters:
index - The index of the algorithm.
Returns:
false
See Also:
GenericPlugin.addJSeparatorAfterAlgorithm(int)

getPathInformation

public PluginPathNode getPathInformation()
Specified by:
getPathInformation in interface GenericPlugin


Generated at 2012-05-30 11:00:14 PM CEST