|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectswingwt.awt.Component
swingwt.awt.Container
swingwtx.swing.JComponent
swingwtx.swing.JTable
Nested Class Summary |
Nested classes inherited from class swingwtx.swing.JComponent |
JComponent.InternalFrameSelectionListener |
Field Summary | |
static int |
AUTO_RESIZE_ALL_COLUMNS
|
static int |
AUTO_RESIZE_LAST_COLUMN
|
static int |
AUTO_RESIZE_NEXT_COLUMN
|
static int |
AUTO_RESIZE_OFF
|
static int |
AUTO_RESIZE_SUBSEQUENT_COLUMNS
|
protected TableCellEditor |
cellEditor
|
protected boolean |
cellSelectionEnabled
Whether cell selection (and thus cell editing) is enabled |
protected TableColumnModel |
columnModel
|
protected boolean |
columnSelection
|
protected int |
editingColumn
Cache of values for current cell editor |
protected Component |
editingComponent
|
protected TableCellEditor |
editingEditor
|
protected int |
editingRow
|
protected JTableHeader |
header
|
protected ListSelectionModel |
listSelectionModel
|
protected Dimension |
pIntercell
|
protected boolean |
pLines
Cache - whether to show grid lines |
protected org.eclipse.swt.widgets.Table |
ppeer
|
protected int |
pRowHeight
|
protected int |
pSelCol
|
protected int |
pSelRow
|
protected boolean |
rowSelection
|
protected org.eclipse.swt.custom.TableCursor |
swtCursor
The SWT table cursor |
protected org.eclipse.swt.custom.TableEditor |
swtEditor
The SWT table editor |
protected boolean |
tableDrawnOnce
Whether the table has been displayed yet. |
protected boolean |
useFastVirtualTables
Whether or not to use SWT's fast virtual tables |
Fields inherited from class swingwtx.swing.JComponent |
accessibleContext, actionMap, ancestorInputMap, border, clientProperties, descendantHasPeer, focusInputMap, internalFrameAdapter, internalFrameParent, opaque, propertyChangeListeners, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, windowInputMap |
Fields inherited from class swingwt.awt.Container |
composite, comps, containerListeners, layout, queuedValidateRequest |
Fields inherited from interface swingwt.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
JTable()
|
|
JTable(int numRows,
int numCols)
|
|
JTable(java.lang.Object[][] rowData,
java.lang.Object[] columnNames)
|
|
JTable(TableModel dm)
|
|
JTable(TableModel dm,
TableColumnModel columnModel)
|
|
JTable(TableModel dm,
TableColumnModel columnModel,
ListSelectionModel selectionModel)
|
|
JTable(java.util.Vector rowData,
java.util.Vector columnNames)
|
Method Summary | |
void |
addColumn(TableColumn tableColumn)
|
void |
changeSelection(int row,
int col,
boolean toggle,
boolean extend)
|
void |
clearSelection()
|
void |
columnAdded(TableColumnModelEvent e)
|
void |
columnMarginChanged(ChangeEvent e)
|
void |
columnMoved(TableColumnModelEvent e)
|
void |
columnRemoved(TableColumnModelEvent e)
|
void |
columnSelectionChanged(ListSelectionEvent e)
|
int |
convertColumnIndexToModel(int index)
SWT table columns aren't movable, so columnIndex == modelIndex |
void |
createDefaultColumnsFromModel()
|
protected void |
createDefaultRenderers()
|
protected void |
createTableCursor()
Creates the table cursor and maps events to it |
void |
doLayout()
Forces laying out of this container's child components again. |
void |
editingCanceled(ChangeEvent e)
Callback when the editor is cancelled - need to regenerate the table cursor |
void |
editingStopped(ChangeEvent e)
Callback when the editor is stopped - need to regenerate the table cursor and put any changes back into the model. |
int |
getAutoResizeMode()
NOT IMPLEMENTED |
TableCellEditor |
getCellEditor()
|
TableCellEditor |
getCellEditor(int row,
int col)
|
TableCellRenderer |
getCellRenderer(int row,
int column)
|
boolean |
getCellSelectionEnabled(boolean b)
|
TableColumn |
getColumn(int index)
|
TableColumn |
getColumn(java.lang.Object identifier)
|
int |
getColumnCount()
|
TableColumnModel |
getColumnModel()
|
java.lang.String |
getColumnName(int index)
|
boolean |
getColumnSelectionAllowed(boolean b)
|
TableCellRenderer |
getDefaultRenderer(java.lang.Class columnClass)
|
int |
getEditingColumn()
|
int |
getEditingRow()
|
Dimension |
getIntercellSpacing()
|
TableModel |
getModel()
|
int |
getRowCount()
|
int |
getRowHeight()
|
boolean |
getRowSelectionAllowed(boolean b)
|
int |
getSelectedColumn()
NOT IMPLEMENTED |
int |
getSelectedColumnCount()
NOT IMPLEMENTED |
int[] |
getSelectedColumns()
NOT IMPLEMENTED |
int |
getSelectedRow()
|
int |
getSelectedRowCount()
|
int[] |
getSelectedRows()
|
Color |
getSelectionBackground()
NOT IMPLEMENTED - HARD RETURNS A COLOUR VALUE |
Color |
getSelectionForeground()
NOT IMPLEMENTED - HARD RETURNS A COLOUR VALUE |
ListSelectionModel |
getSelectionModel()
|
boolean |
getShowGrid()
|
boolean |
getShowHorizontalLines()
|
boolean |
getShowVerticalLines()
|
JTableHeader |
getTableHeader()
|
java.lang.Object |
getValueAt(int row,
int col)
|
boolean |
isCellSelected(int row,
int col)
|
boolean |
isEditing()
|
boolean |
isShowGrid()
|
boolean |
isShowHorizontalLines()
|
boolean |
isShowVerticalLines()
|
Component |
prepareRenderer(TableCellRenderer renderer,
int row,
int column)
|
protected void |
processCellEdit()
Called back when the user selects a cell in the table to handle the editing |
protected void |
processColumnClick(int index)
When a column is clicked by the user, this routine gets fired, which generates a mouse event for the thing and then sends it to the TableHeader mouseEvent listeners for dispatch to the user process |
protected void |
processListSelection()
Called back when a row/cell is selected in the table to fire events on to user processes. |
void |
refreshTable()
Forces a complete rebuild of the peer from the data model. |
void |
refreshTable(int rowFrom,
int rowTo)
Just like refreshTable(), except it does not generate the column headers and only updates the rows specified. |
protected void |
registerCursorSelectionEvents()
Assigns events to the cursor for selection so that we can update the ListSelectionModel for this component. |
protected void |
registerTableListSelectionEvents()
Assigns events to the table for selection |
void |
removeColumn(TableColumn tableColumn)
|
void |
resizeAndRepaint()
|
int |
rowAtPoint(Point p)
NOT IMPLEMENTED |
void |
selectAll()
|
void |
setAutoCreateColumnsFromModel(boolean b)
NOT IMPLEMENTED - just override the column model produced - you won't even notice |
void |
setAutoResizeMode(int size)
NOT IMPLEMENTED |
void |
setCellEditor(TableCellEditor cell)
|
void |
setCellSelectionEnabled(boolean b)
|
void |
setColumnModel(TableColumnModel model)
|
void |
setColumnSelectionAllowed(boolean b)
NOT IMPLEMENTED |
void |
setDefaultRenderer(java.lang.Class columnClass,
TableCellRenderer tableCellRenderer)
|
void |
setDirty(boolean b)
Sets whether the model is dirty for forcing updates |
void |
setEditingColumn(int aColumn)
|
void |
setEditingRow(int aRow)
|
void |
setIntercellSpacing(Dimension d)
NOT IMPLEMENTED |
void |
setModel(TableModel dm)
|
void |
setModel(TableModel dm,
boolean noRefresh)
|
void |
setModelDirty(boolean b)
Tells the table that it needs to redraw when refreshTable() is next called. |
void |
setRowHeight(int height)
NOT IMPLEMENTED |
void |
setRowHeight(int row,
int height)
NOT IMPLEMENTED |
void |
setRowSelectionAllowed(boolean b)
NOT IMPLEMENTED |
void |
setRowSelectionInterval(int first,
int last)
|
void |
setSelectionBackground(Color c)
NOT IMPLEMENTED - MEANINGLESS TO PLATFORM TABLE |
void |
setSelectionForeground(Color c)
NOT IMPLEMENTED - MEANINGLESS TO PLATFORM TABLE |
void |
setSelectionMode(int mode)
|
void |
setSelectionModel(ListSelectionModel l)
|
void |
setShowGrid(boolean b)
|
void |
setShowHorizontalLines(boolean b)
|
void |
setShowVerticalLines(boolean b)
|
void |
setSwingWTParent(Container parent)
Once a parent component receives an "add" call for a child, this being the child, this should be called to tell us to instantiate the peer and load in any cached properties. |
void |
setValueAt(java.lang.Object value,
int row,
int col)
|
void |
showSelection()
Scrolls the table to the selected row. |
void |
tableChanged(TableModelEvent e)
Called by the model to let us know when things change. |
void |
valueChanged(ListSelectionEvent e)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int AUTO_RESIZE_OFF
public static final int AUTO_RESIZE_NEXT_COLUMN
public static final int AUTO_RESIZE_SUBSEQUENT_COLUMNS
public static final int AUTO_RESIZE_LAST_COLUMN
public static final int AUTO_RESIZE_ALL_COLUMNS
protected org.eclipse.swt.widgets.Table ppeer
protected JTableHeader header
protected TableColumnModel columnModel
protected ListSelectionModel listSelectionModel
protected TableCellEditor cellEditor
protected int pRowHeight
protected Dimension pIntercell
protected boolean pLines
protected int pSelRow
protected int pSelCol
protected int editingColumn
protected int editingRow
protected TableCellEditor editingEditor
protected Component editingComponent
protected boolean cellSelectionEnabled
protected org.eclipse.swt.custom.TableEditor swtEditor
protected org.eclipse.swt.custom.TableCursor swtCursor
protected boolean useFastVirtualTables
protected boolean tableDrawnOnce
protected boolean rowSelection
protected boolean columnSelection
Constructor Detail |
public JTable()
public JTable(int numRows, int numCols)
public JTable(java.lang.Object[][] rowData, java.lang.Object[] columnNames)
public JTable(java.util.Vector rowData, java.util.Vector columnNames)
public JTable(TableModel dm)
public JTable(TableModel dm, TableColumnModel columnModel)
public JTable(TableModel dm, TableColumnModel columnModel, ListSelectionModel selectionModel)
Method Detail |
public TableModel getModel()
public void setModel(TableModel dm, boolean noRefresh)
public void setModel(TableModel dm)
public void clearSelection()
public void doLayout()
Container
doLayout
in class Container
public int getColumnCount()
public java.lang.String getColumnName(int index)
public TableColumn getColumn(java.lang.Object identifier)
public TableColumn getColumn(int index)
public int getRowCount()
public int getSelectedColumn()
public int getSelectedColumnCount()
public int[] getSelectedColumns()
public void setRowSelectionInterval(int first, int last)
public int getSelectedRow()
public int getSelectedRowCount()
public int[] getSelectedRows()
public boolean getShowHorizontalLines()
public boolean isShowHorizontalLines()
public boolean getShowVerticalLines()
public boolean isShowVerticalLines()
public boolean getShowGrid()
public boolean isShowGrid()
public void setShowHorizontalLines(boolean b)
public void setShowVerticalLines(boolean b)
public void setShowGrid(boolean b)
public java.lang.Object getValueAt(int row, int col)
public void resizeAndRepaint()
public void selectAll()
public void setValueAt(java.lang.Object value, int row, int col)
public TableColumnModel getColumnModel()
public void setAutoCreateColumnsFromModel(boolean b)
public void setColumnModel(TableColumnModel model)
public void createDefaultColumnsFromModel()
public void addColumn(TableColumn tableColumn)
public void setRowSelectionAllowed(boolean b)
public void setColumnSelectionAllowed(boolean b)
public boolean getRowSelectionAllowed(boolean b)
public void setCellSelectionEnabled(boolean b)
public boolean getCellSelectionEnabled(boolean b)
public boolean getColumnSelectionAllowed(boolean b)
public Color getSelectionBackground()
public Color getSelectionForeground()
public void setSelectionBackground(Color c)
public void setSelectionForeground(Color c)
public void setIntercellSpacing(Dimension d)
public Dimension getIntercellSpacing()
public int getRowHeight()
public void setRowHeight(int height)
public void setRowHeight(int row, int height)
public int rowAtPoint(Point p)
public int getAutoResizeMode()
public void setAutoResizeMode(int size)
public ListSelectionModel getSelectionModel()
public void setSelectionModel(ListSelectionModel l)
public void setSelectionMode(int mode)
public void setDefaultRenderer(java.lang.Class columnClass, TableCellRenderer tableCellRenderer)
public TableCellRenderer getDefaultRenderer(java.lang.Class columnClass)
public TableCellRenderer getCellRenderer(int row, int column)
protected void createDefaultRenderers()
public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
public boolean isCellSelected(int row, int col)
public void setModelDirty(boolean b)
public void changeSelection(int row, int col, boolean toggle, boolean extend)
public void showSelection()
public int convertColumnIndexToModel(int index)
public JTableHeader getTableHeader()
public void setSwingWTParent(Container parent) throws java.lang.Exception
setSwingWTParent
in class JComponent
java.lang.Exception
public void setDirty(boolean b)
public void refreshTable()
public void refreshTable(int rowFrom, int rowTo)
protected void registerCursorSelectionEvents()
protected void registerTableListSelectionEvents()
protected void processListSelection()
protected void processCellEdit()
public void editingCanceled(ChangeEvent e)
editingCanceled
in interface CellEditorListener
public void editingStopped(ChangeEvent e)
editingStopped
in interface CellEditorListener
protected void processColumnClick(int index)
public TableCellEditor getCellEditor()
public TableCellEditor getCellEditor(int row, int col)
public void setCellEditor(TableCellEditor cell)
public int getEditingColumn()
public void setEditingColumn(int aColumn)
public int getEditingRow()
public void setEditingRow(int aRow)
public void tableChanged(TableModelEvent e)
tableChanged
in interface TableModelListener
public void valueChanged(ListSelectionEvent e)
valueChanged
in interface ListSelectionListener
public void columnAdded(TableColumnModelEvent e)
columnAdded
in interface TableColumnModelListener
public void columnMarginChanged(ChangeEvent e)
columnMarginChanged
in interface TableColumnModelListener
public void columnMoved(TableColumnModelEvent e)
columnMoved
in interface TableColumnModelListener
public void columnRemoved(TableColumnModelEvent e)
columnRemoved
in interface TableColumnModelListener
public void columnSelectionChanged(ListSelectionEvent e)
columnSelectionChanged
in interface TableColumnModelListener
protected void createTableCursor()
public boolean isEditing()
public void removeColumn(TableColumn tableColumn)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |