pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edvin Syse (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIVOT-765) Reintroduce WindowStateListener#previewWindowOpen
Date Fri, 14 Oct 2011 14:32:12 GMT

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

Edvin Syse commented on PIVOT-765:
----------------------------------

Can you hint on what else should be tested? I'd be happy to write more tests.
                
> Reintroduce WindowStateListener#previewWindowOpen
> -------------------------------------------------
>
>                 Key: PIVOT-765
>                 URL: https://issues.apache.org/jira/browse/PIVOT-765
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>    Affects Versions: 2.0, 2.0.1
>            Reporter: Edvin Syse
>            Priority: Minor
>             Fix For: 2.0.2
>
>         Attachments: Pivot765-test.patch, WindowStatelistener-previewWindowOpen.patch
>
>
> To support dynamic creation of the Menu for a MenuButton, the previewWindowOpen could
be reintroduced so that one can populate the Menu _before_ the popup window is opened. Today,
one can only populate the menu in WindowStateListener#windowOpened, ie. after the popup window
is displayed. This is problematic because correct positioning and sizing cannot be determined
before the menu is populated. There are probably other use cases as well. This one was discussed
here:
> http://apache-pivot-users.399431.n3.nabble.com/How-to-create-menu-for-MenuButton-dynamically-td3103392.html
> Code example:
> menuButton.getListPopup().getWindowStateListeners().add(new WindowStateListener.Adapter()
{
>     public Vote previewWindowOpen(Window window) {
>         // Populate menuButton's menu
>         return Vote.APPROVE;
>     }
> }
> I will attach a patch that adds said functionality.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message