commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Closed: (LANG-522) Support use of mutable numbers in editable JTable models
Date Sat, 24 Oct 2009 00:01:59 GMT

     [ https://issues.apache.org/jira/browse/LANG-522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Henri Yandell closed LANG-522.
------------------------------

    Resolution: Fixed

svn ci -m "Patch from Michael Rudolf in LANG-522 applied with additional String constructor
tests added" 
Sending        src/java/org/apache/commons/lang/mutable/MutableByte.java
Sending        src/java/org/apache/commons/lang/mutable/MutableDouble.java
Sending        src/java/org/apache/commons/lang/mutable/MutableFloat.java
Sending        src/java/org/apache/commons/lang/mutable/MutableInt.java
Sending        src/java/org/apache/commons/lang/mutable/MutableLong.java
Sending        src/java/org/apache/commons/lang/mutable/MutableShort.java
Sending        src/test/org/apache/commons/lang/mutable/MutableByteTest.java
Sending        src/test/org/apache/commons/lang/mutable/MutableDoubleTest.java
Sending        src/test/org/apache/commons/lang/mutable/MutableFloatTest.java
Sending        src/test/org/apache/commons/lang/mutable/MutableIntTest.java
Sending        src/test/org/apache/commons/lang/mutable/MutableLongTest.java
Sending        src/test/org/apache/commons/lang/mutable/MutableShortTest.java
Transmitting file data ............
Committed revision 829283.

> Support use of mutable numbers in editable JTable models
> --------------------------------------------------------
>
>                 Key: LANG-522
>                 URL: https://issues.apache.org/jira/browse/LANG-522
>             Project: Commons Lang
>          Issue Type: Improvement
>    Affects Versions: 2.4
>            Reporter: Michael Rudolf
>             Fix For: 3.0, 2.x
>
>         Attachments: mutable-number-string-constructor-2.4.patch, mutable-number-string-constructor-trunk.patch
>
>
> In order for mutable numbers to be used in editable JTable models, they need to have
a constructor accepting a string. The following stack trace was the result of double-clicking
on a table cell displaying a MutableDouble instance:
> java.lang.NoSuchMethodException: org.apache.commons.lang.mutable.MutableDouble.<init>(java.lang.String)
>  at java.lang.Class.getConstructor0(Class.java:2678)
>  at java.lang.Class.getConstructor(Class.java:1629)
>  at org.jdesktop.swingx.table.NumberEditorExt.getTableCellEditorComponent(NumberEditorExt.java:107)
> Caused: java.lang.IllegalStateException: Number subclass must have a constructor which
takes a string
>  at org.jdesktop.swingx.table.NumberEditorExt.getTableCellEditorComponent(NumberEditorExt.java:110)
>  at javax.swing.JTable.prepareEditor(JTable.java:3983)
>  at org.jdesktop.swingx.JXTable.prepareEditor(JXTable.java:3458)
>  at javax.swing.JTable.editCellAt(JTable.java:2688)
>  at org.jdesktop.swingx.JXTable.editCellAt(JXTable.java:3852)
>  at javax.swing.plaf.basic.BasicTableUI$Handler.adjustFocusAndSelection(BasicTableUI.java:955)
>  at javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(BasicTableUI.java:922)
>  at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222)
>  at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
>  at java.awt.Component.processMouseEvent(Component.java:5514)
>  at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
>  at java.awt.Component.processEvent(Component.java:5282)
>  at java.awt.Container.processEvent(Container.java:1966)
>  at java.awt.Component.dispatchEventImpl(Component.java:3984)
>  at java.awt.Container.dispatchEventImpl(Container.java:2024)
>  at java.awt.Component.dispatchEvent(Component.java:3819)
>  at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
>  at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889)
>  at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
>  at java.awt.Container.dispatchEventImpl(Container.java:2010)
>  at java.awt.Window.dispatchEventImpl(Window.java:1791)
>  at java.awt.Component.dispatchEvent(Component.java:3819)
>  at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
> The editor had been installed in this way:
> JTable table = ...;
> table.setDefaultEditor(Number.class, table.getDefaultEditor(Double.class));

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message