| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectix.iface.util.ToolManager
public class ToolManager
Manages the "tools" for an I-X agent's user interface. Also provides and manages a JMenu sutiable for use in a menu-bar.
ToolController| Field Summary | |
|---|---|
protected  java.util.List | 
controllers
 | 
protected  AlphabetizingMenu | 
toolsMenu
 | 
| Constructor Summary | |
|---|---|
ToolManager()
 | 
|
| Method Summary | |
|---|---|
protected  void | 
activateTool(ToolController tc)
Creates the tool if it does not already exist and then makes it visible.  | 
 void | 
addTool(ToolController tc)
Adds a tool to the list of tools managed by this ToolManager.  | 
 ToolController | 
findTool(java.lang.String toolName)
Returns the ToolController for the tool with the
 specified name, or null if no such tool is known to this
 ToolManager. | 
 ToolController | 
findToolElseError(java.lang.String toolName)
Calls findTool(String) to obtain the ToolController
 for the tool with the specified name. | 
 AlphabetizingMenu | 
getToolsMenu()
Returns a JMenu suitable for use in a menu bar.  | 
protected  javax.swing.JMenuItem | 
makeMenuItem(ToolController tc)
Makes a JMenuItem that has an ActionListener that calls activateTool(ToolController) on the specified
 controller. | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected java.util.List controllers
protected AlphabetizingMenu toolsMenu
| Constructor Detail | 
|---|
public ToolManager()
| Method Detail | 
|---|
public AlphabetizingMenu getToolsMenu()
addTool(ToolController) method.  In that way, the
 menu entry will automatically be given an ActionListener
 that calls activateTool(ToolController).
public ToolController findTool(java.lang.String toolName)
ToolController for the tool with the
 specified name, or null if no such tool is known to this
 ToolManager.
public ToolController findToolElseError(java.lang.String toolName)
findTool(String) to obtain the ToolController
 for the tool with the specified name.  If that result is non-null,
 it is returned; otherwise an exception is thrown.
java.lang.IllegalArgumentException - if no tool of the specified
    name is known to this ToolManager.public void addTool(ToolController tc)
getToolsMenu() method.  The menu entry is given
 an ActionListener that calls activateTool(ToolController)
 on the tool's controller.
makeMenuItem(ToolController)protected javax.swing.JMenuItem makeMenuItem(ToolController tc)
activateTool(ToolController) on the specified
 controller.  The text of the menu entry is obtained by
 calling ToolController.getToolName().
protected void activateTool(ToolController tc)
ToolController.ensureToolVisible().
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||