Package org.openxava.tab.impl
Class HiddenXTableModel
- java.lang.Object
-
- org.openxava.tab.impl.XTableModelDecoratorBase
-
- org.openxava.tab.impl.HiddenXTableModel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.table.TableModel
,IObjectTableModel
,IRefreshTableModel
,IXTableModel
public class HiddenXTableModel extends XTableModelDecoratorBase
Decorate anIXTableModel
to hidden columns.It's easy to use, for example:
int [] hidden = {0, 1}; IXTableModel decorated = new HiddenXTableModel(original, hidden);
After this you can use decorated which display data from original but without columns 1 and 2.- Author:
- Javier Paniza
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HiddenXTableModel(IXTableModel toDecorate, int[] hiddenIndexes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class
getColumnClass(int columnIndex)
int
getColumnCount()
java.lang.String
getColumnName(int columnIndex)
java.lang.Object
getValueAt(int rowIndex, int columnIndex)
boolean
isCellEditable(int rowIndex, int columnIndex)
void
setValueAt(java.lang.Object value, int rowIndex, int columnIndex)
-
Methods inherited from class org.openxava.tab.impl.XTableModelDecoratorBase
addTableModelListener, getChunkSize, getObjectAt, getRowCount, getSum, getTotalSize, isAllLoaded, refresh, removeAllRows, removeRow, removeTableModelListener
-
-
-
-
Constructor Detail
-
HiddenXTableModel
public HiddenXTableModel(IXTableModel toDecorate, int[] hiddenIndexes)
- Parameters:
toDecorate
- TableModel to decorate hidden columnshiddenIndexes
- Indexes of columns to hidden, if null no columns are hidden.- Throws:
java.lang.IllegalArgumentException
- If toDecorate == null.
-
-
Method Detail
-
getColumnClass
public java.lang.Class getColumnClass(int columnIndex)
- Specified by:
getColumnClass
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnClass
in classXTableModelDecoratorBase
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnCount
in classXTableModelDecoratorBase
-
getColumnName
public java.lang.String getColumnName(int columnIndex)
- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classXTableModelDecoratorBase
-
getValueAt
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
- Specified by:
getValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
getValueAt
in classXTableModelDecoratorBase
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex)
- Specified by:
isCellEditable
in interfacejavax.swing.table.TableModel
- Overrides:
isCellEditable
in classXTableModelDecoratorBase
-
setValueAt
public void setValueAt(java.lang.Object value, int rowIndex, int columnIndex)
- Specified by:
setValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
setValueAt
in classXTableModelDecoratorBase
-
-