The Meta-Environment API

nl.cwi.sen1.visplugin
Class VisualizationPluginWindow

java.lang.Object
  extended by nl.cwi.sen1.visplugin.VisualizationPluginWindow
Direct Known Subclasses:
ExampleVisualizationWindow

public abstract class VisualizationPluginWindow
extends java.lang.Object

The VisualizationPluginWindow class represents the base class for the different plugin windows.

Author:
Aldert Boerhoop

Field Summary
private  ContainerPanel m_containerPanel
           
private  VisualizationPluginController m_controller
           
private  nl.cwi.sen1.relationstores.types.RTuple m_fact
           
private  int m_factId
           
protected  nl.cwi.sen1.relationstores.Factory m_factory
           
private  int m_storeId
           
private  nl.cwi.sen1.gui.Studio m_studio
           
private  java.lang.String m_title
           
private  int m_windowId
           
 
Constructor Summary
VisualizationPluginWindow()
          Default constructor
 
Method Summary
private  void connectPanelWithMenu(javax.swing.JMenu menu, javax.swing.JPanel contentPanel, java.lang.String title, java.lang.String orientation)
          connects a given JPanel and JMenu to the meta-environment
protected  javax.swing.JMenu createExtensionMenu()
          Create a menu
 void disconnectComponent(nl.cwi.sen1.gui.component.StudioComponent component)
          Removes a component from the Meta-Environment so it is removed from the views menu as well.
 void displayVisualization()
          Display the plugin window
 void executeOnLoad()
          method is called on load of the window overridable
protected  void exportToCsv(java.lang.String fileName)
          method is called from the toolbus
 void exportToCsvClicked()
          calls the exportToClicked method on the controller
 void exportToImage(java.lang.String fileName)
          Functionality that's triggered by the export menu
 void factOutOfDate()
          Show out of date message
 VisualizationPluginController getController()
          Returns the controller of the visualization plugin window.
 int getFactId()
          get the Fact id
 int getStoreId()
          get the Store id
 nl.cwi.sen1.gui.Studio getStudio()
          Returns the studio of the visualization plugin window.
 int getWindowId()
          Returns the window ID of the visualization plugin window.
 void initializeWindow(nl.cwi.sen1.gui.Studio studio, int storeId, int factId, nl.cwi.sen1.relationstores.types.RTuple fact, nl.cwi.sen1.relationstores.Factory factory, java.lang.String pluginName, VisualizationPluginController controller, int windowId)
          Initialize the window properties
 void openLocationInEditor(nl.cwi.sen1.relationstores.types.Location loc)
           
abstract  javax.swing.JPanel render(nl.cwi.sen1.relationstores.types.RTuple fact)
          Render the plugin window
 void rstoreUnloaded()
          The rstore of this fact has been unloaded.
 void showPopUp(java.lang.String msg)
          Show a popup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_factory

protected nl.cwi.sen1.relationstores.Factory m_factory

m_studio

private nl.cwi.sen1.gui.Studio m_studio

m_storeId

private int m_storeId

m_factId

private int m_factId

m_fact

private nl.cwi.sen1.relationstores.types.RTuple m_fact

m_title

private java.lang.String m_title

m_controller

private VisualizationPluginController m_controller

m_windowId

private int m_windowId

m_containerPanel

private ContainerPanel m_containerPanel
Constructor Detail

VisualizationPluginWindow

public VisualizationPluginWindow()
Default constructor

Method Detail

initializeWindow

public final void initializeWindow(nl.cwi.sen1.gui.Studio studio,
                                   int storeId,
                                   int factId,
                                   nl.cwi.sen1.relationstores.types.RTuple fact,
                                   nl.cwi.sen1.relationstores.Factory factory,
                                   java.lang.String pluginName,
                                   VisualizationPluginController controller,
                                   int windowId)
Initialize the window properties

Parameters:
Studio - studio, int storeId, int factId, RTuple fact

getStudio

public nl.cwi.sen1.gui.Studio getStudio()
Returns the studio of the visualization plugin window.

Returns:
The studio object.

executeOnLoad

public void executeOnLoad()
method is called on load of the window overridable

Parameters:
the - filename to store the export in

getController

public VisualizationPluginController getController()
Returns the controller of the visualization plugin window.

Returns:
The controller object.

getWindowId

public int getWindowId()
Returns the window ID of the visualization plugin window.

Returns:
The window ID.

displayVisualization

public final void displayVisualization()
Display the plugin window


createExtensionMenu

protected javax.swing.JMenu createExtensionMenu()
Create a menu

Returns:
The JMenu

exportToCsvClicked

public final void exportToCsvClicked()
calls the exportToClicked method on the controller


exportToCsv

protected void exportToCsv(java.lang.String fileName)
method is called from the toolbus

Parameters:
the - filename to store the export in

showPopUp

public final void showPopUp(java.lang.String msg)
Show a popup

Parameters:
Message - to display

connectPanelWithMenu

private final void connectPanelWithMenu(javax.swing.JMenu menu,
                                        javax.swing.JPanel contentPanel,
                                        java.lang.String title,
                                        java.lang.String orientation)
connects a given JPanel and JMenu to the meta-environment

Parameters:
JMenu - menu,JPanel contentPanel,String title,String orientation

disconnectComponent

public void disconnectComponent(nl.cwi.sen1.gui.component.StudioComponent component)
Removes a component from the Meta-Environment so it is removed from the views menu as well.

Parameters:
component - The component to remove.

factOutOfDate

public final void factOutOfDate()
Show out of date message


rstoreUnloaded

public final void rstoreUnloaded()
The rstore of this fact has been unloaded.


getStoreId

public final int getStoreId()
get the Store id

Returns:
The Store id

getFactId

public final int getFactId()
get the Fact id

Returns:
The Fact id

render

public abstract javax.swing.JPanel render(nl.cwi.sen1.relationstores.types.RTuple fact)
Render the plugin window

Parameters:
Fact - to display
Returns:
The JPanel

exportToImage

public void exportToImage(java.lang.String fileName)
Functionality that's triggered by the export menu


openLocationInEditor

public void openLocationInEditor(nl.cwi.sen1.relationstores.types.Location loc)

The Meta-Environment API