Package com.cosylab.vdct.inspector.sheet
Class SpreadsheetTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- com.cosylab.vdct.inspector.sheet.SpreadsheetTableModel
-
- All Implemented Interfaces:
PropertyTableModel
,Serializable
,TableModel
- Direct Known Subclasses:
SpreadsheetViewModel
public class SpreadsheetTableModel extends AbstractTableModel implements PropertyTableModel
This table model supports ordering the inspectable properties into columns based on their name.- Author:
- ssah
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
dataType
protected Object
dsId
protected static String
propertiesCommentsColumn
protected static String
propertiesNamesColumn
protected String
typeSign
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Fields inherited from interface com.cosylab.vdct.inspector.PropertyTableModel
DISP_NAME, DISP_NONE, DISP_VALUE, DISP_VISIBILITY, HEADERDISP_EYE, HEADERDISP_NONE, HEADERDISP_TEXT
-
-
Constructor Summary
Constructors Constructor Description SpreadsheetTableModel(Object dsId, String dataType, Vector displayData, Vector loadedData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteRows(int[] rows)
Class
getColumnClass(int column)
int
getColumnCount()
protected String
getColumnId(int column)
protected int
getColumnOrderIndex(String name)
protected ArrayList
getColumnOrderNames()
int
getHeaderDisplayType(int column)
Returns the header display type HEADERDISP_* at the given position.Inspectable
getLastInspectable()
protected Set
getLoadedInspectablesNames()
String
getMultilineString(int row, int column)
protected int
getNamesColumn()
protected InspectableProperty[][]
getProperties()
int
getPropertiesColumnCount()
int
getPropertiesColumnIndex(String name)
String
getPropertiesColumnNames(int column)
int
getPropertiesRowCount()
protected int
getPropertiesRowIndex(String name)
protected String
getPropertiesRowNames(int row)
InspectableProperty
getProperty(int row, int column)
InspectableProperty
getPropertyAt(int row, int column)
int
getPropertyDisplayTypeAt(int row, int column)
Returns the cell display type DISP_* at the given position.String
getPropertyValue(int row, int column)
int
getRowCount()
Object
getValueAt(int rowIndex, int columnIndex)
protected DBSheetView
getViewRecord()
protected boolean
internalSetValueAt(Object aValue, int row, int column)
protected void
internalSetValueAtAndUpdate(Object aValue, int row, int column)
void
recallView()
void
refresh()
protected void
refreshAll()
void
setColumnOrder(String modeName)
protected void
setColumnOrderIndex(int columnOrder)
void
setValueAt(Object aValue, int row, int column)
void
storeView()
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener
-
-
-
-
Field Detail
-
dsId
protected Object dsId
-
dataType
protected String dataType
-
typeSign
protected String typeSign
-
propertiesNamesColumn
protected static final String propertiesNamesColumn
- See Also:
- Constant Field Values
-
propertiesCommentsColumn
protected static final String propertiesCommentsColumn
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SpreadsheetTableModel
public SpreadsheetTableModel(Object dsId, String dataType, Vector displayData, Vector loadedData) throws IllegalArgumentException
- Parameters:
dsId
- dsIddataType
- dataTypedisplayData
- displayDataloadedData
- loadedData- Throws:
IllegalArgumentException
- foo
-
-
Method Detail
-
refresh
public void refresh()
-
recallView
public void recallView()
-
storeView
public void storeView()
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfaceTableModel
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfaceTableModel
-
getValueAt
public Object getValueAt(int rowIndex, int columnIndex)
- Specified by:
getValueAt
in interfaceTableModel
-
getPropertyAt
public InspectableProperty getPropertyAt(int row, int column)
- Specified by:
getPropertyAt
in interfacePropertyTableModel
- Parameters:
row
- rowcolumn
- column- Returns:
- something
-
setValueAt
public void setValueAt(Object aValue, int row, int column)
- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classAbstractTableModel
-
internalSetValueAtAndUpdate
protected void internalSetValueAtAndUpdate(Object aValue, int row, int column)
- Parameters:
aValue
- aValuerow
- rowcolumn
- column
-
internalSetValueAt
protected boolean internalSetValueAt(Object aValue, int row, int column)
- Parameters:
aValue
- aValuerow
- rowcolumn
- column- Returns:
- something
-
getHeaderDisplayType
public int getHeaderDisplayType(int column)
Description copied from interface:PropertyTableModel
Returns the header display type HEADERDISP_* at the given position.- Specified by:
getHeaderDisplayType
in interfacePropertyTableModel
- Parameters:
column
- column- Returns:
- something
-
getPropertyDisplayTypeAt
public int getPropertyDisplayTypeAt(int row, int column)
Description copied from interface:PropertyTableModel
Returns the cell display type DISP_* at the given position.- Specified by:
getPropertyDisplayTypeAt
in interfacePropertyTableModel
- Parameters:
row
- rowcolumn
- column- Returns:
- something
-
getColumnId
protected String getColumnId(int column)
- Parameters:
column
- column- Returns:
- something
-
deleteRows
public void deleteRows(int[] rows)
- Parameters:
rows
- rows
-
getMultilineString
public String getMultilineString(int row, int column)
- Parameters:
row
- rowcolumn
- column- Returns:
- something
-
refreshAll
protected void refreshAll()
-
getNamesColumn
protected int getNamesColumn()
- Returns:
- something
-
getLoadedInspectablesNames
protected Set getLoadedInspectablesNames()
- Returns:
- something
-
getColumnOrderIndex
protected int getColumnOrderIndex(String name)
- Parameters:
name
- name- Returns:
- something
-
setColumnOrderIndex
protected void setColumnOrderIndex(int columnOrder)
- Parameters:
columnOrder
- columnOrder
-
getLastInspectable
public Inspectable getLastInspectable()
- Returns:
- something
-
getProperty
public final InspectableProperty getProperty(int row, int column)
- Parameters:
row
- rowcolumn
- column- Returns:
- something
-
getPropertyValue
public final String getPropertyValue(int row, int column)
- Parameters:
row
- rowcolumn
- column- Returns:
- something
-
getPropertiesRowCount
public final int getPropertiesRowCount()
- Returns:
- something
-
getPropertiesColumnCount
public final int getPropertiesColumnCount()
- Returns:
- something
-
getPropertiesColumnNames
public String getPropertiesColumnNames(int column)
- Parameters:
column
- column- Returns:
- something
-
getPropertiesColumnIndex
public int getPropertiesColumnIndex(String name)
- Parameters:
name
- name- Returns:
- something
-
getPropertiesRowNames
protected String getPropertiesRowNames(int row)
- Parameters:
row
- row- Returns:
- something
-
getPropertiesRowIndex
protected int getPropertiesRowIndex(String name)
- Parameters:
name
- name- Returns:
- something
-
getColumnClass
public Class getColumnClass(int column)
- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
-
setColumnOrder
public void setColumnOrder(String modeName)
- Parameters:
modeName
- modeName
-
getColumnOrderNames
protected ArrayList getColumnOrderNames()
- Returns:
- something
-
getProperties
protected final InspectableProperty[][] getProperties()
- Returns:
- something
-
getViewRecord
protected DBSheetView getViewRecord()
- Returns:
- something
-
-