package jas2.plugin;
import java.awt.Component;
import javax.swing.*;
import java.io.*;
/**
 * A base class for both ExtensionPluginContext and PluginContext
 */
public interface BasicPluginContext
{
	void addMenu(JMenu menu); // Adds a menu to the menu bar
	void removeMenu(JMenu menu);
	/**
	 * Puts a message in the status bar
	 */

	void sendMessage(String message);

	/**
	 * Printwriter used to write output to the output area
	 */	
	PrintWriter getPrintStream();

	/** 
	 * Used to popup an error message
	 */

	void error(String message);
	void error(String message, Throwable detail);
	/**
	 * Used to add a page to the "Window" area of the GUI
	 */
	PageContext installPage(String name, Component page);
	/**
	 * Used to add a control to the "Tree" area of the GUI
	 */
	PageContext installControl(String name, Component control);
	/**
	 * Used to add a console to the "Console" area of the GUI
	 */
	PageContext installConsole(String name, Component console);
	/**
	 * Used by a plugin to tell if it is running in an Applet
	 * or not (added for WIRED, currently always returns false)
	 */
	boolean isApplet();
}

 

Ads help maintain this website.