pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Brown (JIRA)" <j...@apache.org>
Subject [jira] Commented: (PIVOT-458) ListButton: show popup only on triangle click
Date Fri, 16 Apr 2010 00:00:50 GMT

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

Greg Brown commented on PIVOT-458:
----------------------------------

Help me understand the use case for split behavior in a MenuButton. Unlike ListButtons, MenuButtons
don't maintain any kind of selection state - so what would clicking on the just content area
mean? To a large extent, MenuButtons exist to provide access to a menu popup. The button itself
doesn't really offer much on its own.

I know that I originally suggested that this behavior belongs in MenuButton and not ListButton,
but the to-do in PIVOT-24 actually goes back a really long way, back to when Pivot wasn't
even called Pivot and was actually implemented in JavaScript, not Java.  :-)  Back then, menu
buttons were backed by list data, much like list buttons, and might have one day been given
support for some kind of selection state. However, in their current incarnation, they are
not data driven, and are more like menu items that can exist outside of a menu or menu bar.
And there is still the issue of UI design. Menu buttons visually distinguish themselves from
list buttons by not drawing a divider. I'd like to maintain that distinction.

I'm now 100% in favor of adding this behavior to ListButton - perhaps that would be sufficient
for your needs now, and we could revisit MenuButton in a future release, if appropriate?


> ListButton: show popup only on triangle click
> ---------------------------------------------
>
>                 Key: PIVOT-458
>                 URL: https://issues.apache.org/jira/browse/PIVOT-458
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk-terra
>            Reporter: Dirk Moebius
>            Priority: Minor
>         Attachments: listbutton-popup.patch, menubutton-popup.patch
>
>
> I found this to be a requirement in my application: if the user clicks the label part
of a LinkButton, the button should fire immediately without showing the popup, thus invoking
the action with the currently selected entry. If the user clicks the triangle part, the popup
should be shown.
> I patched LinkButton to add a new boolean property called "showPopupOnTriggerClickOnly"
to TerraListButtonSkin (I couldn't think of a better name, sorry). If set to true, the ListButton
popup will only show up if the user clicks the triangle, but not if the user clicks the rest
of the button. However, ButtonPressListeners fire as usual, if the user clicks any part of
the button. If the property is false, the behavior is as it was before. The default value
of the property is false.
> I tested the patch in my application and ComponentExplorer and it works good.
> It would be nice if you integrate the patch. Otherwise I'd still have the option to write
a custom skin, but I think this patch could be interesting to other developers as well.

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

        

Mime
View raw message