BF [ 1891082 ] NPE on MiniTable when you hide some columns
This commit is contained in:
parent
8340239975
commit
6216f2c06e
|
@ -44,6 +44,9 @@ import org.compiere.util.*;
|
||||||
* </code>
|
* </code>
|
||||||
* @author Jorg Janke
|
* @author Jorg Janke
|
||||||
* @version $Id: MiniTable.java,v 1.3 2006/07/30 00:51:28 jjanke Exp $
|
* @version $Id: MiniTable.java,v 1.3 2006/07/30 00:51:28 jjanke Exp $
|
||||||
|
*
|
||||||
|
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
|
||||||
|
* <li>BF [ 1891082 ] NPE on MiniTable when you hide some columns
|
||||||
*/
|
*/
|
||||||
public class MiniTable extends CTable
|
public class MiniTable extends CTable
|
||||||
{
|
{
|
||||||
|
@ -117,8 +120,10 @@ public class MiniTable extends CTable
|
||||||
renderer = getCellRenderer(row, col);
|
renderer = getCellRenderer(row, col);
|
||||||
comp = renderer.getTableCellRendererComponent
|
comp = renderer.getTableCellRendererComponent
|
||||||
(this, getValueAt(row, col), false, false, row, col);
|
(this, getValueAt(row, col), false, false, row, col);
|
||||||
int rowWidth = comp.getPreferredSize().width + SLACK;
|
if (comp != null) {
|
||||||
width = Math.max(width, rowWidth);
|
int rowWidth = comp.getPreferredSize().width + SLACK;
|
||||||
|
width = Math.max(width, rowWidth);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Width not greater ..
|
// Width not greater ..
|
||||||
width = Math.min(MAXSIZE, width);
|
width = Math.min(MAXSIZE, width);
|
||||||
|
|
Loading…
Reference in New Issue