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 12:06:26 GMT

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

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

> More exactly: the _submenu_ of the MenuButton has a selection state, but the MenuButton
itself has not!

This is exactly my point - the submenu doesn't actually have a selection state. Menu items
(instances of Menu.Item) are also buttons. A Menu instance doesn't "remember" the last menu
item you selected - it just provides a popup window via which you can select them (a menu
is basically just a collection of buttons). This is different from a list button, which shows
a ListView when clicked. List views (and list buttons) do maintain selection state (i.e. "remember"
what you selected).

> The "main action" in a MenuButton is always the action that is described by the button's
label. The "main action" in a ListButton is the action, that the user selected.

Buttons serve many purposes in an application, and not all are meant to be associated with
an action. For example, clicking on a checkbox or radio button is generally not meant to trigger
an action. Actions associated with these components are generally triggered by another mechanism
(such as a push button). Checkbox and RadioButton extend Button because they share some common
functionality, but their emphasis is not on the action (the action-oriented buttons primarily
include PushButton and Menu.Item). ListButton and MenuButton are also not generally associated
with Actions - the emphasis of a ListButton is on its selection state, and the emphasis of
a MenuButton is on the actions associated with the menu items, not the menu button itself.

> Suppose you have a TableView with some data with multi-select on...

I think the use case you describe may be confusing for users, since it is not clear what "add
selected" would actually do. Does it "add at top", "add at bottom", or "replace existing entries"?


To me, "add selected" seems like more of an action heading than an action itself. Clicking
the menu button allows the user to select a specific "add" action to perform by selecting
one of the menu items.

OTOH, if you were to use a split ListButton in this case, I think it would make more sense.
The list button would always show one of the actual options ("add at top", "add at bottom",
or "replace existing entries"). Then it would be clear to the user exactly what will happen
when the content part of the button is clicked.

Hope this makes sense.


> 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