Ticket #808 (closed enhancement: fixed)
Opened 2011-10-10T11:00:37-05:00
Last modified 2011-10-17T11:04:04-05:00
Add Event Handling Priority/Ordering
Reported by: | gharris | Owned by: | gharris |
---|---|---|---|
Priority: | major | Milestone: |
|
Component: | Event Framework | Version: | |
Severity: | serious | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
Add ability to set the order/priority of event handlers
Global tools should be lower down in the chain so that specific tools can override how an event is handled.
For example, the display of pixel values in the status bar (by globak tool PixelProbe) should be overridden to show the (x,y, w, h) when dragging to create a figure (e.g. Rectangle Tool).
All the event handling methods in ITool/AbstractTool return a boolean indicating whether the event should be consumed or passed down the chain.
Assuming such methods return true for 'consume the event', in ToolService each of the EventSubscribers do something like this: