Modify

Opened 4 years ago

Closed 2 years ago

#12420 closed enhancement (needinfo)

[patch] make summaries of primitive counts in SelectionList Dialog clickable

Reported by: cmuelle8 Owned by: cmuelle8
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Cc: Klumbumbus

Description

Please find attached a patch that enhances ToggleDialog's TitleBar.

It allows to perform actions when parts of the title of a ToggleDialog is clicked. It shows a tooltip to inform users about this possibility. If clicking a part of a title does not make sense (or if the dialog is collapsed), the event is dispatched to the parent. This means most of the title space is still taken to properly collapse/uncollapse the dialog.

I've exchanged the GridBagLayout for the GroupLayout - this allows to drop workaround code that wrapped the original title label within a weaker component to not take away space for the buttons when ToggleDialogs were resized to be narrow.

Currently this feature is used for SelectionList dialog - it allows users to quickly sub-select the ways / nodes / or relations contained in the selection list.

It works only when docked, as there is no easy way to add listeners to the window title of a detached dialog.

Great care was taken to test it, but please test the code once more, before you apply it.

Thanks,
cmuelle8

Attachments (1)

josm-selection-toggledialog_clickable-summary-title.patch (20.4 KB) - added by cmuelle8 4 years ago.
josm-selection-toggledialog_clickable-summary-title.patch

Download all attachments as: .zip

Change History (13)

comment:1 Changed 4 years ago by Klumbumbus

Cc: Klumbumbus added

comment:2 Changed 4 years ago by cmuelle8

  • simplified adding of Actions
  • added actions to title popup menu as well for better accessibility
  • if SelectionDialog is collapsed, actions are accessible via popup, left click will always uncollapse

Please test it, before you apply, but it should be ok.
Some new messages need translation.

comment:3 Changed 4 years ago by stoecker

Milestone: 16.02

comment:4 Changed 4 years ago by Don-vip

There's too much checkstyle violations. Can you please issue a new patch? You can run ant checkstyle or configure your IDE with browser/josm/trunk/tools/checkstyle config files.

comment:5 Changed 4 years ago by cmuelle8

does not work after checkstyle updates, working state lost probably due to moving anonymous class to inner class - still working on it..

Changed 4 years ago by cmuelle8

josm-selection-toggledialog_clickable-summary-title.patch

comment:6 Changed 4 years ago by cmuelle8

  • refactored and merged with existing inner class MouseEventHandler in ToggleDialog
  • do not offer single action for selection list dialog, if it contains items of a single primitive only
  • the purpose of title actions in selection list dialog is to quickly filter single primitives

Btw, it might make big sense to put the remembered lists of Search and Select buttons into popup menu of the dialog titlebar as well.

In minimized state of ToggleDialog the buttons are not accessible, which presumably was the reason to put these actions on the popup menu in the first place. But this is not a full replacement, because the associated remembered lists of these buttons, usually activated by the arrow sidebuttons in expanded dialog view, stay inaccessible.

It would be nice to have this synchronized, i.e. have remembered list accessible via titlebar popupmenu too. But that would be another ticket..

comment:7 Changed 4 years ago by Don-vip

Milestone: 16.0216.03

comment:8 Changed 4 years ago by Don-vip

Sorry for delay, now the patch does not apply anymore :( Could you please attach an updated version?

comment:9 Changed 4 years ago by Don-vip

Milestone: 16.0316.04

Milestone renamed

comment:10 Changed 4 years ago by Don-vip

Milestone: 16.0416.05
Owner: changed from team to cmuelle8
Status: newneedinfo

comment:11 Changed 4 years ago by Don-vip

Milestone: 16.05

comment:12 Changed 2 years ago by stoecker

Resolution: needinfo
Status: needinfoclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain cmuelle8.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.