Modify

Opened 15 years ago

Closed 15 years ago

#2641 closed defect (fixed)

[PATCH] Reorder colums

Reported by: fatbozz Owned by: team
Priority: major Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

Try to reorder colums in key-value window by drag and move it with right button then exception occurs.

Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 1607
Node Kind: directory
Last Changed Author: stoecker
Last Changed Rev: 1607
Last Changed Date: 2009-05-20 16:08:00 +0200 (Wed, 20 May 2009)

Java version: 1.6.0_13
Plugins: AgPifoJ;DirectUpload;czechaddress;measurement;multipoly;openstreetbugs;remotecontrol;routing;terracer;usertools;utilsplugin;validator;wmsplugin
Plugin AgPifoJ Version: 14916
Plugin DirectUpload Version: 14856
Plugin czechaddress Version: 0.1
Plugin measurement Version: 14015
Plugin multipoly Version: ${version.entry.commit.revision}
Plugin openstreetbugs Version: 14826
Plugin remotecontrol Version: 14991
Plugin routing Version: 15106
Plugin terracer Version: 15127
Plugin usertools Version: 14125
Plugin utilsplugin Version: 15127
Plugin validator Version: 15127
Plugin wmsplugin Version: 15091

java.lang.ClassCastException: java.util.TreeMap cannot be cast to java.lang.String
	at org.openstreetmap.josm.gui.dialogs.PropertiesDialog$8.getTableCellRendererComponent(PropertiesDialog.java:480)
	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.BufferStrategyPaintManager.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.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
	at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(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)

Attachments (2)

properties-dialog.patch (1.8 KB ) - added by plaicy 15 years ago.
properties-dialog2.patch (1.5 KB ) - added by plaicy 15 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by plaicy, 15 years ago

Summary: Reorder colums[PATCH] Reorder colums

I attach a patch using instanceof instead of depending on column number. This reduce exactly this problem. But I think the PropertiesDialog need some refactorying. For example it should be possible to modify entries directly in this dialog and not inside a popup-dialog.

by plaicy, 15 years ago

Attachment: properties-dialog.patch added

comment:2 by stoecker, 15 years ago

Owner: changed from team to fatbozz
Status: newneedinfo

Does not apply any longer.

by plaicy, 15 years ago

Attachment: properties-dialog2.patch added

comment:3 by plaicy, 15 years ago

Owner: changed from fatbozz to team
Status: needinfonew

I had attach the patch. I have updated it to r2017 and attached as new patch.
Without the patch the error is still present:

  1. Open properties dialog
  2. Choose some way or node with properties set
  3. click with the left mouse button on the key heading and drag this heading right after the value and a bug is fired:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 11.2-b01 (Sun Microsystems Inc.)
Main-class: JOSM
Main-Version: 2017 SVN
Main-Date: 2009-08-30T17:07:24.206434Z
Memory Usage: 16 MB / 254 MB (1 MB allocated, but free)
Java version: 1.6.0_12

Plugins: AgPifoJIntersect_waymeasurementopenstreetbugsopenvisibleremotecontroltageditortagging-preset-testerusertoolsutilspluginvalidatorwmsplugin
Plugin AgPifoJ Version: 17363
Plugin Intersect_way Version: 12781
Plugin measurement Version: 17377
Plugin openstreetbugs Version: 17354
Plugin openvisible Version: 16587
Plugin remotecontrol Version: 16965
Plugin tageditor Version: 17386
Plugin tagging-preset-tester Version: 14015
Plugin usertools Version: 17359
Plugin utilsplugin Version: 17361
Plugin validator Version: 17352
Plugin wmsplugin Version: 17390


java.lang.ClassCastException: java.util.TreeMap cannot be cast to java.lang.String
	at org.openstreetmap.josm.gui.dialogs.PropertiesDialog$8.getTableCellRendererComponent(PropertiesDialog.java:470)
	at javax.swing.JTable.prepareRenderer(JTable.java:5729)
	at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2075)
	at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1977)
	at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1773)
	at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
	at javax.swing.JComponent.paintComponent(JComponent.java:763)
	at javax.swing.JComponent.paint(JComponent.java:1027)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5122)
	at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:277)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1217)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5070)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4880)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:803)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
	at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694)
	at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

comment:4 by stoecker, 15 years ago

Resolution: fixed
Status: newclosed

(In [2018]) fixed #2641 - patch by plaicy - exception when reordering columns

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.