[ 
https://issues.apache.org/jira/browse/PIVOT-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734153#action_12734153
 ] 

Greg Brown commented on PIVOT-181:
----------------------------------

I don't think this approach will preclude custom context menu handling. You 
don't have to attach any context menu handlers to your components - you can 
simply choose to process the mouse events yourself (the same applies to drag 
sources and drop targets). Also, a handler can clear the menu if it wants to 
prevent it from being shown. However, we may want to add a boolean return value 
to the "configureContextMenu()" method, or whatever it is called, such that 
handlers can stop propagation down the path.



> Context menu handler
> --------------------
>
>                 Key: PIVOT-181
>                 URL: https://issues.apache.org/jira/browse/PIVOT-181
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>            Reporter: Todd Volkert
>            Assignee: Todd Volkert
>             Fix For: 1.3
>
>
> Create framework-level support for context menus by creating a 
> Component.ContextMenuHandler interface.  When the display host detects a 
> right click, it will:
> 1) Get a reference to the lowest-level component that the mouse is over, and 
> if that's non-null...
> 2) Construct the path from the display to that component, instantiate a 
> MenuPopup
> 3) Walk the path, passing the menu popup's menu to each ContextMenuHandler 
> that is found along the path
> 4) Open the menu popup if the menu is non-empty after the path has been walked

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to