Alignment error

User 8a7878ec6d

12-02-2015 11:18:23

Hi,


I occasionally see an error concerning alignment of field objects. My impression is that this occurs when selecting columns containing different item formats (e.g text versus decimal number).


This is in IJC 15.2.2.00, have seen it happen both in Derby and mySQL-based databases.


java.lang.IllegalArgumentException: horizontalAlignment
    at javax.swing.JLabel.checkHorizontalKey(Unknown Source)
    at javax.swing.JLabel.setHorizontalAlignment(Unknown Source)
    at com.im.ijc.renderers.impl.AbstractSingleLineRenderer.getTableCellRendererComponent(AbstractSingleLineRenderer.java:124)
    at javax.swing.JTable.prepareRenderer(Unknown Source)
    at com.im.ijc.widgets.table.WBTable.prepareRenderer(WBTable.java:878)
    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.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JViewport.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at org.netbeans.swing.tabcontrol.TabbedContainer.paint(TabbedContainer.java:973)
    at javax.swing.JComponent.paintChildren(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.JComponent.paintImmediately(Unknown Source)
    at javax.swing.RepaintManager$3.run(Unknown Source)
    at javax.swing.RepaintManager$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.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$1000(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$200(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$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
[catch] at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:162)
    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)

ChemAxon 26d92e5dcd

13-02-2015 15:23:11

Dear Evert,


than you for reporting this. It seems as a mistake on our part. We will fix it.


Sorry for the inconvenience


Wishing all the best


David

ChemAxon 26d92e5dcd

01-02-2016 09:38:59

Dear Evert,


the problem was fixed in version 15.12.7 and onwards. Just to be sure, I retested it with the latest IJC version and it worked correctly.


Wishing all the best
David 

User 8a7878ec6d

03-02-2016 17:57:54

Cheers for that, David!

User 9d02774534

21-10-2016 10:22:06

Problem seems to be back in version 16.5.23.0.
Java: 1.7.0_80; Java HotSpot(TM) 64-Bit Server VM 24.80-b11
System: Linux version 3.13.0-100-generic running on amd64; UTF-8; en_US (instantjchem)


 


java.lang.IllegalArgumentException: horizontalAlignment

at javax.swing.JLabel.checkHorizontalKey(JLabel.java:607)

at javax.swing.JLabel.setHorizontalAlignment(JLabel.java:765)

at com.im.ijc.renderers.impl.AbstractTextRenderer.getWidgetRendererComponent(AbstractTextRenderer.java:160)

at com.im.ijc.renderers.impl.AbstractTextRenderer.getWidgetPrintRendererComponent(AbstractTextRenderer.java:169)

at com.im.ijc.widgets.molmatrix.MultipleCellRenderer.insertExtraFieldRender(MultipleCellRenderer.java:202)

at com.im.ijc.widgets.molmatrix.MultipleCellRenderer.createViewer(MultipleCellRenderer.java:175)

at com.im.ijc.widgets.table.TableCellViewer.fromRendererViewable(TableCellViewer.java:63)

at com.im.ijc.widgets.molmatrix.MolMatrixTable.showViewer(MolMatrixTable.java:611)

at com.im.ijc.widgets.molmatrix.MolMatrixWidget.showViewer(MolMatrixWidget.java:786)

at com.im.ijc.core.api.actions.DetailViewSelectedDataAction.performAction(DetailViewSelectedDataAction.java:31)

at org.openide.util.actions.NodeAction.performAction(NodeAction.java:295)

at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:129)

at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95)

at org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:116)

at org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:99)

at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:126)

at org.openide.util.actions.NodeAction.actionPerformed(NodeAction.java:283)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)

at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)

at javax.swing.AbstractButton.doClick(AbstractButton.java:376)

at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)

at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)

at java.awt.Component.processMouseEvent(Component.java:6516)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)

at java.awt.Component.processEvent(Component.java:6281)

at java.awt.Container.processEvent(Container.java:2229)

at java.awt.Component.dispatchEventImpl(Component.java:4872)

at java.awt.Container.dispatchEventImpl(Container.java:2287)

at java.awt.Component.dispatchEvent(Component.java:4698)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)

at java.awt.Container.dispatchEventImpl(Container.java:2273)

at java.awt.Window.dispatchEventImpl(Window.java:2719)

at java.awt.Component.dispatchEvent(Component.java:4698)

at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:747)

at java.awt.EventQueue.access$300(EventQueue.java:103)

at java.awt.EventQueue$3.run(EventQueue.java:706)

at java.awt.EventQueue$3.run(EventQueue.java:704)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)

at java.awt.EventQueue$4.run(EventQueue.java:720)

at java.awt.EventQueue$4.run(EventQueue.java:718)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:717)

at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:162)

[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

ChemAxon 206bfdcce5

07-11-2016 09:58:35

Dear Anna,


I am sorry for a late reply, I have tried to reproduce the issue but I have failed. Could you please provide us some more details?



Thank you,


Karla

User 9d02774534

07-11-2016 11:00:13

The error occurs in a form view, a molecules matrix widget with an extra text field when I right-click and choose View Value or press F3.
I cannot provide you with a form xml file as this option is greyed out. 

Problem was reproduced also on a computer with Windows.

ChemAxon 206bfdcce5

08-11-2016 14:18:50

Thank you for the details Anna, we are now able to reproduce the issue and I have created a bug report. I will post a response to this topic as soon as we have any news on it.


Best regards,


Karla

ChemAxon 206bfdcce5

19-12-2016 10:01:54

This issue was fixed in IJC 16.11.14.0