Package org.openxava.tab.impl
Class XTableModelDecoratorBase
- java.lang.Object
-
- org.openxava.tab.impl.XTableModelDecoratorBase
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.table.TableModel
,IObjectTableModel
,IRefreshTableModel
,IXTableModel
- Direct Known Subclasses:
HiddenXTableModel
,SelectedRowsXTableModel
public class XTableModelDecoratorBase extends java.lang.Object implements IXTableModel, java.io.Serializable
Base class to createIXTableModel
decorators.A decorator as describe in GoF book. By default simply redirect the call to IXTableModel original.
- Author:
- Javier Paniza
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XTableModelDecoratorBase(IXTableModel toDecorate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTableModelListener(javax.swing.event.TableModelListener l)
int
getChunkSize()
java.lang.Class
getColumnClass(int columnIndex)
int
getColumnCount()
java.lang.String
getColumnName(int columnIndex)
java.lang.Object
getObjectAt(int rowIndex)
Return the object associated to indicated row.int
getRowCount()
java.lang.Number
getSum(java.lang.String property)
int
getTotalSize()
Total count of objects represented by this table model.java.lang.Object
getValueAt(int rowIndex, int columnIndex)
boolean
isAllLoaded()
boolean
isCellEditable(int rowIndex, int columnIndex)
void
refresh()
Refresh data from datasource.void
removeAllRows()
void
removeRow(java.util.Map keyValues)
void
removeTableModelListener(javax.swing.event.TableModelListener l)
void
setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
-
-
-
Constructor Detail
-
XTableModelDecoratorBase
public XTableModelDecoratorBase(IXTableModel toDecorate)
- Parameters:
toDecorate
- IXTableModel to decorate.- Throws:
java.lang.IllegalArgumentException
- If toDecorate == null.
-
-
Method Detail
-
addTableModelListener
public void addTableModelListener(javax.swing.event.TableModelListener l)
- Specified by:
addTableModelListener
in interfacejavax.swing.table.TableModel
-
getColumnClass
public java.lang.Class getColumnClass(int columnIndex)
- Specified by:
getColumnClass
in interfacejavax.swing.table.TableModel
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfacejavax.swing.table.TableModel
-
getColumnName
public java.lang.String getColumnName(int columnIndex)
- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
-
getObjectAt
public java.lang.Object getObjectAt(int rowIndex) throws javax.ejb.FinderException
Description copied from interface:IObjectTableModel
Return the object associated to indicated row.- Specified by:
getObjectAt
in interfaceIObjectTableModel
- Specified by:
getObjectAt
in interfaceIXTableModel
- Throws:
javax.ejb.FinderException
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfacejavax.swing.table.TableModel
-
getValueAt
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
- Specified by:
getValueAt
in interfacejavax.swing.table.TableModel
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex)
- Specified by:
isCellEditable
in interfacejavax.swing.table.TableModel
-
refresh
public void refresh() throws TabException
Description copied from interface:IRefreshTableModel
Refresh data from datasource.- Specified by:
refresh
in interfaceIRefreshTableModel
- Specified by:
refresh
in interfaceIXTableModel
- Throws:
TabException
-
removeAllRows
public void removeAllRows()
- Specified by:
removeAllRows
in interfaceIXTableModel
-
removeTableModelListener
public void removeTableModelListener(javax.swing.event.TableModelListener l)
- Specified by:
removeTableModelListener
in interfacejavax.swing.table.TableModel
-
setValueAt
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
- Specified by:
setValueAt
in interfacejavax.swing.table.TableModel
-
getTotalSize
public int getTotalSize() throws java.rmi.RemoteException
Description copied from interface:IXTableModel
Total count of objects represented by this table model.Cantidad de objetos total representados por el table model.
getRowCount()
in another side, return the loaded objects count, not total.- Specified by:
getTotalSize
in interfaceIXTableModel
- Throws:
java.rmi.RemoteException
-
getSum
public java.lang.Number getSum(java.lang.String property) throws java.rmi.RemoteException
- Specified by:
getSum
in interfaceIXTableModel
- Throws:
java.rmi.RemoteException
-
removeRow
public void removeRow(java.util.Map keyValues) throws javax.ejb.FinderException
- Specified by:
removeRow
in interfaceIXTableModel
- Throws:
javax.ejb.FinderException
-
getChunkSize
public int getChunkSize()
- Specified by:
getChunkSize
in interfaceIXTableModel
- Since:
- 5.7
-
isAllLoaded
public boolean isAllLoaded()
- Specified by:
isAllLoaded
in interfaceIXTableModel
- Since:
- 5.7
-
-