org.pf.tools.cda.ui.plugin.spi
Class ASubWindowPlugin

java.lang.Object
  extended by org.pf.tools.cda.xpi.APluginImplementation
      extended by org.pf.tools.cda.ui.xpi.AActionPlugin
          extended by org.pf.tools.cda.ui.plugin.spi.ASubWindowPlugin
All Implemented Interfaces:
IPluginActionInfo, IPluginInfo

public abstract class ASubWindowPlugin
extends AActionPlugin

This abstract class specifies the methods to be implemented by all subclasses that are intended to provide a sub-window to the main application.

Each concrete subclass must specifiy a public non-argument constructor.

Version:
1.0
Author:
M.Duchrow

Field Summary
 
Fields inherited from interface org.pf.tools.cda.ui.xpi.IPluginActionInfo
EMPTY_ARRAY
 
Method Summary
 void close()
          This method must be called in order to close this plug-in with its window and automatically inform its controller.
abstract  java.awt.Frame createFrame(IExplorationModelObject object)
          This method must be implemented to create the whole UI of the new window.
 void dispose()
          This method will be called right before the plug-in gets closed.
 PluginConfiguration getConfiguration(java.awt.Frame parent)
          Returns the configuration data that might be necessary to execute the plugin's functionality
 IIntegrationService getIntegrationService()
          Returns the integration service that is the interface to the main application.
 void initialize(PluginConfiguration config)
          This method will be called right after the plug-in has been created and connected to the internal structures.
 void setIntegrationService(IIntegrationService newValue)
          Do NOT call this method.
 
Methods inherited from class org.pf.tools.cda.ui.xpi.AActionPlugin
getDisabledIconFilename, getEnabledIconFilename, getToolTipText
 
Methods inherited from class org.pf.tools.cda.xpi.APluginImplementation
getPluginId, setPluginId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pf.tools.cda.ui.xpi.IPluginActionInfo
getActionText
 
Methods inherited from interface org.pf.tools.cda.xpi.IPluginInfo
getPluginId, getPluginProvider, getPluginVersion
 

Method Detail

getIntegrationService

public IIntegrationService getIntegrationService()
Returns the integration service that is the interface to the main application. Its purpose is to provide all necessary data from the main application and functionality which might be useful in plug-ins as well.


setIntegrationService

public void setIntegrationService(IIntegrationService newValue)
Do NOT call this method. It is public because it is used to initialize the plug-in.


createFrame

public abstract java.awt.Frame createFrame(IExplorationModelObject object)
This method must be implemented to create the whole UI of the new window. It returns a Frame containing all widgets that are necessary to show whatever the plug-in wants to show.

Parameters:
object - The element on which this plug-in was invoked
Returns:
A frame or null. If null is returned the plug-in execution get cancelled.

getConfiguration

public PluginConfiguration getConfiguration(java.awt.Frame parent)
Returns the configuration data that might be necessary to execute the plugin's functionality

Parameters:
parent - The parent frame from which the plugin is used
Returns:
A configuration or null

initialize

public void initialize(PluginConfiguration config)
This method will be called right after the plug-in has been created and connected to the internal structures. The purpose of this method is to do all necessary initialization. Do NOT use the constructor for initialization because the plug-in is not connected and basically initialized at that time.
Instead use this method.

This is an empty implementation of this method which is convenient for subclasses that don't need an initialization at all.


dispose

public void dispose()
This method will be called right before the plug-in gets closed. Its purpose is to release all resources and clean-up everything to avoid memory leaks.
Subclasses that override this method should always call super.dispose() at the end of the overriden method.

This here is an empty implementation of this method which is convenient for subclasses that don't need to dispose anything..


close

public void close()
This method must be called in order to close this plug-in with its window and automatically inform its controller.