|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.klg.jclass.table.BaseDataView
|
+--com.klg.jclass.table.TableDataView
The TableDataView serves an an intermediary between the
Table and the data source (TableData).
| Field Summary | |
protected com.klg.jclass.table.TableDataModel |
dataSource
|
protected boolean |
isEditable
|
| Fields inherited from class com.klg.jclass.table.BaseDataView |
editors, renderers, table |
| Constructor Summary | |
TableDataView()
Creates a TableDataView instance that initializes the editor and renderer tables but does not link it to table. |
|
TableDataView(com.klg.jclass.table.JCTable table)
Creates a TableDataView instance and initializes the editor and renderer tables |
|
| Method Summary | |
void |
addTableDataListener(com.klg.jclass.table.JCTableDataListener l)
Adds a JCTableDataListener to this object. |
void |
dataChanged(com.klg.jclass.table.JCTableDataEvent e)
Method to change the data based on the passed in event |
void |
dispose()
Ensures that TableDataView can be disposed. |
boolean |
dragColumn(int column1,
int column2)
Drags a column to a new position. |
boolean |
dragRow(int row1,
int row2)
Drags a row to a new position. |
int[] |
getColumnMap()
Returns an array of column numbers that map view to data. |
int |
getDataColumn(int column)
Returns the data column mapped to the view column. |
int |
getDataRow(int row)
Returns the data row mapped to the view row. |
com.klg.jclass.table.TableDataModel |
getDataSource()
Returns the bound data source. |
int |
getNumColumns()
Returns the number of columns of data the data source contains. |
int |
getNumRows()
Returns the number of rows of data the data source contains. |
Object |
getObject(int row,
int column)
Returns the object given a row or column. |
int[] |
getRowMap()
Returns an array of row numbers that map view to data. |
Object |
getTableColumnLabel(int column)
Returns the value for the column label at the specified column. |
Object |
getTableDataItem(int row,
int column)
Returns the value for the cell at the specified location. |
Object |
getTableRowLabel(int row)
Returns the value for the row label at the specified row. |
int |
getViewColumn(int column)
Returns the column in the view for the data column. |
int |
getViewRow(int row)
Returns the row in the view for the data row. |
boolean |
isEditable()
Returns true if the data source implements EditableTableData. |
protected int[] |
removeMapElement(int[] array,
int element)
Removes an element from the map array. |
void |
removeTableDataListener(com.klg.jclass.table.JCTableDataListener l)
Removes a JCTableDataListener from this object |
protected void |
repaintRange(int start_row,
int start_column,
int end_row,
int end_column)
Issues a range repaint. |
void |
resetColumnMap()
Reset the mapped columns array to a one-to-one mapping. |
void |
resetRowMap()
Reset the mapped rows array to a one-to-one mapping. |
protected void |
resizeColumnMap()
Initializes the mapped columns array any time it is accessed and the number of columns in the datasource does not match the number of columns in the map array. |
protected void |
resizeRowMap()
Initializes the mapped rows array any time it is accessed and the number of rows in the datasource does not match the number of rows in the map array. |
boolean |
setColumnMap(int[] new_map)
Sets a new column map array. |
void |
setDataSource(com.klg.jclass.table.TableDataModel tableData)
Sets the bound data source. |
boolean |
setRowMap(int[] new_map)
Sets a new row map array. |
boolean |
setTableDataItem(Object o,
int row,
int column)
Sets the cell value for editable data sources. |
protected int[] |
shiftMappedArray(int[] array,
int item1,
int item2)
Repositions a row or column to a new location in the mapped array. |
boolean |
swapColumns(int column1,
int column2)
Swaps two columns. |
boolean |
swapRows(int row1,
int row2)
Swaps two rows. |
| Methods inherited from class com.klg.jclass.table.BaseDataView |
getCellEditor, getCellEditor, getCellEditor, getCellRenderer, getCellRenderer, getCellRenderer, getCellRenderer, getEditorsTable, getRenderersTable, getTable, loadFieldEditors, loadFieldRenderers, setEditorsTable, setRenderersTable, setTable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.klg.jclass.table.DataViewModel |
getCellEditor, getCellEditor, getCellRenderer, getCellRenderer, getCellRenderer, getEditorsTable, getRenderersTable, getTable, setEditorsTable, setRenderersTable, setTable |
| Field Detail |
protected com.klg.jclass.table.TableDataModel dataSource
protected boolean isEditable
| Constructor Detail |
public TableDataView()
public TableDataView(com.klg.jclass.table.JCTable table)
table - The table controlled by this DataView.| Method Detail |
public void dataChanged(com.klg.jclass.table.JCTableDataEvent e)
dataChanged in interface JCTableDataListenerdataChanged in class BaseDataViewe - The event used to change the datapublic com.klg.jclass.table.TableDataModel getDataSource()
getDataSource in interface DataViewModelgetDataSource in class BaseDataViewpublic void setDataSource(com.klg.jclass.table.TableDataModel tableData)
setDataSource in interface DataViewModelsetDataSource in class BaseDataViewtableData - The new bound data sourcepublic boolean isEditable()
isEditable in interface DataViewModelisEditable in class BaseDataView
public Object getObject(int row,
int column)
getObject in interface DataViewModelgetObject in class BaseDataViewrow - The row indexcolumn - The column index
public boolean setTableDataItem(Object o,
int row,
int column)
setTableDataItem in interface DataViewModelsetTableDataItem in class BaseDataViewo - The new cell valuerow - The row indexcolumn - The column index
public Object getTableDataItem(int row,
int column)
getTableDataItem in interface JCTableDataModelgetTableDataItem in class BaseDataViewrow - The row indexcolumn - The column index
public int getNumRows()
getNumRows in interface JCTableDataModelpublic int getNumColumns()
getNumColumns in interface JCTableDataModelpublic Object getTableRowLabel(int row)
getTableRowLabel in interface JCTableDataModelgetTableRowLabel in class BaseDataViewrow - The row index
public Object getTableColumnLabel(int column)
getTableColumnLabel in interface JCTableDataModelgetTableColumnLabel in class BaseDataViewcolumn - The column index
public void addTableDataListener(com.klg.jclass.table.JCTableDataListener l)
JCTableDataListener to this object.
addTableDataListener in interface TableDataModell - The table data listenere to be addedJCTableDataListener,
JCTableDataEventpublic void removeTableDataListener(com.klg.jclass.table.JCTableDataListener l)
JCTableDataListener from this object
removeTableDataListener in interface TableDataModell - The table data listenere to be removedJCTableDataListener,
JCTableDataEventpublic int[] getColumnMap()
getColumnMap in interface SortableDataViewModelpublic int[] getRowMap()
getRowMap in interface SortableDataViewModelpublic int getDataColumn(int column)
getDataColumn in interface SortableDataViewModelcolumn - The column number in the view
public int getDataRow(int row)
getDataRow in interface SortableDataViewModelrow - The row number in the view
public int getViewColumn(int column)
getViewColumn in interface SortableDataViewModelcolumn - The column number in the datasource
public int getViewRow(int row)
getViewRow in interface SortableDataViewModelrow - The row number in the datasource
protected void resizeColumnMap()
protected void resizeRowMap()
public void resetColumnMap()
resetColumnMap in interface SortableDataViewModelpublic void resetRowMap()
resetRowMap in interface SortableDataViewModel
protected int[] shiftMappedArray(int[] array,
int item1,
int item2)
array - The input array of row or column indicesitem1 - The current position of the row/column to be moveditem2 - The destination of the row/column
protected int[] removeMapElement(int[] array,
int element)
array - The input array of row or column indiceselement - The element to be removed
public boolean swapColumns(int column1,
int column2)
swapColumns in interface SortableDataViewModelcolumn1 - The view index of the first column to be swappedcolumn2 - The view index of the second column to be swapped
public boolean swapRows(int row1,
int row2)
swapRows in interface SortableDataViewModelrow1 - The view index of the first row to be swappedrow2 - The view index of the second row to be swapped
public boolean setColumnMap(int[] new_map)
setColumnMap in interface SortableDataViewModelnew_map - Integer array where initial unsorted new_map resides
public boolean setRowMap(int[] new_map)
setRowMap in interface SortableDataViewModelnew_map - Integer array where initial unsorted new_map resides
public boolean dragColumn(int column1,
int column2)
dragColumn in interface SortableDataViewModelcolumn1 - Current index of column to be draggedcolumn2 - Index where dragged column is to be placed
public boolean dragRow(int row1,
int row2)
dragRow in interface SortableDataViewModelrow1 - Current index of row to be draggedrow2 - Index where dragged row is to be placed
protected void repaintRange(int start_row,
int start_column,
int end_row,
int end_column)
start_row - The starting row of the range to be repaintedstart_column - The starting column of the range to be repaintedend_row - The ending row of the range to be repaintedend_column - The ending column of the range to be repaintedpublic void dispose()
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||