jas2.plugin
Class BasicPlugin
- java.lang.Object
-
- jas2.plugin.BasicPlugin
-
- Direct Known Subclasses:
- ExtensionPlugin, Plugin
public abstract class BasicPlugin extends java.lang.ObjectA base class for both Plugin and ExtensionPlugin
-
-
Field Summary
Fields Modifier and Type Field and Description java.io.PrintWriteroutoutput sent to this print stream will appear in the applcations output window
-
Constructor Summary
Constructors Constructor and Description BasicPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddMenu(javax.swing.JMenu menu)This routine can be called by the plugin to create a new menu.voiderror(java.lang.String message)The plugin can call this method to cause the application to popup an error box displaying the specified message.voiderror(java.lang.String message, java.lang.Throwable detail)The plugin can call this method to cause the application to popup an error box displaying the specified message and detail.voidinit()Called by the application when the plugin is installed Plugins should override this method to install new menus etc.PageContextinstallConsole(java.lang.String name, java.awt.Component console)PageContextinstallControl(java.lang.String name, java.awt.Component control)PageContextinstallPage(java.lang.String name, java.awt.Component page)Plugins may use this method to create a new page.voidremoveMenu(javax.swing.JMenu menu)Remove a menu previously added using addMenuvoidsendMessage(java.lang.String message)The plugin can call this method to cause a single line message to be displayed in the applications status window, at the bottom of the main window.
-
-
-
Field Detail
-
out
public java.io.PrintWriter out
output sent to this print stream will appear in the applcations output window
-
-
Method Detail
-
addMenu
public void addMenu(javax.swing.JMenu menu)
This routine can be called by the plugin to create a new menu. The menu must be a swing styule menu (i.e. extend javax.swing.JMenu). Currently the menu will be added to the main menu bar, just to the left of the Help menu. The menu may of course contain any number of buttons and submenus, and the plugin can add listeners to these menu items so that it can respond to user requests.- Parameters:
menu- The menu to be added
-
removeMenu
public void removeMenu(javax.swing.JMenu menu)
Remove a menu previously added using addMenu- Parameters:
menu- The menu to be removed- See Also:
addMenu(JMenu)
-
error
public void error(java.lang.String message)
The plugin can call this method to cause the application to popup an error box displaying the specified message.
-
error
public void error(java.lang.String message, java.lang.Throwable detail)The plugin can call this method to cause the application to popup an error box displaying the specified message and detail.
-
sendMessage
public void sendMessage(java.lang.String message)
The plugin can call this method to cause a single line message to be displayed in the applications status window, at the bottom of the main window.
-
installPage
public PageContext installPage(java.lang.String name, java.awt.Component page)
Plugins may use this method to create a new page. The exact appearance of the page depends on the WindowStyle the user has selected in the View menu, but this is hidden from the plugin by the PagebasicContext abstraction.- Parameters:
name- The name for the new Windowpage- The component that will form the body of the new page. It is recommended that the page be a lightweight window, i.e. that it extends javax.swing.JComponent- Returns:
- A PagebasicContext that can be used to manipulate the window, or to receive notifications of user actions.
-
installControl
public PageContext installControl(java.lang.String name, java.awt.Component control)
-
installConsole
public PageContext installConsole(java.lang.String name, java.awt.Component console)
-
init
public void init()
Called by the application when the plugin is installed Plugins should override this method to install new menus etc.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG