Class TypedMetaTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- org.pentaho.reporting.engine.classic.core.util.TypedTableModel
-
- org.pentaho.reporting.engine.classic.core.util.TypedMetaTableModel
-
- All Implemented Interfaces:
Serializable
,TableModel
,MetaTableModel
public class TypedMetaTableModel extends TypedTableModel implements MetaTableModel
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description TypedMetaTableModel()
TypedMetaTableModel(int rowIncrement, int columnIncrement)
TypedMetaTableModel(String[] columnNames)
TypedMetaTableModel(String[] columnNames, Class[] columnClasses)
TypedMetaTableModel(String[] columnNames, Class[] columnClasses, int rowCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addColumn(String name, Class<?> type)
DataAttributes
getCellDataAttributes(int row, int column)
Returns the meta-attribute as Java-Object.DataAttributes
getColumnAttributes(int column)
Returns the column-level attributes for the given column.DataAttributes
getTableAttributes()
Returns table-wide attributes.boolean
isCellDataAttributesSupported()
Checks, whether cell-data attributes are supported by this tablemodel implementation.void
setColumnAttribute(int column, String metaAttributeDomain, String metaAttributeId, Object value)
void
setTableAttribute(String namespace, String name, Object value)
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.util.TypedTableModel
addRow, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, setColumnName, setColumnType, setValueAt, toString
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
-
-
-
-
Constructor Detail
-
TypedMetaTableModel
public TypedMetaTableModel()
-
TypedMetaTableModel
public TypedMetaTableModel(int rowIncrement, int columnIncrement)
-
TypedMetaTableModel
public TypedMetaTableModel(String[] columnNames)
-
-
Method Detail
-
addColumn
public void addColumn(String name, Class<?> type)
- Overrides:
addColumn
in classTypedTableModel
-
getCellDataAttributes
public DataAttributes getCellDataAttributes(int row, int column)
Description copied from interface:MetaTableModel
Returns the meta-attribute as Java-Object. The object type that is expected by the caller is defined in the TableMetaData property set. It is the responsibility of the implementor to map the native meta-data model into a model suitable for reporting. Be aware that cell-level attributes do not make it into the designtime dataschema, as this dataschema only looks at the structural metadata available and does not contain any data references.- Specified by:
getCellDataAttributes
in interfaceMetaTableModel
- Parameters:
row
- the row of the cell for which the meta-data is queried.column
- the index of the column for which the meta-data is queried.- Returns:
- the meta-data object.
-
isCellDataAttributesSupported
public boolean isCellDataAttributesSupported()
Description copied from interface:MetaTableModel
Checks, whether cell-data attributes are supported by this tablemodel implementation.- Specified by:
isCellDataAttributesSupported
in interfaceMetaTableModel
- Returns:
- true, if the model supports cell-level attributes, false otherwise.
-
setColumnAttribute
public void setColumnAttribute(int column, String metaAttributeDomain, String metaAttributeId, Object value)
-
getColumnAttributes
public DataAttributes getColumnAttributes(int column)
Description copied from interface:MetaTableModel
Returns the column-level attributes for the given column.- Specified by:
getColumnAttributes
in interfaceMetaTableModel
- Parameters:
column
- the column.- Returns:
- data-attributes, never null.
-
getTableAttributes
public DataAttributes getTableAttributes()
Description copied from interface:MetaTableModel
Returns table-wide attributes. This usually contain hints about the data-source used to query the data as well as hints on the sort-order of the data.- Specified by:
getTableAttributes
in interfaceMetaTableModel
- Returns:
- the table-attributes, never null.
-
-