JideTable with auto-arrangeable-column

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

JideTable with auto-arrangeable-column

Postby nicola.gioia » Wed Jun 13, 2007 9:33 am

I have a little problem: I need to implement a jidetable with resizable column (mantaining all column at same width), and authomatically changaing the number of column to avoid that the cells on the right side of the table becomes out of the viewport (the number of column is TABLE_WIDTH/COLUMN_WIDTH on which TABLE_WIDTH is the width of the viewport that contains the table and COLUMN_WIDTH is the width of the column, with all columns at same width).
I've not fount this functionality and when i've reimplemented it i've found a little problem:
Sometimes during resize the table switch to an inconsistent state on which i see only many exception like the subsequent.
The exception is probably caused by a missing control of the number of columns in one of the methods in the call stack reported on the subsequent exception.
the first method with wrong parameters is:
Code: Select all
com.jidesoft.plaf.basic.BasicHierarchicalTableUI.paintCell(Graphics g, Rectangle cellRect, int row, int column)


That have a wrong column index.


at java.util.Vector.elementAt(Vector.java:432)
at com.jidesoft.grid.DefaultTableSelectionModel.getListSelectionModelAt(Unknown Source)
at com.jidesoft.grid.DefaultTableSelectionModel.isSelected(Unknown Source)
at com.jidesoft.grid.JideTable.isCellSelected(Unknown Source)
at com.jidesoft.grid.CellSpanTable.isCellSelected(Unknown Source)
at com.jidesoft.grid.JideTable.prepareRenderer(Unknown Source)
at com.jidesoft.grid.CellStyleTable.prepareRenderer(Unknown Source)
at com.jidesoft.grid.CellSpanTable.prepareRenderer(Unknown Source)
at com.jidesoft.plaf.basic.BasicHierarchicalTableUI.paintCell(Unknown Source)
at com.jidesoft.plaf.basic.BasicJideTableUI.a(Unknown Source)
at com.jidesoft.plaf.basic.BasicJideTableUI.paint(Unknown Source)
at com.jidesoft.plaf.basic.BasicCellSpanTableUI.paint(Unknown Source)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
at javax.swing.JComponent.paintComponent(JComponent.java:743)
at javax.swing.JComponent.paint(JComponent.java:1006)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paint(JComponent.java:1015)
at javax.swing.JViewport.paint(JViewport.java:728)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paint(JComponent.java:1015)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paint(JComponent.java:1015)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paint(JComponent.java:1015)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paint(JComponent.java:1015)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paint(JComponent.java:1015)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paint(JComponent.java:1015)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paint(JComponent.java:1015)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4972)
at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4925)
at javax.swing.JComponent._paintImmediately(JComponent.java:4868)
at javax.swing.JComponent.paintImmediately(JComponent.java:4675)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)


thanks.
nicola.gioia
 
Posts: 60
Joined: Tue Sep 20, 2005 6:57 am

Postby JIDE Support » Wed Jun 13, 2007 1:09 pm

Do you have a sample program I can run to see the issue? I didn't notice anything wrong when I look at paintCell source code.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby nicola.gioia » Thu Jun 14, 2007 12:52 am

Unfortunately the code is very complex and I have many difficult to extract a single part of code to reproduce the problem.
Today I try to do it, but I cannot insure to create a minimal code to reproduce the problem.
I can use breakpoints to tell you the values of the parameters values of all the call stack when the problem occour.
Thanks
nicola.gioia
 
Posts: 60
Joined: Tue Sep 20, 2005 6:57 am

Postby JIDE Support » Thu Jun 14, 2007 7:22 am

So what is the wong column index it used?

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby nicola.gioia » Thu Jun 14, 2007 7:49 am

It is always different.
The exception is always throws with row = 0 and column = columnNumber.
nicola.gioia
 
Posts: 60
Joined: Tue Sep 20, 2005 6:57 am

Postby JIDE Support » Thu Jun 14, 2007 8:02 am

If so, why do you say it's the wrong column index?
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby nicola.gioia » Mon Jun 25, 2007 9:00 am

Sorry but i have solved the problem changing approach and rewriting part of code, and then I had problem with my PC.
However. The columnIndex was wrong because the request was for the column with index n, but theonly available indexes are between 0 and n-1.
Now my problem regards another aspect of the functionality.
I need to reserve for all the columns the same width.
But if i use the PropertyChangeListener on the TableColumn i have the problem that the resizeing is in realtime.
The realtime resizeing of all columns is obviously undesidered for the unpredictable results that can cause.
I would like to use a listener that inform me of a resize event only at the end of the resize (when the mouse is released... for example)

Thanks
nicola.gioia
 
Posts: 60
Joined: Tue Sep 20, 2005 6:57 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 10 guests