JGraphpad Pro
v6.0.5.0


com.jgraph.editor
Class JGraphEditorKit

java.lang.Object
  extended bycom.jgraph.editor.JGraphEditorKit

public class JGraphEditorKit
extends Object

Holds references to actions and mouse tools and updates their states.


Field Summary
protected  Map actions
          Holds the (name, action) and (name, tool) pairs respectively.
protected  List bundles
          Holds all action bundles.
protected  Map tools
          Holds the (name, action) and (name, tool) pairs respectively.
 
Constructor Summary
JGraphEditorKit()
           
 
Method Summary
 Object addAction(JGraphEditorAction action)
          Adds the specified action to the kit.
 void addBundle(JGraphEditorAction.Bundle bundle)
          Adds all actions in the specified bundle and stores a reference to the bundle for later update of the actions.
 Object addTool(JGraphEditorTool tool)
          Adds the specified tool to the kit.
 JGraphEditorAction getAction(String name)
          Returns the action for the specified name or null if no such action exists.
 Map getActions()
           
 List getBundles()
           
 JGraphEditorTool getTool(String name)
          Returns the tool for the specified name or null if no such tool exists.
 Map getTools()
           
 void setActions(Map actions)
           
 void setBundles(List bundles)
           
 void setTools(Map tools)
           
 void update()
          This is messaged from the application when the kit should update the state of its actions and tools.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actions

protected Map actions
Holds the (name, action) and (name, tool) pairs respectively.


tools

protected Map tools
Holds the (name, action) and (name, tool) pairs respectively.


bundles

protected List bundles
Holds all action bundles.

Constructor Detail

JGraphEditorKit

public JGraphEditorKit()
Method Detail

addAction

public Object addAction(JGraphEditorAction action)
Adds the specified action to the kit.

Parameters:
action - The action to add.
Returns:
Returns the previous action for the same name.
See Also:
JGraphEditorAction.getName()

addBundle

public void addBundle(JGraphEditorAction.Bundle bundle)
Adds all actions in the specified bundle and stores a reference to the bundle for later update of the actions.

Parameters:
bundle - The bundle to add the actions from.

getAction

public JGraphEditorAction getAction(String name)
Returns the action for the specified name or null if no such action exists.

Parameters:
name - The name that identifies the action.
Returns:
Returns the action with the name name or null.

addTool

public Object addTool(JGraphEditorTool tool)
Adds the specified tool to the kit.

Parameters:
tool - The tool to add.
Returns:
Returns the previous tool for the same name.
See Also:
JGraphEditorTool.getName()

getTool

public JGraphEditorTool getTool(String name)
Returns the tool for the specified name or null if no such tool exists.

Parameters:
name - The name that identifies the tool.
Returns:
Returns the tool with the name name or null.

update

public void update()
This is messaged from the application when the kit should update the state of its actions and tools. This implementation updates all registered bundles.

See Also:
JGraphEditorAction.Bundle.update()

getActions

public Map getActions()
Returns:
Returns the actions.

setActions

public void setActions(Map actions)
Parameters:
actions - The actions to set.

getBundles

public List getBundles()
Returns:
Returns the bundles.

setBundles

public void setBundles(List bundles)
Parameters:
bundles - The bundles to set.

getTools

public Map getTools()
Returns:
Returns the tools.

setTools

public void setTools(Map tools)
Parameters:
tools - The tools to set.

JGraphpad Pro
v6.0.5.0


Copyright (C) 2005 JGraph.com. All rights reserved.