Specifies if elements should be connected if new cells are dropped onto connectable elements.
Reference to the enclosing Editor.
Reference to the function used to reset the toolbar.
Defines the spacing between existing and new vertices in gridSize units when a new vertex is dropped on an existing cell. Default is 4 (40 pixels).
Holds the internal MaxToolbar.
Binds the given action to a option with the specified label in the given combo. Combo is an object returned from an earlier call to addCombo or addActionCombo.
DOM node that represents the combo box.
String that represents the title of the combo.
Name of the action to execute in editor.
Helper method to invoke MaxToolbar.addCombo on toolbar and return the resulting DOM node.
Adds a new item that executes the given action in editor. The title, icon and pressedIcon are used to display the toolbar item.
String that represents the title (tooltip) for the item.
URL of the icon to be used for displaying the item.
Name of the action to execute when the item is clicked.
Optional
pressed: stringOptional URL of the icon for the pressed state.
Creates an item for selecting the given mode in the editor's graph. Supported modenames are select, connect and pan.
String that represents the title of the item.
URL of the icon that represents the item.
String that represents the mode name to be used in Editor.setMode.
Optional URL of the icon that represents the pressed state.
Optional JavaScript function that takes the Editor as the first and only argument that is executed after the mode has been selected.
Helper method to invoke MaxToolbar.addOption on toolbar and return the resulting DOM node that represents the option.
DOM node that represents the combo box.
String that represents the title of the combo.
Object that represents the value of the option.
Creates an item for inserting a clone of the specified prototype cell into
the
String that represents the title of the item.
URL of the icon that represents the item.
Function or object that represents the prototype cell. If ptype is a function then it is invoked with no arguments to create new instances.
Optional URL of the icon that represents the pressed state.
Optional JavaScript function that handles an insert of the new
cell. This function takes the
Optional boolean that specifies if the item can be toggled. Default is true.
Adds a vertical separator using the optional icon.
Optional
icon: stringOptional URL of the icon that represents the vertical separator. Default is Client.imageBasePath + ‘/separator.gif’.
Constructs the toolbar for the given container and installs a listener that updates the Editor.insertFunction on editor if an item is selected in the toolbar. This assumes that editor is not null.
Toolbar for the editor. This modifies the state of the graph or inserts new cells upon mouse clicks.
@Example:
Create a toolbar with a button to copy the selection into the clipboard, and a combo box with one action to paste the selection from the clipboard into the graph.
@Codec:
This class uses the DefaultToolbarCodec to read configuration data into an existing instance. See DefaultToolbarCodec for a description of the configuration format.