Constructs a new graph selection model for the given AbstractGraph.
Reference to the enclosing AbstractGraph.
Specifies the resource key for the status message after a long operation. If the resource for this key does not exist, then the value is used as the status message.
Holds the event names and associated listeners in an array. The array contains the event name followed by the respective listener for each registered listener.
Specifies if events can be fired. Default is true.
Optional source for events.
Specifies if only one selected item at a time is allowed.
Specifies the resource key for the status message while the selection is being updated. If the resource for this key does not exist, then the value is used as the status message.
Adds the given Cell to the selection and fires a InternalEvent.CHANGE event.
Adds the given array of Cell to the selection and fires a InternalEvent.CHANGE event.
Binds the specified function to the given event name. If no event name is given, then the listener is registered for all events.
The parameters of the listener are the sender and an EventObject.
Clears the selection and fires a InternalEvent.CHANGE event if the selection was not empty.
Clears all registered event listeners.
Subclasses with a destroy method should call super.destroy() at the end
of their own cleanup to ensure no stale listeners remain.
Dispatches the given event to the listeners which are registered for the event. The sender argument is optional. The current execution scope ("this") is used for the listener invocation.
Example:
fireEvent(new EventObject("eventName", key1, val1, .., keyN, valN))
EventObject that represents the event.
Optional sender to be passed to the listener. Default value is the return value of getEventSource.
Returns eventSource.
Returns the first selectable cell in the given array of cells.
the first cell for which AbstractGraph.isCellSelectable returns true, or null if no
such cell exists (including when cells is empty).
Returns true if no cells are currently selected.
Returns eventsEnabled.
Returns singleSelection as a boolean.
Removes the specified Cell from the selection and fires a InternalEvent.CHANGE event for the remaining cells.
Removes the specified Cell from the selection and fires a InternalEvent.CHANGE event for the remaining cells.
Removes all occurrences of the given listener from eventListeners.
Selects the given array of Cell and fires a InternalEvent.CHANGE event.
Sets the singleSelection flag.
the new value for singleSelection.
Implements the selection model for a graph.
Here is a listener that handles all removed selection cells.
Events
InternalEvent.UNDO
Fires after the selection was changed in changeSelection. The
editproperty contains the UndoableEdit which contains the SelectionChange.InternalEvent.CHANGE
Fires after the selection changes by executing an SelectionChange.
WARN: the event's
addedandremovedproperties contain arrays of cells that have been added to or removed from the selection, respectively. The names are inverted due to historic reasons.See the SelectionChange class for more details.