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

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

>But what I'm concerned about is if you mix and match a custom container 
>component from one place with a 
>custom child component from a different place, and the custom container 
>component is looking to add items
>into a context menu, while the child component is just going to take control 
>of the right-click event and do it's 
>own thing. 

That's exactly what we'd like to support. The lowest-level child component 
*should* have the ability to override the behavior of the context menu. In many 
or most cases, it won't need or want to, but the option should be there.

>And I don't really see the need - I've never seen any application do this kind 
>of hierarchical accumulation of 
>context-menu items. 

Todd currently has a pretty solid use case, and after talking it through, I 
think other applications could easily benefit from it as well. Given that the 
"context" of any given component is its container ancestry, this provides a 
pretty powerful way for any component/container in the context to hook into the 
menuing system.


> 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