org.fife.ui.app
Interface Plugin

All Known Implementing Classes:
AbstractPlugin, FileSystemTreePlugin, GUIPlugin, HeapIndicatorPlugin, MacroPlugin, Plugin, Plugin, Plugin, ProjectPlugin, SourceBrowserPlugin, StatusBarPlugin, TasksPlugin, ToolPlugin, WizardPlugin

public interface Plugin

A "plugin" in a GUI application is a class that extends that application in some way. There are several base classes of plugins that you can subclass to make a plugin for your application, including:

Version:
0.1
Author:
Robert Futrell
See Also:
GUIApplication, GUIPlugin, StatusBarPlugin, WizardPlugin

Method Summary
 PluginOptionsDialogPanel getOptionsDialogPanel()
          Returns an options panel for use in an Options dialog.
 java.lang.String getOptionsDialogPanelParentPanelID()
          Returns the panel that this plug-in's option panels should be added as children of.
 java.lang.String getPluginAuthor()
          Returns the author of the plugin.
 javax.swing.Icon getPluginIcon()
          Returns the icon to display beside the name of this plugin in the application's interface.
 java.lang.String getPluginName()
          Returns the name of the plugin.
 java.lang.String getPluginVersion()
          Returns the version of the plugin.
 void install(AbstractPluggableGUIApplication app)
          Called just after a plugin is added to a GUI application.
 void savePreferences()
          Called when the GUI application is shutting down.
 boolean uninstall()
          Called just before this Plugin is removed from an GUIApplication.
 

Method Detail

getOptionsDialogPanel

PluginOptionsDialogPanel getOptionsDialogPanel()
Returns an options panel for use in an Options dialog. This panel should contain all options pertaining to this plugin.

Returns:
The options panel.

getOptionsDialogPanelParentPanelID

java.lang.String getOptionsDialogPanelParentPanelID()
Returns the panel that this plug-in's option panels should be added as children of.

Returns:
The ID of the parent panel, or null if they should be added at the "root" level of option panels.
See Also:
getOptionsDialogPanel()

getPluginAuthor

java.lang.String getPluginAuthor()
Returns the author of the plugin.

Returns:
The author.

getPluginIcon

javax.swing.Icon getPluginIcon()
Returns the icon to display beside the name of this plugin in the application's interface.

Returns:
The icon for this plugin. This value may be null to represent no icon.

getPluginName

java.lang.String getPluginName()
Returns the name of the plugin.

Returns:
The plugin name.

getPluginVersion

java.lang.String getPluginVersion()
Returns the version of the plugin.

Returns:
The version number of this plugin.

install

void install(AbstractPluggableGUIApplication app)
Called just after a plugin is added to a GUI application. If this is a GUIPlugin, it has already been added visually. Plugins should use this method to register any listeners to the GUI application and do any other necessary setup.

Parameters:
app - The application to which this plugin was just added.
See Also:
uninstall()

savePreferences

void savePreferences()
Called when the GUI application is shutting down. When this method is called, the Plugin should save any preferences.


uninstall

boolean uninstall()
Called just before this Plugin is removed from an GUIApplication. This gives the plugin a chance to clean up any loose ends (kill any threads, close any files, remove listeners, etc.).

Returns:
Whether the uninstall went cleanly.
See Also:
install(org.fife.ui.app.AbstractPluggableGUIApplication)