|
Ontimize 5.2072EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
com.ontimize.gui.table.TableMap
com.ontimize.gui.table.TableSorter
A sorter for TableModels. The sorter has a model (conforming to TableModel) and itself implements TableModel. TableSorter does not store or copy the data in the TableModel, instead it maintains an array of integers which it keeps the same size as the number of rows in its model. When the model changes it notifies the sorter that something has changed e.g. "rowsAdded" so that its internal array of integers can be reallocated. As requests are made of the sorter (like getValueAt(row, col) it redirects them to its model via the mapping array. That way the TableSorter appears to hold another copy of the table with the rows in a different order. The sorting algorithm used is stable which means that it does not move around rows when its comparison function returns 0 to denote that they are equivalent. The sorter presents as well filtering and grouping features. That means that the TableSorter has a GroupTableModel inside that provides the grouping functionality and the GroupTableModel itself has a FilterTableModel inside. The table row indexes corresponds to the indexes in the TableSorter. Because if the sorting and grouping behaviors, the row indexes in the view might not be equal to the indexes in the table model, that is, the more internal model of those.
| Nested Class Summary | |
static class |
TableSorter.ColumnSizeEvent
Class that contains the event information corresponding to the change of the size of a column. |
static interface |
TableSorter.ColumnSizeListener
Interface used to notify the TableSorter that a column size change event. |
static class |
TableSorter.DateFilter
Class that represents a filter to a table column. |
protected static class |
TableSorter.DayMonthYear
Class that contains date information with day, month and year, to allow fast comparisons when sorting. |
static class |
TableSorter.DefaultFilterValidator
The default implementation of the FilterValidator interface. |
static class |
TableSorter.DifferentFilter
Class that represents a filter to a table column. |
static class |
TableSorter.DifferentSimpleFilter
Class that represents a simple filter for a table column. |
static class |
TableSorter.Filter
Class that represents a filter to a table column. |
class |
TableSorter.FilterTableModel
|
static interface |
TableSorter.FilterValidator
Interface that must be implemented by the objects that can be used as table filters |
class |
TableSorter.GroupTableModel
|
protected static class |
TableSorter.IconN
|
protected static class |
TableSorter.Month
Class that contains date information, concretely dates, to allow fast comparisons when sorting. |
protected static class |
TableSorter.MonthYear
Class that contains date information with month and year, to allow fast comparisons when sorting. |
static class |
TableSorter.MultipleFilter
Class that represents a filter to a table column. |
protected static class |
TableSorter.Quarter
Class that contains date information, concretely quarters, to allow fast comparisons when sorting. |
protected static class |
TableSorter.QuarterYear
Class that contains date information, concretely quarters and years, to allow fast comparisons when sorting. |
static class |
TableSorter.SimpleFilter
Class that represents a simple filter for a table column. |
protected static class |
TableSorter.ValueByGroup
Class that stores the cell values when these are obtained by groping several rows into one. |
protected static class |
TableSorter.ValueByGroupDate
Class that stores the cell values when these are obtained by groping several rows into one. |
protected static class |
TableSorter.Year
Class that contains date information, concretely months, to allow fast comparisons when sorting. |
| Field Summary | |
protected boolean |
allowTotalInserting
|
protected java.util.Vector |
ascendants
|
protected java.lang.Object |
auxHeadValue
|
static int |
AVG
Grouping operation type |
java.util.ResourceBundle |
bundle
|
static java.text.Collator |
comparator
|
protected int |
compares
|
static int |
COUNT
Grouping operation type |
static boolean |
DEBUG
|
protected FilterDialog |
filterDialog
|
protected boolean |
filterEnabled
|
static java.lang.String |
filterKey
Filtering preference key |
protected boolean |
fitHeadSize
|
static java.lang.String |
groupKey
Deprecated. |
protected int[] |
indexes
|
protected java.util.Vector |
insertableCols
|
protected boolean |
insertingEnabled
|
protected java.util.Hashtable |
insertingRowData
|
protected boolean |
lastIsSum
|
protected boolean |
localSorter
|
static int |
MAX
Grouping operation type |
static int |
MIN
Grouping operation type |
static int |
MONTH
A grouping type configuration parameter |
static boolean |
MULTIORDER_PERMIT
Allows or denies sorting the table by several columns |
protected java.util.Hashtable |
operationColumns
|
protected boolean |
orderEnabled
|
static int |
QUARTER
A grouping type configuration parameter |
static int |
QUARTER_YEAR
A grouping type configuration parameter |
protected int |
rowsNumber
|
protected int |
rowsNumberToOrder
|
protected TableSorter.ColumnSizeListener |
sizeColumnListener
|
protected java.util.Vector |
sortingColumns
|
protected javax.swing.JTable |
sourceTable
|
static int |
SUM
Grouping operation type |
protected java.util.Vector |
sumColumns
|
static int |
YEAR
A grouping type configuration parameter |
static int |
YEAR_MONTH
A grouping type configuration parameter |
static int |
YEAR_MONTH_DAY
A grouping type configuration parameter |
| Fields inherited from class com.ontimize.gui.table.TableMap |
model |
| Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
| Fields inherited from interface com.ontimize.gui.i18n.Internationalization |
DEBUG_LANGUAGE |
| Constructor Summary | |
TableSorter(ExtendedTableModel model)
Constructor. |
|
TableSorter(ExtendedTableModel model,
java.util.Vector sumColumns)
Constructor. |
|
TableSorter(ExtendedTableModel model,
java.util.Vector sumColumns,
java.util.Hashtable params)
|
|
| Method Summary | |
void |
addCalculatedColumn(java.lang.String columnName,
java.lang.String expression)
|
void |
addColumn(java.lang.String columnName)
Adds a new column to the model. |
void |
addRow(java.util.Hashtable rowData)
Adds a new row to the model. |
void |
addRow(int viewRowIndex,
java.util.Hashtable rowData)
Adds a new row in the position specified. |
void |
addRows(int[] viewRowIndex,
java.util.Vector rowData)
Deprecated. |
void |
addRows(java.util.Vector rowData)
The Vector contains Hashtables, each one stores the information of the column, this is, the keys are the column names and the values the values for each column. |
void |
applyFilter(java.util.Hashtable filters)
Applies a group of filters to the table. |
void |
applyFilter(java.util.Hashtable filters,
boolean or)
Applies a group of filters to the table. |
void |
applyFilter(int columnIndex,
java.lang.Object filter)
Applies a filter to a column. |
boolean |
checkModel()
Checks the model to ensure that all the changes in the model have been processed. |
void |
clearInsertingRow(java.util.Hashtable parentkeys)
|
int |
compare(int rowIndex1,
int rowIndex2)
Compares two rows column by column, following the sorting of the columns. |
int |
compareRowsByColumn(int rowIndex1,
int rowIndex2,
int columnIndex)
Compares to row values of the same column. |
int |
convertRowIndexToFilteredModel(int viewRowIndex)
Converts the view index to the corresponding index in the filtered model. |
int |
convertRowIndexToModel(int viewRowIndex)
Converts the view index into the corresponding model index. |
void |
deleteCalculatedColumn(java.lang.String columnName)
|
void |
deleteColumn(java.lang.String columnName)
Deletes a column from the model. |
void |
deleteRow(int rowIndex)
Deletes the specified row. |
void |
deleteRows(int[] rowIndex)
Deletes the specified rows from the model |
void |
enableFiltering(boolean enable)
Enables or disables that filteringcan be applied to the table. |
void |
enableSort(boolean enable)
Enables or disables sorting in the table |
void |
fireSizeColumnToFit(int columnIndex)
Fires a TableSorter.ColumnSizeEvent to be processed by the
TableSorter.ColumnSizeListener configured in the model. |
void |
fireTableChanged(javax.swing.event.TableModelEvent e)
Method fired to update the table after a sorting. |
void |
free()
Removes the table header listener and the model. |
boolean[] |
getAscendent()
Returns the indexes of all the columns that has an ascending sorting in the table, following the sorting order. |
java.lang.String |
getCalculatedColumnExpression(java.lang.String columnName)
Returns the column expression for the specified column name. |
java.util.Hashtable |
getCalculatedColumns()
Returns the columns that have a calculated expression and the expression. |
protected java.util.Hashtable |
getCalculatedColumnsDependence(java.lang.String columnName)
Get the columns that exist in the expression to calculate the specified column |
java.util.Vector |
getCalculatedColumnsName()
Returns the names of the columns that have a calculated expression set. |
java.util.Hashtable |
getCalculatedRowData(int rowIndex)
Returns a Hashtable with the information of the calculated columns for this row. |
java.lang.Object |
getCalculatedValue(int column,
java.util.Hashtable rowValues)
|
java.lang.Object |
getColumnFilter(java.lang.String columnName)
Returns the filters applied to a column. |
java.lang.Object |
getColumnIdentifier(int modelColumnIndex)
Returns the column name that corresponds to a specified index. |
java.util.Vector |
getColumnNames()
Returns the column names. |
protected java.lang.Number |
getColumnOperation(int columnIndex)
|
protected java.lang.Object |
getColumnOperation(java.lang.String columnIdentifier,
java.lang.String operation)
|
java.util.Vector |
getColumnsText()
Returns the column texts. |
protected java.lang.Number |
getColumnSum(int modelColumnIndex,
boolean average)
Calculates the sum or the average for a column. |
protected java.lang.Number |
getColumnSum(int columnIndex,
boolean average,
int[] rowIndexes)
Calculates the sum or the average value for a column; only the values of the specified rows will be used. |
java.lang.Number |
getColumnSum(java.lang.Object columnName)
Sums all the values for a specified column. |
protected java.lang.Object |
getColumnType(java.lang.Object columnName)
Returns the operation configured for a column. |
int |
getCurrentRowCount()
Returns the index of the sumrow |
java.util.Hashtable |
getData()
Returns all the information stored in the model, including the calculated columns. |
FilterDialog |
getFilterDialog()
|
java.util.Vector |
getFilteredColumns()
Returns the columns that are being filtered. |
java.util.Hashtable |
getFilteredData()
Returns the data contained in the model but according to the filters that are being applied to that model |
java.util.Hashtable |
getFilters()
Returns the filters for the table. |
TableSorter.FilterValidator |
getFilterValidator()
Returns the filter validator configured in the model. |
int |
getFirstSortedColumn()
Returns the index of the first sorted column. |
int |
getGroupedColumnFunction(int modelColumnIndex)
Provides the function applied to the specified column |
java.util.Hashtable |
getGroupedRowData(int rowIndex)
Returns the information contained in the specified row, in case that the table is grouped. |
java.util.Hashtable |
getInsertingData()
|
protected java.lang.Number |
getMaximumMinimumColumn(int index,
boolean max)
|
java.util.Hashtable |
getOperationColumn()
Returns the current operation columns. |
java.lang.Number |
getOperationColumn(java.lang.Object columnName)
Returns the value of the operation applied to the specified column. |
int |
getRealRecordNumber()
Returns the number of records or rows that are actually stored in the model. |
java.util.Vector |
getRequiredColumnsToCalculatedColumns()
|
int |
getRowCount()
|
java.util.Hashtable |
getRowData(int rowIndex)
Returns the information contained in the specified row. |
java.util.Hashtable |
getRowDataForKeys(java.util.List keys,
java.util.Hashtable keysValues)
|
protected java.util.Hashtable |
getSelectedColumnOperation(int[] rowIndex)
For each column that has an operation configured, returns the result of perform the operation in the rows passed as parameter. |
protected java.lang.Number |
getSelectedColumnOperation(java.lang.Object columnName,
int[] rowIndex)
Returns the result of the application of the configured operation (sum, maximum, etc.) to the rows passed as parameter for the specified column. |
java.util.Hashtable |
getShownValue()
Returns the information contained in the model but the sumrows. |
java.util.Hashtable |
getShownValue(java.lang.String[] cols)
|
int[] |
getSortingColumns()
Returns the indexes of all the columns that has a sorting in the table, following the sorting order. |
javax.swing.table.TableCellRenderer |
getSumCellRenderer(boolean currency)
Provides a renderer for the rum row. |
java.util.Vector |
getTextsToTranslate()
Returns all the texts in the element suitable for being translated. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
|
void |
group(int modelColumnIndex)
Groups the model by a column. |
void |
group(int modelColumnIndex,
int type)
Groups the model by a column and using a concrete grouping approach. |
boolean |
isAscending()
Determines whether the first sorting in the table is ascending or descending. |
boolean |
isAscending(int columnIndex)
Determines whether a column sorting is ascending or not. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
boolean |
isFiltered()
Determines whether the model is filtered or not. |
boolean |
isFiltered(int columnIndex)
Determines whether the specified column us grouped or not. |
boolean |
isFilterEnabled()
|
boolean |
isGrouped()
Determines whether the table has a grouping applied or not. |
boolean |
isGrouped(int col)
Determines whether a column is grouped or not. |
boolean |
isInsertingEnabled()
|
boolean |
isInsertingRow(int row)
|
boolean |
isLocalSorter()
Checks if the sorter is local. |
boolean |
isSorted()
Determines whether the table is being sorted or not. |
boolean |
isSorted(int columnIndex)
Determines whether a column is sorted or not. |
boolean |
isSortEnabled()
Checks if the sorting is enable. |
boolean |
isSum()
Determines whether exists sum columns in the model. |
boolean |
isSumCell(int rowIndex,
int colIndex)
Determines whether a cell belongs to a sumrow or not. |
boolean |
isSumRow(int rowIndex)
Determines whether a row is a sumrow, that is, is a row that displays the result of performing operations with the columns. |
boolean |
lastFilterOr()
|
void |
n2sort()
Deprecated. |
void |
reallocateIndexes()
Sets up a new array of indexes with the right number of elements for the new data model. |
void |
resetFilter()
Removes all the filters from the table. |
void |
resetFilter(int columnIndex)
Removes the filters from the column specified by its index. |
void |
resetFilter(java.lang.String columnName)
Removes the filters from the column specified by its name. |
void |
resetGroup()
Deletes all the grouping in the table. |
void |
resetOrder()
Removes the sorting applied to the table. |
void |
resetOrder(int columnIndex)
Removes the sorting applied to the column specified by its index. |
void |
setCalculatedColumnExpression(java.lang.String columnName,
java.lang.String expression)
Sets a calculated expression to a colum. |
void |
setComponentLocale(java.util.Locale l)
|
void |
setData(java.util.Hashtable data)
Sets a new group of data to the model. |
void |
setEditableColumn(java.lang.String columnName)
Allows a column to be editable, that is, sets a editor to the column in order that the column value can be editable from the GUI. |
void |
setEditableColumn(java.lang.String columnName,
boolean editable)
Configures a column to be editable or not. |
void |
setFilterDialog(FilterDialog filterDialog)
|
void |
setFilterValidator(TableSorter.FilterValidator filterValidator)
Sets a TableSorter.FilterValidator to the model. |
void |
setFitHeadSize(boolean fit)
Configures the table to auto adjust the header size. |
void |
setGroupedColumnFunction(int modelColumnIndex,
int function)
Applies a function to a column. |
void |
setInsertEnabled(boolean enabled)
Enable or disable the inserting row |
void |
setLocalSorter(boolean localSorter)
|
void |
setModel(TableSorter.GroupTableModel model)
Sets a new GroupTableModel to this TableSorter. |
void |
setOperationColumns(java.util.Hashtable operationColumns)
Sets a new group of operation columns. |
protected void |
setPreferredHeadSize()
Deprecated. |
void |
setResourceBundle(java.util.ResourceBundle res)
Sets the language resource bundle. |
void |
setSizeColumnListener(TableSorter.ColumnSizeListener columnSizeListener)
Sets the TableSorter.ColumnSizeListener to this TableSorter. |
void |
setSourceTable(javax.swing.JTable table)
|
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
|
void |
shuttleSort(int[] from,
int[] to,
int low,
int high)
Fast algorithm to sort an array. |
void |
sort(java.lang.Object sender)
Sorts the model. |
void |
sortByColumn(int column)
Sorts the table by the columns specified as parameter. |
void |
sortByColumn(int column,
boolean ascending)
Sorts the table by the columns specified as parameter. |
protected void |
sortByColumn(int column,
boolean ascending,
boolean fireEvent)
|
void |
swap(int i,
int j)
Swaps two indexes of the table. |
void |
tableChanged(javax.swing.event.TableModelEvent e)
Processes the table change events for this model. |
void |
updateRowData(java.util.Hashtable rowData,
java.util.Hashtable keys)
|
void |
updateRowData(java.util.Hashtable rowData,
java.util.List columns,
java.util.Hashtable keys)
|
void |
updateRowData(java.util.Hashtable rowData,
java.util.Vector keys)
Updates the information of a row. |
| Methods inherited from class com.ontimize.gui.table.TableMap |
getColumnClass, getColumnCount, getColumnName, getModel, setModel |
| Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean localSorter
public static final int YEAR
public static final int YEAR_MONTH
public static final int YEAR_MONTH_DAY
public static final int QUARTER_YEAR
public static final int QUARTER
public static final int MONTH
public static final java.lang.String filterKey
public static final java.lang.String groupKey
public static boolean DEBUG
public java.util.ResourceBundle bundle
public static boolean MULTIORDER_PERMIT
public static final int SUM
public static final int AVG
public static final int MAX
public static final int MIN
public static final int COUNT
public static java.text.Collator comparator
protected int[] indexes
protected int rowsNumberToOrder
protected java.util.Vector sortingColumns
protected java.util.Vector ascendants
protected int compares
protected javax.swing.JTable sourceTable
protected boolean orderEnabled
protected boolean filterEnabled
protected java.util.Vector sumColumns
protected java.util.Hashtable operationColumns
protected boolean lastIsSum
protected int rowsNumber
protected java.lang.Object auxHeadValue
protected TableSorter.ColumnSizeListener sizeColumnListener
protected FilterDialog filterDialog
protected java.util.Hashtable insertingRowData
protected java.util.Vector insertableCols
protected boolean insertingEnabled
protected boolean allowTotalInserting
protected boolean fitHeadSize
| Constructor Detail |
public TableSorter(ExtendedTableModel model)
model - the table model
public TableSorter(ExtendedTableModel model,
java.util.Vector sumColumns)
model - sumColumns - columns to which operations can be applied
public TableSorter(ExtendedTableModel model,
java.util.Vector sumColumns,
java.util.Hashtable params)
| Method Detail |
public boolean isFilterEnabled()
public void setFilterDialog(FilterDialog filterDialog)
public FilterDialog getFilterDialog()
public void setSourceTable(javax.swing.JTable table)
public void setModel(TableSorter.GroupTableModel model)
model -
public int compareRowsByColumn(int rowIndex1,
int rowIndex2,
int columnIndex)
rowIndex1 - rowIndex2 - columnIndex -
public int compare(int rowIndex1,
int rowIndex2)
rowIndex1 - rowIndex2 -
compareRowsByColumn(int, int, int)public void reallocateIndexes()
public void tableChanged(javax.swing.event.TableModelEvent e)
tableChanged in interface javax.swing.event.TableModelListenertableChanged in class TableMappublic boolean checkModel()
public void sort(java.lang.Object sender)
sender - unusedshuttleSort(int[], int[], int, int)public void n2sort()
swap(int, int)
public void shuttleSort(int[] from,
int[] to,
int low,
int high)
from - the original arrayto - the sorted arraylow - the starting index (typically 0)high - the ending index (typically from.length)
public void swap(int i,
int j)
i - j -
public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in interface javax.swing.table.TableModelgetValueAt in class TableMapprotected java.util.Hashtable getCalculatedColumnsDependence(java.lang.String columnName)
columnName - Name of the calculated column
public void setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class TableMappublic void sortByColumn(int column)
column - the column that will be used to sort
public void sortByColumn(int column,
boolean ascending)
column - the column that will be used to sortascending - if true, the values will go from lower to higher; reverse when
true
protected void sortByColumn(int column,
boolean ascending,
boolean fireEvent)
public void free()
throws java.lang.Exception
free in interface Freeablejava.lang.Exceptionpublic void enableSort(boolean enable)
enable - public boolean isSortEnabled()
public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface javax.swing.table.TableModelisCellEditable in class TableMappublic void deleteRows(int[] rowIndex)
rowIndex - the indexes that identifies the rows to removepublic void deleteRow(int rowIndex)
rowIndex - the row index
public void applyFilter(int columnIndex,
java.lang.Object filter)
columnIndex - the index of the column to be filteredfilter - the filter to be appliedpublic boolean lastFilterOr()
public void applyFilter(java.util.Hashtable filters)
filters - the filters to apply to the table
public void applyFilter(java.util.Hashtable filters,
boolean or)
filters - the filters to apply to the tableor - true to be established OR-condition.public java.util.Vector getFilteredColumns()
public void fireTableChanged(javax.swing.event.TableModelEvent e)
public void resetFilter()
public void resetFilter(java.lang.String columnName)
columnName - the column namepublic void resetFilter(int columnIndex)
columnIndex - the column indexpublic void resetOrder()
public void resetOrder(int columnIndex)
columnIndex - the column indexpublic boolean isSorted(int columnIndex)
columnIndex -
public int getRowCount()
getRowCount in interface javax.swing.table.TableModelgetRowCount in class TableMappublic java.util.Hashtable getCalculatedColumns()
public java.util.Vector getCalculatedColumnsName()
public java.util.Vector getRequiredColumnsToCalculatedColumns()
public java.lang.Object getCalculatedValue(int column,
java.util.Hashtable rowValues)
public java.lang.String getCalculatedColumnExpression(java.lang.String columnName)
columnName - the column name
public void setCalculatedColumnExpression(java.lang.String columnName,
java.lang.String expression)
columnName - the column nameexpression - the calculated expressionpublic java.util.Hashtable getRowData(int rowIndex)
rowIndex - the row
public java.util.Hashtable getRowDataForKeys(java.util.List keys,
java.util.Hashtable keysValues)
public java.util.Hashtable getGroupedRowData(int rowIndex)
rowIndex - the row index
public java.util.Hashtable getCalculatedRowData(int rowIndex)
rowIndex -
public void enableFiltering(boolean enable)
enable -
public void updateRowData(java.util.Hashtable rowData,
java.util.Vector keys)
rowData - the row informationkeys - the columns that are keys and so identifies each row
public void updateRowData(java.util.Hashtable rowData,
java.util.Hashtable keys)
public void updateRowData(java.util.Hashtable rowData,
java.util.List columns,
java.util.Hashtable keys)
public void addRow(java.util.Hashtable rowData)
rowData - a Hashtable containing the information for the new row, when the
keys are the columns names and the values the corresponding
value for each column.
public void addRow(int viewRowIndex,
java.util.Hashtable rowData)
viewRowIndex - the position that will have the row in the viewrowData - a Hashtable containing the information for the new row, when the
keys are the columns names and the values the corresponding
value for each column.
public void addRows(int[] viewRowIndex,
java.util.Vector rowData)
viewRowIndex - unusedrowData - addRows(Vector)public void addRows(java.util.Vector rowData)
rowData - public void setResourceBundle(java.util.ResourceBundle res)
Internationalization
setResourceBundle in interface Internationalizationres - the new language bundle.public java.util.Vector getTextsToTranslate()
Internationalization
getTextsToTranslate in interface Internationalizationpublic void setComponentLocale(java.util.Locale l)
setComponentLocale in interface Internationalizationpublic boolean isFiltered(int columnIndex)
columnIndex - the index of the column to check
public int convertRowIndexToModel(int viewRowIndex)
viewRowIndex - the index of the row in the view
public int convertRowIndexToFilteredModel(int viewRowIndex)
viewRowIndex - the index of the row in the view
public void setData(java.util.Hashtable data)
data - public java.lang.Number getColumnSum(java.lang.Object columnName)
columnName -
protected java.util.Hashtable getSelectedColumnOperation(int[] rowIndex)
rowIndex - the row indexes
getSelectedColumnOperation(Object, int[])
protected java.lang.Number getSelectedColumnOperation(java.lang.Object columnName,
int[] rowIndex)
columnName - rowIndex -
public java.lang.Number getOperationColumn(java.lang.Object columnName)
columnName - the name of the column
getColumnOperation(int)protected java.lang.Object getColumnType(java.lang.Object columnName)
columnName -
protected java.lang.Object getColumnOperation(java.lang.String columnIdentifier,
java.lang.String operation)
protected java.lang.Number getColumnOperation(int columnIndex)
protected java.lang.Number getColumnSum(int modelColumnIndex,
boolean average)
modelColumnIndex - the index of the column to calculate the operationaverage - if false, the total value; otherwise, the average value
protected java.lang.Number getColumnSum(int columnIndex,
boolean average,
int[] rowIndexes)
columnIndex - the columnaverage - if true, returns the average value; otherwise, returns the sumrowIndexes - the rows that will be used in the calculus
protected java.lang.Number getMaximumMinimumColumn(int index,
boolean max)
public boolean isSum()
public boolean isSumCell(int rowIndex,
int colIndex)
rowIndex - the row indexcolIndex - the column index
public boolean isSumRow(int rowIndex)
rowIndex -
public boolean isInsertingRow(int row)
public javax.swing.table.TableCellRenderer getSumCellRenderer(boolean currency)
currency - if true, the renderer accounts for currency information; if
false, renders numbers
public void fireSizeColumnToFit(int columnIndex)
TableSorter.ColumnSizeEvent to be processed by the
TableSorter.ColumnSizeListener configured in the model.
columnIndex - the column that produces the eventpublic void setSizeColumnListener(TableSorter.ColumnSizeListener columnSizeListener)
TableSorter.ColumnSizeListener to this TableSorter.
columnSizeListener - public boolean isFiltered()
public java.util.Hashtable getShownValue()
public java.util.Hashtable getShownValue(java.lang.String[] cols)
public java.util.Hashtable getData()
public java.util.Hashtable getFilteredData()
public int getCurrentRowCount()
public int getRealRecordNumber()
public void setEditableColumn(java.lang.String columnName)
columnName - the column name to be editable
public void setEditableColumn(java.lang.String columnName,
boolean editable)
columnName - the column nameeditable - if true, the column could be edited from the GUI; if false, the
column can't be edited from the GUIpublic java.lang.Object getColumnIdentifier(int modelColumnIndex)
modelColumnIndex - the column index
public java.util.Vector getColumnsText()
public java.util.Vector getColumnNames()
public void addColumn(java.lang.String columnName)
columnName - the new column name
public void addCalculatedColumn(java.lang.String columnName,
java.lang.String expression)
public void deleteColumn(java.lang.String columnName)
columnName - public void deleteCalculatedColumn(java.lang.String columnName)
public void group(int modelColumnIndex)
modelColumnIndex -
public void group(int modelColumnIndex,
int type)
modelColumnIndex - the column used to group the tabletype - the column type
public void setGroupedColumnFunction(int modelColumnIndex,
int function)
modelColumnIndex - function - public int getGroupedColumnFunction(int modelColumnIndex)
modelColumnIndex - the column index
public void resetGroup()
public boolean isGrouped(int col)
col -
public boolean isGrouped()
public void setOperationColumns(java.util.Hashtable operationColumns)
operationColumns - the new operation columns configuration, where the keys
determines the column names and the values are the operations to
be applied to those columns.public boolean isAscending()
public boolean isAscending(int columnIndex)
columnIndex -
public void setFitHeadSize(boolean fit)
fit - protected void setPreferredHeadSize()
public java.util.Hashtable getFilters()
public java.lang.Object getColumnFilter(java.lang.String columnName)
columnName -
public boolean isSorted()
public int getFirstSortedColumn()
public int[] getSortingColumns()
public boolean[] getAscendent()
public void setFilterValidator(TableSorter.FilterValidator filterValidator)
TableSorter.FilterValidator to the model.
filterValidator - the filter validatorpublic TableSorter.FilterValidator getFilterValidator()
public java.util.Hashtable getOperationColumn()
public void setInsertEnabled(boolean enabled)
enabled - public boolean isInsertingEnabled()
public java.util.Hashtable getInsertingData()
public void clearInsertingRow(java.util.Hashtable parentkeys)
public boolean isLocalSorter()
public void setLocalSorter(boolean localSorter)
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||