Implements the Spark Plugin framework to display the different possibilities using
Spark. /
public class ExamplePlugin implements Plugin {
/** Adds a tab to Spark*/
private void addTabToSpark(){
// Get Workspace UI from SparkManager
Workspace workspace = SparkManager.getWorkspace();
// Retrieve the Tabbed Pane from the WorkspaceUI.
JTabbedPane tabbedPane = workspace.getWorkspacePane();
// Add own Tab.
tabbedPane.addTab(“My Plugin”, new JButton(“Hello”));
}
}
Implements the Spark Plugin framework to display the different possibilities using
Spark.
*/
public class ExamplePlugin implements Plugin {
/** Called after Spark is loaded to initialize the new plugin. */
public void initialize() {
System.out.println(“Welcome To Spark”);
}
/**
* Adds a tab to Spark
*/
private void addTabToSpark() {
Workspace workspace = SparkManager.getWorkspace();
JButton button = new JButton("HELLO SPARK USERS");
workspace.getWorkspacePane().addTab("MyPlugin", button);
}
/**
* Called when Spark is shutting down to allow for persistence of information
* or releasing of resources. */
public void shutdown() {
}
/**
* Return true if the Spark can shutdown on users request.
* @return true if Spark can shutdown on users request. */
public boolean canShutDown() {
return true;
}
/**
* Is called when a user explicitly asked to uninstall this plugin.
* The plugin owner is responsible to clean up any resources and
* remove any components install in Spark. */
public void uninstall(){
// Remove all resources belonging to this plugin.
}
}