Modify

Opened 4 years ago

Closed 4 years ago

#12300 closed enhancement (fixed)

Drag and Drop support for relation member list reordering

Reported by: simon04 Owned by: simon04
Priority: major Milestone: 16.02
Component: Core Version:
Keywords: relation drag-and-drop dnd Cc: Klumbumbus

Description

I thought the relation member list would deserve some enhancements: drag and drop support to allow easier reordering of the members.

(Btw: it takes some time to get started with https://docs.oracle.com/javase/tutorial/uiswing/dnd/)

Attachments (4)

12300-v1.patch (5.0 KB) - added by simon04 4 years ago.
12300-v2.patch (7.9 KB) - added by simon04 4 years ago.
12300-v3.patch (17.3 KB) - added by simon04 4 years ago.
simplified-relation-editor.png (50.8 KB) - added by simon04 4 years ago.

Download all attachments as: .zip

Change History (22)

Changed 4 years ago by simon04

Attachment: 12300-v1.patch added

comment:1 Changed 4 years ago by Klumbumbus

Cc: Klumbumbus added

Changed 4 years ago by simon04

Attachment: 12300-v2.patch added

comment:2 Changed 4 years ago by simon04

I'm really looking forward to getting this feature. Some cool things:

  • drag-and-drop works also between two relation editor instances
  • drag-and-drop works also between two relation editor instances of different layers¹
  • drag-and-drop works also between two relation editor instances of different JOSM instances¹
  • drag to a text editor works (the opposite direction is also easy)

¹ provided the primitives are part of the dataset

Next goal: drag from selection list and drop in relation editor member table

Changed 4 years ago by simon04

Attachment: 12300-v3.patch added

comment:3 Changed 4 years ago by simon04

attachment:12300-v3.patch​ – drag from selection list and drop in relation editor member table (with automatic role suggestion)

This allows either to simplify the existing relation editor, or to create a separate simplified editor which only has the relation member part, but not the relation tags above nor the selected primitives on the right.

Changed 4 years ago by simon04

comment:4 Changed 4 years ago by Klumbumbus

Priority: normalmajor

comment:5 Changed 4 years ago by simon04

In 9368/josm:

see #12300 - Drag and Drop support for relation member list reordering

comment:6 Changed 4 years ago by simon04

In 9369/josm:

see #12300 - Allow to drag from select list to relation members

comment:7 Changed 4 years ago by simon04

In 9376/josm:

see #12300 - Fix headless unit tests

comment:8 Changed 4 years ago by Don-vip

In 9379/josm:

see #12300 - suppress warnings

comment:9 Changed 4 years ago by Klumbumbus

What steps will reproduce the problem?

  1. use 9384 from jenkins
  2. move an element in the relation editor

Please provide any additional information below. Attach a screenshot if possible.

Build-Date:2016-01-10 13:11:45
Revision:9384
Is-Local-Build:true

Identification: JOSM/1.5 (9384 SVN en) Windows 7 32-Bit
Memory Usage: 194 MB / 247 MB (25 MB allocated, but free)
Java version: 1.8.0_66-b18, Oracle Corporation, Java HotSpot(TM) Client VM
Dataset consistency test: No problems found

Plugins:
- AddrInterpolation (31772)
- DirectDownload (31934)
- DirectUpload (31912)
- HouseNumberTaggingTool (31772)
- OpeningHoursEditor (31772)
- PicLayer (31895)
- RoadSigns (31895)
- apache-commons (31895)
- buildings_tools (31895)
- download_along (31772)
- editgpx (31772)
- imagery_offset_db (31895)
- importvec (31772)
- log4j (31895)
- measurement (31895)
- photo_geotagging (31895)
- photoadjust (31963)
- public_transport (31895)
- reltoolbox (31895)
- reverter (31926)
- tag2link (31910)
- tageditor (31772)
- tagging-preset-tester (31895)
- terracer (31895)
- turnlanes (31772)
- turnrestrictions (31895)
- undelete (31895)
- utilsplugin2 (31895)
- wikipedia (31917)

Last errors/warnings:
- W: java.net.SocketException: Socket Closed
- E: java.net.SocketException: Socket Closed
- W: java.lang.IndexOutOfBoundsException: Index: 6, Size: 6
- E: java.lang.IndexOutOfBoundsException: Index: 6, Size: 6

java.lang.IndexOutOfBoundsException: Index: 6, Size: 6
	at java.util.ArrayList.rangeCheck(Unknown Source)
	at java.util.ArrayList.get(Unknown Source)
	at org.openstreetmap.josm.gui.dialogs.relation.MemberTableModel.getWayConnection(MemberTableModel.java:752)
	at org.openstreetmap.josm.gui.dialogs.relation.MemberTableModel.getValueAt(MemberTableModel.java:215)
	at javax.swing.JTable.getValueAt(Unknown Source)
	at javax.swing.JTable.prepareRenderer(Unknown Source)
	at javax.swing.plaf.basic.BasicTableUI.paintCell(Unknown Source)
	at javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source)
	at javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source)
	at javax.swing.plaf.ComponentUI.update(Unknown Source)
	at javax.swing.JComponent.paintComponent(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintToOffscreen(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
	at javax.swing.RepaintManager.paint(Unknown Source)
	at javax.swing.JComponent._paintImmediately(Unknown Source)
	at javax.swing.JComponent.paintImmediately(Unknown Source)
	at javax.swing.RepaintManager$4.run(Unknown Source)
	at javax.swing.RepaintManager$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.access$1200(Unknown Source)
	at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

comment:10 Changed 4 years ago by simon04

In 9388/josm:

see #12300 - Invalidate connection icons after dropping new members

comment:11 Changed 4 years ago by simon04

Summary: [Patch] Drag and Drop support for relation member list reorderingDrag and Drop support for relation member list reordering

comment:12 in reply to:  2 Changed 4 years ago by Don-vip

Replying to simon04:

I'm really looking forward to getting this feature. Some cool things:

Wow, these features are awesome, we need to document them :)

comment:13 Changed 4 years ago by Don-vip

In 9563/josm:

see #12300 - add javadoc, unit tests

comment:14 Changed 4 years ago by Klumbumbus

While documenting in the wiki I tested this and noticed that the following does not work for me:

  • drag-and-drop between two relation editor instances of different JOSM instances (I downloaded the same area in both instances)
  • drag from a text editor into josm

I don't need these special functionality, I was just wondering if this is supposed to work for correct documentation.

(r9690)

comment:15 Changed 4 years ago by simon04

In 9711/josm:

see #12300 - Provide wrapper classes for transfer data to avoid unchecked casts

comment:16 Changed 4 years ago by Don-vip

can we close this ticket?

comment:17 Changed 4 years ago by simon04

In 9891/josm:

see #12300 - Make Drag and Drop work between different JOSM instances

comment:18 in reply to:  16 Changed 4 years ago by simon04

Resolution: fixed
Status: newclosed

Replying to Klumbumbus:

While documenting in the wiki I tested this and noticed that the following does not work for me:

  • drag-and-drop between two relation editor instances of different JOSM instances (I downloaded the same area in both instances)

Should be fixed in r9891.

  • drag from a text editor into josm

This is not (yet) implemented.

Replying to Don-vip:

can we close this ticket?

Now, yes :)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain simon04.
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.