ibm_ilog.diagram.interactors.KeyboardInteractorManager
Object » ibm_ilog.diagram.interactors.KeyboardInteractorManager
dojo.require("ibm_ilog.diagram.interactors.KeyboardInteractorManager");
This class manage the keyInteractor, by connection to the Diagram onkeydown event and pushing it to the appropriate registered Interactors. The associated diagram
Method Summary
- activate() Activate the Manager, creating the connection.
- add(id, keyInteractor) Adds a new keyInteractor.
- clearHotKeys(id, hotKeys) This method is called to clear the hotkeys in the manager. Ideally, this is called inside the Interactors when trying to unregister it for removal or reconfiguration.
- constructor(diagram) Creates a new instance.
- deactivate() Deactivate the Manager, deleting the connection.
- get(id) Gets a keyInteractor by its id.
- keyPressed(e) This method is called when a key is pressed in the diagram.
- remove(id) Removes a keyInteractor by its id.
- setHotKeys(id, hotKeys) This method is called to register the hotkeys to the manager. Ideally, this is called inside the Interactors at initialization time.
Methods
Adds a new keyInteractor.
Parameter | Type | Description |
---|---|---|
id | String | the keyIntearctor id. |
keyInteractor | ibm_ilog.diagram.interactors.Interactor | the keyIntearctor to be added. |
This method is called to clear the hotkeys in the manager. Ideally, this is called inside the Interactors when trying to unregister it for removal or reconfiguration.
Parameter | Type | Description |
---|---|---|
id | String | the keyIntearctor id. |
hotKeys | JS | object a dictionary with the hotKeys to be register and the connections to be registered in each one. Format: {key1:[conn1,conn2], key2:[conn4]} |
Creates a new instance.
Parameter | Type | Description |
---|---|---|
diagram | ibm_ilog.diagram.widget.Diagram | the associated diagram. |
Gets a keyInteractor by its id.
Parameter | Type | Description |
---|---|---|
id | String | the keyIntearctor id. return: ibm_ilog.diagram.interactors.Interactor |
This method is called when a key is pressed in the diagram.
Parameter | Type | Description |
---|---|---|
e | Event | object the event to be treated. return boolean |
This method is called to register the hotkeys to the manager. Ideally, this is called inside the Interactors at initialization time.
Parameter | Type | Description |
---|---|---|
id | String | the keyIntearctor id. |
hotKeys | JS | object a dictionary with the hotKeys to be register and the connections to be registered in each one. Format: {key1:[conn1,conn2], key2:[conn4]} |