Package com.cosylab.vdct.inspector.sheet
Class SpreadsheetColumnViewModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- com.cosylab.vdct.inspector.sheet.SpreadsheetTableModel
-
- com.cosylab.vdct.inspector.sheet.SpreadsheetViewModel
-
- com.cosylab.vdct.inspector.sheet.SpreadsheetSplitViewModel
-
- com.cosylab.vdct.inspector.sheet.SpreadsheetColumnViewModel
-
- All Implemented Interfaces:
PropertyTableModel
,Serializable
,TableColumnModel
,TableModel
public class SpreadsheetColumnViewModel extends SpreadsheetSplitViewModel implements TableColumnModel
This table model manages the column model and persistence of column widths and background color.- Author:
- ssah
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.cosylab.vdct.inspector.sheet.SpreadsheetViewModel
sortedColumn, sortedOrderAsc
-
Fields inherited from class com.cosylab.vdct.inspector.sheet.SpreadsheetTableModel
dataType, dsId, propertiesCommentsColumn, propertiesNamesColumn, 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 SpreadsheetColumnViewModel(Object dsId, String dataType, Vector displayData, Vector loadedData)
-
Method Summary
-
Methods inherited from class com.cosylab.vdct.inspector.sheet.SpreadsheetSplitViewModel
baseToSplitColumn, extendCounters, getColumnClass, getColumnHeaderValue, getColumnId, getHeaderDisplayType, getModelToPropertiesColumnIndex, getModelValue, getMultilineString, getNamesColumn, getPropertyAt, getPropertyColumn, getPropertyDisplayTypeAt, getRecentSplitData, getRecentSplitDataMaxCount, getSplitParts, getValueAt, internalSetValueAt, isCellEditable, isSolidColumn, isSplit, splitColumnByRecentList, splitToBaseColumn, storeSplitData, storeViewData, validateDraggedColumnIndex
-
Methods inherited from class com.cosylab.vdct.inspector.sheet.SpreadsheetViewModel
baseToVisibleColumn, baseToVisibleRow, deleteRows, getPropertyRow, getRowCount, isDefaultColumnVisibility, isGroupColumnsByGuiGroup, isPropertiesColumnVisible, isRowVisible, isShowAllRows, isSolidBaseColumn, setColumnOrder, setRowOrder, sortColumns, sortRows, visibleToBaseColumn, visibleToBaseRow
-
Methods inherited from class com.cosylab.vdct.inspector.sheet.SpreadsheetTableModel
getColumnOrderIndex, getColumnOrderNames, getLastInspectable, getLoadedInspectablesNames, getProperties, getPropertiesColumnCount, getPropertiesColumnIndex, getPropertiesColumnNames, getPropertiesRowCount, getPropertiesRowIndex, getPropertiesRowNames, getProperty, getPropertyValue, getViewRecord, internalSetValueAtAndUpdate, refresh, setColumnOrderIndex, setValueAt
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnName, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Constructor Detail
-
SpreadsheetColumnViewModel
public SpreadsheetColumnViewModel(Object dsId, String dataType, Vector displayData, Vector loadedData) throws IllegalArgumentException
- Parameters:
dsId
- dsIddataType
- dataTypedisplayData
- displayDataloadedData
- loadedData- Throws:
IllegalArgumentException
- foo
-
-
Method Detail
-
setRenderer
public void setRenderer(TableCellRenderer renderer)
- Parameters:
renderer
- the renderer to set
-
onColumnWidthChange
public void onColumnWidthChange()
-
recallView
public void recallView()
- Overrides:
recallView
in classSpreadsheetSplitViewModel
-
storeView
public void storeView()
- Overrides:
storeView
in classSpreadsheetSplitViewModel
-
refreshAll
protected void refreshAll()
- Overrides:
refreshAll
in classSpreadsheetSplitViewModel
-
repositionColumn
public void repositionColumn(int startIndex, int destIndex)
- Overrides:
repositionColumn
in classSpreadsheetSplitViewModel
- Parameters:
startIndex
- startIndexdestIndex
- destIndex
-
setColumnOrder
public void setColumnOrder(String modeName)
- Overrides:
setColumnOrder
in classSpreadsheetSplitViewModel
- Parameters:
modeName
- modeName
-
setColumnsVisibility
public void setColumnsVisibility(int[] columns, boolean visible)
- Overrides:
setColumnsVisibility
in classSpreadsheetSplitViewModel
- Parameters:
columns
- columnsvisible
- visible
-
setPropertyColumnsVisibility
public void setPropertyColumnsVisibility(int[] columns, boolean visible)
- Overrides:
setPropertyColumnsVisibility
in classSpreadsheetSplitViewModel
- Parameters:
columns
- columnsvisible
- visible
-
setDefaultColumnVisibility
public void setDefaultColumnVisibility()
- Overrides:
setDefaultColumnVisibility
in classSpreadsheetSplitViewModel
-
setRowsVisibility
public void setRowsVisibility(int[] rows, boolean visible)
- Overrides:
setRowsVisibility
in classSpreadsheetSplitViewModel
- Parameters:
rows
- rowsvisible
- visible
-
setShowAllRows
public void setShowAllRows(boolean showAllRows)
- Overrides:
setShowAllRows
in classSpreadsheetSplitViewModel
- Parameters:
showAllRows
- showAllRows
-
setGroupColumnsByGuiGroup
public void setGroupColumnsByGuiGroup(boolean groupColumnsByGuiGroup)
- Overrides:
setGroupColumnsByGuiGroup
in classSpreadsheetSplitViewModel
- Parameters:
groupColumnsByGuiGroup
- groupColumnsByGuiGroup
-
sortRowsByColumn
public void sortRowsByColumn(int column)
- Overrides:
sortRowsByColumn
in classSpreadsheetSplitViewModel
- Parameters:
column
- column
-
splitColumn
public void splitColumn(DBSheetSplitCol splitData, int column)
- Overrides:
splitColumn
in classSpreadsheetSplitViewModel
- Parameters:
splitData
- splitDatacolumn
- column
-
getBackground
public Color getBackground()
- Returns:
- something
-
setBackground
public void setBackground(Color background)
- Parameters:
background
- background
-
getDefaultBackground
public Color getDefaultBackground()
- Returns:
- something
-
setDefaultBackground
public void setDefaultBackground(Color defaultBackground)
- Parameters:
defaultBackground
- defaultBackground
-
isColumsDefault
protected boolean isColumsDefault()
- Overrides:
isColumsDefault
in classSpreadsheetViewModel
- Returns:
- something
-
addColumn
public void addColumn(TableColumn column)
- Specified by:
addColumn
in interfaceTableColumnModel
-
addColumnModelListener
public void addColumnModelListener(TableColumnModelListener x)
- Specified by:
addColumnModelListener
in interfaceTableColumnModel
-
getColumn
public TableColumn getColumn(int columnIndex)
- Specified by:
getColumn
in interfaceTableColumnModel
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfaceTableColumnModel
- Specified by:
getColumnCount
in interfaceTableModel
- Overrides:
getColumnCount
in classSpreadsheetSplitViewModel
-
getColumnIndex
public int getColumnIndex(Object columnIdentifier)
- Specified by:
getColumnIndex
in interfaceTableColumnModel
-
getColumnIndexAtX
public int getColumnIndexAtX(int position)
- Specified by:
getColumnIndexAtX
in interfaceTableColumnModel
-
getColumnMargin
public int getColumnMargin()
- Specified by:
getColumnMargin
in interfaceTableColumnModel
-
getColumns
public Enumeration getColumns()
- Specified by:
getColumns
in interfaceTableColumnModel
-
getColumnSelectionAllowed
public boolean getColumnSelectionAllowed()
- Specified by:
getColumnSelectionAllowed
in interfaceTableColumnModel
-
getSelectedColumnCount
public int getSelectedColumnCount()
- Specified by:
getSelectedColumnCount
in interfaceTableColumnModel
-
getSelectedColumns
public int[] getSelectedColumns()
- Specified by:
getSelectedColumns
in interfaceTableColumnModel
-
getSelectionModel
public ListSelectionModel getSelectionModel()
- Specified by:
getSelectionModel
in interfaceTableColumnModel
-
getTotalColumnWidth
public int getTotalColumnWidth()
- Specified by:
getTotalColumnWidth
in interfaceTableColumnModel
-
moveColumn
public void moveColumn(int columnIndex, int newIndex)
- Specified by:
moveColumn
in interfaceTableColumnModel
-
removeColumn
public void removeColumn(TableColumn column)
- Specified by:
removeColumn
in interfaceTableColumnModel
-
removeColumnModelListener
public void removeColumnModelListener(TableColumnModelListener x)
- Specified by:
removeColumnModelListener
in interfaceTableColumnModel
-
setColumnMargin
public void setColumnMargin(int newMargin)
- Specified by:
setColumnMargin
in interfaceTableColumnModel
-
setColumnSelectionAllowed
public void setColumnSelectionAllowed(boolean flag)
- Specified by:
setColumnSelectionAllowed
in interfaceTableColumnModel
-
setSelectionModel
public void setSelectionModel(ListSelectionModel newModel)
- Specified by:
setSelectionModel
in interfaceTableColumnModel
-
-