org.graffiti.plugin
Interface GenericPlugin

All Known Implementing Classes:
GenericPluginAdapter

public interface GenericPlugin

An interface for a generic plugin for the graffiti graph editor. Any plugin which shall be able to be plugged into the editor must implement this interface.
Implementation note
: The getter-Methods of this interface may not return null. If you want to prevent yourself from implementing every such method you can also extend the abstract class GenericPluginAdapter.


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 prefs)
          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 icon of the plugin.
 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 class names of the views, this 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.
 

Method Detail

getAlgorithms

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

Returns:
the array of org.graffiti.algorithm.Algorithms the plugin contains.

getAttributes

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

Returns:
the attribute types provided by this plugin.

getDependencies

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

Returns:
the array containing the names of the plugin classes the current plugin depends on.

getIcon

ImageIcon getIcon()
Returns the icon of the plugin.

Returns:
the icon of the plugin.

getInputSerializers

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

Returns:
the input serializers the plugin provides.

getOutputSerializers

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

Returns:
the output serializers the plugin provides.

isSelectionListener

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

Returns:
DOCUMENT ME!

isSessionListener

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

Returns:
DOCUMENT ME!

isViewListener

boolean isViewListener()
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.

Returns:
DOCUMENT ME!

getViews

String[] getViews()
Returns the array of class names of the views, this plugin contains.

Returns:
the array of class names this plugin contains.

configure

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

Parameters:
prefs - the 'plugins' preferences node.

doBeforeExit

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


interrupt

void interrupt()
Interrupts the running plugin.


needsEditComponents

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.

Returns:
DOCUMENT ME!

stop

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


getName

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

Returns:
The plugin's name.

addJSeparatorAfterAlgorithm

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.

Parameters:
index - The index of the algorithm.
Returns:
true if a JSeparator should be added.

getPathInformation

PluginPathNode getPathInformation()


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