The Meta-Environment API

nl.cwi.sen1.gui
Interface Studio

All Known Subinterfaces:
StudioWithPredefinedLayout
All Known Implementing Classes:
StudioImpl, StudioImplWithPredefinedLayout

public interface Studio

The interface to the toplevel studio window. The Studio interface provides StudioPlugins with functionality for modifying properties of the toplevel window of a MetaStudio, as well as some convenience methods (functionality that is needed by virtually all StudioPlugins).


Method Summary
 void addComponent(StudioComponent component)
          Register a StudioComponent.
 void addComponentMenu(StudioComponent component, nl.cwi.sen1.configapi.types.Event menu, javax.swing.Action action)
          Register a menu that is linked with a particular component.
 void addComponentMenu(StudioComponent component, javax.swing.JMenu menu)
          Register a menu that is linked with a particular component.
 void connect(java.lang.String toolName, toolbus.AbstractTool tool)
          Connect to the ToolBus.
 aterm.ATermFactory getATermFactory()
          Get 'The' ATermFactory.
 void makeVisible(StudioComponent component)
          Make a specific Component visible.
 void removeComponent(StudioComponent component)
          Unregister a StudioComponent.
 void requestFocus(StudioComponent component)
          Make the Studio move the focus to a specific Component.
 

Method Detail

getATermFactory

aterm.ATermFactory getATermFactory()
Get 'The' ATermFactory. For memory efficiency it is beneficial to share a single ATermFactory between all StudioPlugins. If ATerms are communicated between them, this is also a requirement.

Returns:
A reference to The ATerm Factory.

connect

void connect(java.lang.String toolName,
             toolbus.AbstractTool tool)
Connect to the ToolBus. Many StudioPlugins will have their private connection to the ToolBus. This is the method to start it up. Note that a single plugin may use this method several times.

Parameters:
toolName - Name of the tool as it occurs in the ToolBus script.
tool - Java implementation of a ToolBus tool.

addComponent

void addComponent(StudioComponent component)
Register a StudioComponent. One StudioComponent corresponds to a single 'tab' somewhere in the GUI framework of the MetaStudio. The component will become immediately visible.

Parameters:
component - Component to add.

removeComponent

void removeComponent(StudioComponent component)
Unregister a StudioComponent. This is the inverse of addComponent. The component will become invisible immediately.

Parameters:
component - Component to remove.

addComponentMenu

void addComponentMenu(StudioComponent component,
                      javax.swing.JMenu menu)
Register a menu that is linked with a particular component. The studio manages menus, such that the menus for a particular component are visible if and only if that component has the focus.

Parameters:
component - Component to link a menu with.
menu - JMenu to link to a component.

addComponentMenu

void addComponentMenu(StudioComponent component,
                      nl.cwi.sen1.configapi.types.Event menu,
                      javax.swing.Action action)
Register a menu that is linked with a particular component. The studio manages menus, such that the menus for a particular component are visible if and only if that component has the focus.


requestFocus

void requestFocus(StudioComponent component)
Make the Studio move the focus to a specific Component.

Parameters:
component - Component to move the focus to.

makeVisible

void makeVisible(StudioComponent component)
Make a specific Component visible.

Parameters:
component - Component to make visible.

The Meta-Environment API