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

Dirk Moebius commented on PIVOT-458:
------------------------------------

> 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.

Generally yes, but there are exceptions. I find if very convenient that I can 
attach an action to a checkbox/radio button/list button/menu button, and I'm 
glad that those components fire action events so that I don't have to attach a 
mouse listener to them.

> 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"?

You're right. My example was contrived, but if I had used only the three 
actions "add at top", "add at bottom" and "replace" (with "add at top" being 
the default action) it becomes more clear what I meant.

> 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. 

Ok.

> 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.

Yes, right. But the action that the user selected remains after being executed. 
The ListButton doesn't snap back to the default action. Of course I could to 
that programmatically.

Ok, all in all you've convinced me. I'd be happy if the patch is applied to 
ListButton only, and I don't care if the property is called "split" or 
"showPopupOnTriggerClickOnly" or 
"makeThePopupShowUpOnlyIfTheLittleTriangleRightOfTheButtonLabelIsClickedButNotIfTheButtonsLabelItselfIsClicked"
 or whatever. :-)


> 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.
-
You can reply to this email to add a comment to the issue online.

Reply via email to