Hi Alex,
There is a bug in ULCTableTree: https://www.canoo.com/jira/browse/UBA-7048 DefaultTreeCellRenderer.getOpenIcon is null because it is missing in the L&F and TableTreeTree.getTableCellOffset does not check for null. However, in you case you need to find out why DefaultTreeCellRenderer.getOpenIcon is null. Please see: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4405671 With your L&F, if you make the following calls in the main method they fail: UIManager.getIcon("Tree.leafIcon"); UIManager.getIcon("Tree.closedIcon"); UIManager.getIcon("Tree.openIcon"); giving the message: bedag.XPLookAndFeel/icons/TreeLeaf.gif not found. bedag.XPLookAndFeel/icons/TreeClosed.gif not found. bedag.XPLookAndFeel/icons/TreeOpen.gif not found. The above calls are the same ones used by the DefaultTreeCellRenderer to initialise repective icons and since they are failing the icons are null. The question is why isn't your L&F picking up these icon files from the same place as its parent L&F class. You need to figure out how to make your L&F class find those gif files. I hope this helps. Thanks and regards, Janak >-----Original Message----- >From: Stucki Alexander, Bedag [mailto:[EMAIL PROTECTED] >Sent: Friday, September 01, 2006 6:38 PM >To: [EMAIL PROTECTED] >Subject: AW: [ULC-developer] (no subject) > > >Hi Janak > >I took this over from Ernst. Sorry for the delay! > >We are using ULC 6.1, build.1820. > >In the attachment is a sample of our problem. > >If I use javax.swing.plaf.metal.MetalLookAndFeel it works, >everything else does not. >If I remove our code from XPTableHeaderUI.java it gives the same NPE. >The NPE occurs only if I use the ULCTableTree. The ULCTable works fine. > >Thanks for any help! >Kind regards, > >Alex > >*** > > >-----Ursprüngliche Nachricht----- >Von: Janak Mulani [mailto:[EMAIL PROTECTED] >Gesendet: Freitag, 18. August 2006 14:35 >An: Plüss Ernst, Bedag >Cc: Stucki Alexander, Bedag; [EMAIL PROTECTED] >Betreff: RE: [ULC-developer] (no subject) > >Hi Ernst, > >Which version of ULC are you using? > >Kindly mention the version number in all your posts. > >Moreover, can you send me your LnF extension so that I can reproduce your >problem? > >Thanks and regards, > >Janak > > >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] Behalf Of Plüss Ernst, Bedag >Sent: Wednesday, August 16, 2006 6:19 PM >To: [EMAIL PROTECTED] >Cc: Stucki Alexander, Bedag >Subject: [ULC-developer] (no subject) > > >Hi All >After extending the JGoodies XP Look & Feel we get a NPE every time a >TableTree is displayed. The Extension does nothing fancy. It changes the >color of the table headers, whenn the table(-tree) gets the focus. >Any ideas? >Best Regards >Ernst Plüss >Bedag Informatik AG >Abteilung GF GBA >Gutenbergstrasse 1 >3012 Bern >Telefon: +41 (0)31 633 21 21 (direkt 633 25 89) >E-Mail: mailto:[EMAIL PROTECTED] >www.bedag.ch > > > > java.lang.NullPointerException > at >com.ulcjava.base.client.tabletree.TableTreeTree.getTableCellOffset( >TableTree >Tree.java:22) > at >com.ulcjava.base.client.tabletree.TreeColumnCellRenderer.getTableCe >llRendere >rComponent(TreeColumnCellRenderer.java:7) > at javax.swing.JTable.prepareRenderer(JTable.java:3731) > at >javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:1149) > at >javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1051) > at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:974) > at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142) > at javax.swing.JComponent.paintComponent(JComponent.java:541) > at javax.swing.JComponent.paint(JComponent.java:808) > at >com.ulcjava.base.client.tabletree.TableTreeTable.paint(TableTreeTab >le.java:1 >9) > at javax.swing.JComponent.paintChildren(JComponent.java:647) > at javax.swing.JComponent.paint(JComponent.java:817) > at javax.swing.JComponent.paintChildren(JComponent.java:647) > at javax.swing.JComponent.paint(JComponent.java:817) > at javax.swing.JViewport.paint(JViewport.java:722) > at javax.swing.JComponent.paintChildren(JComponent.java:647) > at javax.swing.JComponent.paint(JComponent.java:817) > at javax.swing.JComponent.paintChildren(JComponent.java:647) > at javax.swing.JComponent.paint(JComponent.java:817) > at javax.swing.JComponent.paintChildren(JComponent.java:647) > at javax.swing.JComponent.paint(JComponent.java:817) > at javax.swing.JComponent.paintChildren(JComponent.java:647) > at javax.swing.JComponent.paint(JComponent.java:817) > at javax.swing.JComponent.paintChildren(JComponent.java:647) > at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1021) > at javax.swing.JComponent.paint(JComponent.java:817) > at javax.swing.JComponent.paintChildren(JComponent.java:647) > at javax.swing.JComponent.paint(JComponent.java:817) > at javax.swing.JComponent.paintChildren(JComponent.java:647) > at javax.swing.JComponent.paint(JComponent.java:817) > at javax.swing.JComponent.paintChildren(JComponent.java:647) > at javax.swing.JComponent.paint(JComponent.java:817) > at javax.swing.JComponent.paintChildren(JComponent.java:647) > at javax.swing.JComponent.paint(JComponent.java:817) > at javax.swing.JComponent.paintChildren(JComponent.java:647) > at javax.swing.JComponent.paint(JComponent.java:817) > at javax.swing.JLayeredPane.paint(JLayeredPane.java:557) > at javax.swing.JComponent.paintChildren(JComponent.java:647) > at javax.swing.JComponent.paint(JComponent.java:817) > at >javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4787) > at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4740) > at javax.swing.JComponent._paintImmediately(JComponent.java:4685) > at javax.swing.JComponent.paintImmediately(JComponent.java:4488) > at >javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410) > at >javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Syst >emEventQu >eueUtilities.java:117) > at >java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:189) > at java.awt.EventQueue.dispatchEvent(EventQueue.java:478) > at >com.ulcjava.base.client.FilteringEventQueue.dispatchEvent(Filtering >EventQueu >e.java:6) > at >java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatch >Thread.ja >va:201) > at >java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchTh >read.java >:151) > at >java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) > at >java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) > at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) > > _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer
