org.graffiti.plugin
Class GenericPluginAdapter

java.lang.Object
  extended by org.graffiti.plugin.GenericPluginAdapter
All Implemented Interfaces:
GenericPlugin
Direct Known Subclasses:
DefaultPlugins, EditorPluginAdapter

public abstract class GenericPluginAdapter
extends Object
implements GenericPlugin

An adapter class for the generic plugin interface.

Version:
$Revision: 5767 $

Field Summary
protected  Algorithm[] algorithms
          The algorithms the plugin provides.
protected  String ARBITRARY
           
protected  Class<?>[] attributes
          The attribute types the plugin provides.
protected  String BETA
           
protected  String DELETE
           
protected  String[] dependencies
          The plugin's dependencies.
protected  InputSerializer[] inputSerializers
          The input serializers of this plugin.
protected  String ISOMORPHISM
           
protected  String MST
           
protected  String NETWORK_FLOW
           
protected  String ORTHOGONAL
           
protected  OutputSerializer[] outputSerializers
          The output serializers of this plugin.
protected  String PLANAR
           
protected  Preferences prefs
          The preferences for this plugin.
protected  String SUGIYAMA
           
protected  String TREES
           
protected  String[] views
          The views the plugin provides (class names of the views).
 
Constructor Summary
protected GenericPluginAdapter()
          Constructs a new 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 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prefs

protected Preferences prefs
The preferences for this plugin.


algorithms

protected Algorithm[] algorithms
The algorithms the plugin provides.


attributes

protected Class<?>[] attributes
The attribute types the plugin provides.


dependencies

protected String[] dependencies
The plugin's dependencies.


inputSerializers

protected InputSerializer[] inputSerializers
The input serializers of this plugin.


outputSerializers

protected OutputSerializer[] outputSerializers
The output serializers of this plugin.


views

protected String[] views
The views the plugin provides (class names of the views).


BETA

protected final String BETA
See Also:
Constant Field Values

DELETE

protected final String DELETE
See Also:
Constant Field Values

TREES

protected final String TREES
See Also:
Constant Field Values

PLANAR

protected final String PLANAR
See Also:
Constant Field Values

ISOMORPHISM

protected final String ISOMORPHISM
See Also:
Constant Field Values

MST

protected final String MST
See Also:
Constant Field Values

ORTHOGONAL

protected final String ORTHOGONAL
See Also:
Constant Field Values

NETWORK_FLOW

protected final String NETWORK_FLOW
See Also:
Constant Field Values

ARBITRARY

protected final String ARBITRARY
See Also:
Constant Field Values

SUGIYAMA

protected final String SUGIYAMA
See Also:
Constant Field Values
Constructor Detail

GenericPluginAdapter

protected GenericPluginAdapter()
Constructs a new GenericPluginAdapter.

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:36 PM CEST