Package com.cosylab.vdct.inspector.sheet
Class SpreadsheetSplitViewModel
- 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
-
- All Implemented Interfaces:
PropertyTableModel
,Serializable
,TableModel
- Direct Known Subclasses:
SpreadsheetColumnViewModel
public class SpreadsheetSplitViewModel extends SpreadsheetViewModel
This table model supports splitting of columns.- 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 SpreadsheetSplitViewModel(Object dsId, String dataType, Vector displayData, Vector loadedData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
baseToSplitColumn(int column)
void
extendCounters(int[] rows, int[] columns)
Class
getColumnClass(int column)
int
getColumnCount()
protected String
getColumnHeaderValue(int column)
protected String
getColumnId(int column)
int
getHeaderDisplayType(int column)
Returns the header display type HEADERDISP_* at the given position.int
getModelToPropertiesColumnIndex(int column)
String
getModelValue(int row, int column)
String
getMultilineString(int row, int column)
protected int
getNamesColumn()
InspectableProperty
getPropertyAt(int row, int column)
int
getPropertyColumn(int column)
int
getPropertyDisplayTypeAt(int row, int column)
Returns the cell display type DISP_* at the given position.Vector
getRecentSplitData()
int
getRecentSplitDataMaxCount()
int
getSplitParts(int baseColumn)
Object
getValueAt(int rowIndex, int columnIndex)
protected boolean
internalSetValueAt(Object value, int row, int column)
boolean
isCellEditable(int rowIndex, int columnIndex)
boolean
isSolidColumn(int column)
boolean
isSplit(int column)
void
recallView()
protected void
refreshAll()
void
repositionColumn(int startIndex, int destIndex)
void
setColumnOrder(String modeName)
void
setColumnsVisibility(int[] columns, boolean visible)
void
setDefaultColumnVisibility()
void
setGroupColumnsByGuiGroup(boolean groupColumnsByGuiGroup)
void
setPropertyColumnsVisibility(int[] columns, boolean visible)
void
setRowsVisibility(int[] rows, boolean visible)
void
setShowAllRows(boolean showAllRows)
void
sortRowsByColumn(int column)
void
splitColumn(DBSheetSplitCol splitData, int column)
void
splitColumnByRecentList(int recentIndex, int column)
protected int
splitToBaseColumn(int column)
protected void
storeSplitData()
void
storeView()
protected void
storeViewData()
int
validateDraggedColumnIndex(int columnIndex)
-
Methods inherited from class com.cosylab.vdct.inspector.sheet.SpreadsheetViewModel
baseToVisibleColumn, baseToVisibleRow, deleteRows, getPropertyRow, getRowCount, isColumsDefault, 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
-
SpreadsheetSplitViewModel
public SpreadsheetSplitViewModel(Object dsId, String dataType, Vector displayData, Vector loadedData) throws IllegalArgumentException
- Parameters:
dsId
- dsIddataType
- dataTypedisplayData
- displayDataloadedData
- loadedData- Throws:
IllegalArgumentException
- foo
-
-
Method Detail
-
recallView
public void recallView()
- Overrides:
recallView
in classSpreadsheetViewModel
-
storeView
public void storeView()
- Overrides:
storeView
in classSpreadsheetViewModel
-
setShowAllRows
public void setShowAllRows(boolean showAllRows)
- Overrides:
setShowAllRows
in classSpreadsheetViewModel
- Parameters:
showAllRows
- showAllRows
-
setGroupColumnsByGuiGroup
public void setGroupColumnsByGuiGroup(boolean groupColumnsByGuiGroup)
- Overrides:
setGroupColumnsByGuiGroup
in classSpreadsheetViewModel
- Parameters:
groupColumnsByGuiGroup
- groupColumnsByGuiGroup
-
setRowsVisibility
public void setRowsVisibility(int[] rows, boolean visible)
- Overrides:
setRowsVisibility
in classSpreadsheetViewModel
- Parameters:
rows
- rowsvisible
- visible
-
setColumnsVisibility
public void setColumnsVisibility(int[] columns, boolean visible)
- Overrides:
setColumnsVisibility
in classSpreadsheetViewModel
- Parameters:
columns
- columnsvisible
- visible
-
setPropertyColumnsVisibility
public void setPropertyColumnsVisibility(int[] columns, boolean visible)
- Overrides:
setPropertyColumnsVisibility
in classSpreadsheetViewModel
- Parameters:
columns
- columnsvisible
- visible
-
setDefaultColumnVisibility
public void setDefaultColumnVisibility()
- Overrides:
setDefaultColumnVisibility
in classSpreadsheetViewModel
-
repositionColumn
public void repositionColumn(int startIndex, int destIndex)
- Overrides:
repositionColumn
in classSpreadsheetViewModel
- Parameters:
startIndex
- startIndexdestIndex
- destIndex
-
sortRowsByColumn
public void sortRowsByColumn(int column)
- Overrides:
sortRowsByColumn
in classSpreadsheetViewModel
- Parameters:
column
- column
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfaceTableModel
- Overrides:
getColumnCount
in classSpreadsheetViewModel
-
getColumnClass
public Class getColumnClass(int column)
- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classSpreadsheetViewModel
-
getColumnId
protected String getColumnId(int column)
- Overrides:
getColumnId
in classSpreadsheetViewModel
- Parameters:
column
- column- Returns:
- something
-
getNamesColumn
protected int getNamesColumn()
- Overrides:
getNamesColumn
in classSpreadsheetViewModel
- 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
- Overrides:
getPropertyDisplayTypeAt
in classSpreadsheetViewModel
- Parameters:
row
- rowcolumn
- column- Returns:
- something
-
getMultilineString
public String getMultilineString(int row, int column)
- Overrides:
getMultilineString
in classSpreadsheetViewModel
- Parameters:
row
- rowcolumn
- column- Returns:
- something
-
isSolidColumn
public boolean isSolidColumn(int column)
- Overrides:
isSolidColumn
in classSpreadsheetViewModel
- Parameters:
column
- column- Returns:
- something
-
isSplit
public boolean isSplit(int column)
- Parameters:
column
- column- Returns:
- something
-
getSplitParts
public int getSplitParts(int baseColumn)
- Parameters:
baseColumn
- baseColumn- Returns:
- something
-
getPropertyColumn
public int getPropertyColumn(int column)
- Overrides:
getPropertyColumn
in classSpreadsheetViewModel
- Parameters:
column
- column- Returns:
- something
-
getModelToPropertiesColumnIndex
public int getModelToPropertiesColumnIndex(int column)
- Parameters:
column
- column- Returns:
- something
-
getRecentSplitData
public Vector getRecentSplitData()
- Returns:
- something
-
getModelValue
public String getModelValue(int row, int column)
- Parameters:
row
- rowcolumn
- column- Returns:
- something
-
getRecentSplitDataMaxCount
public int getRecentSplitDataMaxCount()
- Returns:
- something
-
splitColumn
public void splitColumn(DBSheetSplitCol splitData, int column)
- Parameters:
splitData
- splitDatacolumn
- column
-
splitColumnByRecentList
public void splitColumnByRecentList(int recentIndex, int column)
- Parameters:
recentIndex
- recentIndexcolumn
- column
-
setColumnOrder
public void setColumnOrder(String modeName)
- Overrides:
setColumnOrder
in classSpreadsheetViewModel
- Parameters:
modeName
- modeName
-
validateDraggedColumnIndex
public int validateDraggedColumnIndex(int columnIndex)
- Parameters:
columnIndex
- columnIndex- Returns:
- something
-
getValueAt
public Object getValueAt(int rowIndex, int columnIndex)
- Specified by:
getValueAt
in interfaceTableModel
- Overrides:
getValueAt
in classSpreadsheetViewModel
-
internalSetValueAt
protected boolean internalSetValueAt(Object value, int row, int column)
- Overrides:
internalSetValueAt
in classSpreadsheetViewModel
- Parameters:
value
- valuerow
- rowcolumn
- column- Returns:
- something
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex)
- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
-
getPropertyAt
public InspectableProperty getPropertyAt(int row, int column)
- Specified by:
getPropertyAt
in interfacePropertyTableModel
- Overrides:
getPropertyAt
in classSpreadsheetViewModel
- Parameters:
row
- 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
- Overrides:
getHeaderDisplayType
in classSpreadsheetViewModel
- Parameters:
column
- column- Returns:
- something
-
extendCounters
public void extendCounters(int[] rows, int[] columns)
- Parameters:
rows
- rowscolumns
- columns
-
refreshAll
protected void refreshAll()
- Overrides:
refreshAll
in classSpreadsheetViewModel
-
getColumnHeaderValue
protected String getColumnHeaderValue(int column)
- Parameters:
column
- column- Returns:
- something
-
splitToBaseColumn
protected final int splitToBaseColumn(int column)
- Parameters:
column
- column- Returns:
- something
-
baseToSplitColumn
protected final int baseToSplitColumn(int column)
- Parameters:
column
- column- Returns:
- something
-
storeSplitData
protected void storeSplitData()
-
storeViewData
protected void storeViewData()
-
-