Class AbstractStyleTableModel<T extends StyleDataBackend>
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- org.pentaho.reporting.designer.core.editor.styles.AbstractStyleTableModel<T>
-
- All Implemented Interfaces:
Serializable
,TableModel
,ElementMetaDataTableModel
,GroupingModel
,SortableTableModel
,org.pentaho.reporting.libraries.designtime.swing.table.PropertyTableModel
- Direct Known Subclasses:
SimpleStyleTableModel
,StyleTableModel
public abstract class AbstractStyleTableModel<T extends StyleDataBackend> extends AbstractTableModel implements ElementMetaDataTableModel, GroupingModel
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractStyleTableModel.NotifyChangeTask
protected class
AbstractStyleTableModel.SameElementsUpdateDataTask
-
Field Summary
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description AbstractStyleTableModel()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected PropertyEditor
computeEditor(org.pentaho.reporting.engine.classic.core.metadata.StyleMetaData metaData, int row)
protected Object
computeFullValue(org.pentaho.reporting.engine.classic.core.metadata.StyleMetaData metaData, int row)
protected abstract Object
computeInheritValue(org.pentaho.reporting.engine.classic.core.metadata.StyleMetaData metaData, int rowIndex)
protected abstract boolean
defineFullValue(org.pentaho.reporting.engine.classic.core.metadata.StyleMetaData metaData, Object value)
Class
getClassForCell(int rowIndex, int columnIndex)
int
getColumnCount()
String
getColumnName(int column)
protected T
getDataBackend()
protected PropertyEditor
getDefaultEditor(Class type)
PropertyEditor
getEditorForCell(int rowIndex, int columnIndex)
String[]
getExtraFields(int row, int column)
GroupingHeader
getGroupHeader(int index)
protected GroupingHeader
getGroupings(int row)
protected org.pentaho.reporting.engine.classic.core.metadata.StyleMetaData
getMetaData(int row)
int
getRowCount()
TableStyle
getTableStyle()
Object
getValueAt(int rowIndex, int columnIndex)
String
getValueRole(int row, int column)
boolean
isCellEditable(int rowIndex, int columnIndex)
boolean
isHeaderRow(int index)
boolean
isSynchronous()
protected GroupingHeader[]
reconcileState(GroupingHeader[] groupings, GroupingHeader[] oldGroupings)
Uses the name of the old groupings to set the collapse status of the new groupings so that when a user makes a selection not all of the groups return to the expanded state.protected void
setDataBackend(T dataBackend)
void
setSynchronous(boolean synchronous)
void
setTableStyle(TableStyle tableStyle)
void
setValueAt(Object aValue, int rowIndex, int columnIndex)
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, removeTableModelListener
-
-
-
-
Method Detail
-
isSynchronous
public boolean isSynchronous()
-
setSynchronous
public void setSynchronous(boolean synchronous)
-
getDataBackend
protected T getDataBackend()
-
setDataBackend
protected void setDataBackend(T dataBackend)
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfaceTableModel
-
getMetaData
protected org.pentaho.reporting.engine.classic.core.metadata.StyleMetaData getMetaData(int row)
-
getGroupings
protected GroupingHeader getGroupings(int row)
-
getTableStyle
public TableStyle getTableStyle()
- Specified by:
getTableStyle
in interfaceSortableTableModel
-
setTableStyle
public void setTableStyle(TableStyle tableStyle)
- Specified by:
setTableStyle
in interfaceSortableTableModel
-
reconcileState
protected GroupingHeader[] reconcileState(GroupingHeader[] groupings, GroupingHeader[] oldGroupings)
Uses the name of the old groupings to set the collapse status of the new groupings so that when a user makes a selection not all of the groups return to the expanded state. In essence makes group collapses "sticky" where the group heading hasn't changed.- Parameters:
groupings
-oldGroupings
-
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfaceTableModel
-
getColumnName
public String getColumnName(int column)
- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
-
getValueAt
public Object getValueAt(int rowIndex, int columnIndex)
- Specified by:
getValueAt
in interfaceTableModel
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex)
- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
-
setValueAt
public void setValueAt(Object aValue, int rowIndex, int columnIndex)
- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classAbstractTableModel
-
computeInheritValue
protected abstract Object computeInheritValue(org.pentaho.reporting.engine.classic.core.metadata.StyleMetaData metaData, int rowIndex)
-
defineFullValue
protected abstract boolean defineFullValue(org.pentaho.reporting.engine.classic.core.metadata.StyleMetaData metaData, Object value)
-
computeFullValue
protected Object computeFullValue(org.pentaho.reporting.engine.classic.core.metadata.StyleMetaData metaData, int row)
-
getClassForCell
public Class getClassForCell(int rowIndex, int columnIndex)
- Specified by:
getClassForCell
in interfaceorg.pentaho.reporting.libraries.designtime.swing.table.PropertyTableModel
-
getEditorForCell
public PropertyEditor getEditorForCell(int rowIndex, int columnIndex)
- Specified by:
getEditorForCell
in interfaceorg.pentaho.reporting.libraries.designtime.swing.table.PropertyTableModel
-
computeEditor
protected PropertyEditor computeEditor(org.pentaho.reporting.engine.classic.core.metadata.StyleMetaData metaData, int row)
-
getDefaultEditor
protected PropertyEditor getDefaultEditor(Class type)
-
getValueRole
public String getValueRole(int row, int column)
- Specified by:
getValueRole
in interfaceElementMetaDataTableModel
-
getExtraFields
public String[] getExtraFields(int row, int column)
- Specified by:
getExtraFields
in interfaceElementMetaDataTableModel
-
getGroupHeader
public GroupingHeader getGroupHeader(int index)
- Specified by:
getGroupHeader
in interfaceGroupingModel
-
isHeaderRow
public boolean isHeaderRow(int index)
- Specified by:
isHeaderRow
in interfaceGroupingModel
-
-