jrworkspace by
jTEM

de.jtem.jrworkspace.plugin
Class Plugin

java.lang.Object
  extended by de.jtem.jrworkspace.plugin.Plugin
Direct Known Subclasses:
EmptyPerspective, JRDesktopFrame, JRDesktopPlugin, LookAndFeelPlugin, LookAndFeelSwitch, MenuAggregator, PluginManager, ShrinkPanelPlugin, SideContainerPerspective, ToolBarAggregator

public abstract class Plugin
extends Object

The base class for all plug-ins of the jRWorkspace plug-in mechanism. The order of calls in the life cycle of a plug-in is 1. - restoreStates(Controller) 2. - install(Controller) 3. - uninstall(Controller) 4. - storeStates(Controller)

PluginInfo

It is strongly recommended that you override getPluginInfo() to return a descriptive PluginInfo. This method is called in the constructor of this class and must not return null.

Author:
Stefan Sechelmann

Constructor Summary
Plugin()
           
 
Method Summary
 boolean equals(Object obj)
          A plug-in is unique throughout the controller so the equals method compares the classes
 PluginInfo getPluginInfo()
          Returns an instance of PluginInfo
 int hashCode()
          This method simply returns getClass().hashCode()
 void install(Controller c)
          Is called when the plug-in is installed
 void restoreStates(Controller c)
          Is called before the installation of this plug-in.
 void storeStates(Controller c)
          Is called after this plug-in has been uninstalled.
 String toString()
          Returns this plug-ins name or "No Name" if name is null
 void uninstall(Controller c)
          Id called when this plug-in is about to be uninstalled
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Plugin

public Plugin()
Method Detail

equals

public boolean equals(Object obj)
A plug-in is unique throughout the controller so the equals method compares the classes

Overrides:
equals in class Object

getPluginInfo

public PluginInfo getPluginInfo()
Returns an instance of PluginInfo

Returns:
plug-in information
See Also:
PluginInfo}

hashCode

public int hashCode()
This method simply returns getClass().hashCode()

Overrides:
hashCode in class Object
See Also:
equals

install

public void install(Controller c)
             throws Exception
Is called when the plug-in is installed

Parameters:
c - the applications Controller
Throws:
Exception
See Also:
Controller}

restoreStates

public void restoreStates(Controller c)
                   throws Exception
Is called before the installation of this plug-in. The recommended way to read properties is to call Controller.getProperty(Class, String, Object) on the controller provided as argument.

Parameters:
c - this applications Controller
Throws:
Exception
See Also:
Controller}

storeStates

public void storeStates(Controller c)
                 throws Exception
Is called after this plug-in has been uninstalled. The recommended way to save properties is to call Controller.storeProperty(Class, String, Object) on the controller provided as argument.

Parameters:
cthis - applications Controller
Throws:
Exception
See Also:
Controller}

toString

public String toString()
Returns this plug-ins name or "No Name" if name is null

Overrides:
toString in class Object

uninstall

public void uninstall(Controller c)
               throws Exception
Id called when this plug-in is about to be uninstalled

Parameters:
c - this applications Controller
Throws:
Exception
See Also:
Controller}

jrworkspace by
jTEM

jTEM