Method Summary |
|
final public void | addMouseListener(SMouseListener l) Adds the specified mouse listener to receive mouse events from
this component. |
public void | addRowSelectionInterval(int index0, int index1) Adds the row from index0 to index0 inclusive to the current selection. |
public void | addSelectionListener(ListSelectionListener listener) |
public void | addViewportChangeListener(SViewportChangeListener l) Adds the given SViewportChangeListener to the scrollable. |
public void | clearSelection() Deselects all selected columns and rows. |
public int | columnAtPoint(SPoint point) Returns the table column for the passed SPoint
instance received via
STable.addMouseListener(org.wings.event.SMouseListener) .
Parameters: point - The pointed retuned by the mouse event. |
public int | convertColumnIndexToModel(int viewColumnIndex) |
public int | convertColumnIndexToView(int modelColumnIndex) Maps the index of the column in the table model at
modelColumnIndex to the index of the column
in the view. |
protected STableColumnModel | createDefaultColumnModel() Returns the default column model object, which is
a SDefaultTableColumnModel . |
public void | createDefaultColumnsFromModel() Creates the default columns of the table from the table model. |
protected TableModel | createDefaultDataModel() Returns a default table model object. |
protected void | createDefaultEditors() Creates default cell editors for Objects, numbers, and boolean values. |
protected TableColumnModelHandler | createTableColumnModelListener() Creates an instance of TableColumnModelHandler. |
public boolean | editCellAt(int row, int column) Programmatically starts editing the cell at row and
column, if the cell is editable. |
public boolean | editCellAt(int row, int column, EventObject e) Programmatically starts editing the cell at row and
column, if the cell is editable. |
public void | editingCanceled(ChangeEvent e) Invoked when editing is canceled. |
public void | editingStopped(ChangeEvent e) Invoked when editing is finished. |
public void | fireFinalEvents() |
public void | fireIntermediateEvents() |
protected void | fireMouseClickedEvent(SMouseEvent event) Reports a mouse click event. |
protected void | fireViewportChanged(boolean horizontal) Notifies all listeners that have registered interest for notification
on changes to this scrollable's viewport in the specified direction. |
public boolean | getAutoCreateColumnsFromModel() Determines whether the table will create default columns from the model.
If true, setModel will clear any existing columns and
create new columns from the new model. |
public STableCellEditor | getCellEditor() Return the cellEditor. |
public STableCellEditor | getCellEditor(int row, int col) Return an appropriate editor for the cell specified by this row and
column. |
public STableCellRenderer | getCellRenderer(int row, int col) Returns the cell renderer for the given table cell. |
public SCellRendererPane | getCellRendererPane() |
public Class | getColumnClass(int col) |
public int | getColumnCount() |
public STableColumnModel | getColumnModel() Returns a STableColumnModel that contains information
about all columns of this table. |
public String | getColumnName(int col) |
public STableCellEditor | getDefaultEditor(Class columnClass) |
public STableCellRenderer | getDefaultRenderer() |
public STableCellRenderer | getDefaultRenderer(Class columnClass) |
public String | getDeselectionParameter(int row, int col) wingS internal method used to create specific HTTP request parameter names. |
public String | getEditParameter(int row, int col) wingS internal method used to create specific HTTP request parameter names. |
public int | getEditingColumn() This returns the index of the editing column. |
public int | getEditingRow() Returns the index of the editing row. |
public SComponent | getEditorComponent() If the receiver is currently editing this will return the Component
that was returned from the CellEditor. |
public Color | getHeaderBackground() Return the background color. |
public SFont | getHeaderFont() Return the font. |
public Color | getHeaderForeground() Return the foreground color. |
public STableCellRenderer | getHeaderRenderer() The renderer component responsible for rendering the table's header cell. |
public STableCellRenderer | getHeaderRenderer(int col) Returns the header renderer for the given header cell. |
public SDimension | getIntercellPadding() |
public SDimension | getIntercellSpacing() |
public TableModel | getModel() |
public int | getRowCount() |
public STableCellRenderer | getRowSelectionRenderer() The cell renderer used to render a special selection column needed in cases clicks on table
cell cannot be distinguished as 'edit' or 'selection' click. |
public String | getRowStyle(int row) Define an optional CSS class which should be applied additionally to the passed row num.
Override this method, if you want to give rows different attributes.
E.g. |
public Rectangle | getScrollableViewportSize() The size of the component in respect to scrollable units. |
public int | getSelectedRow() |
public int | getSelectedRowCount() |
public int[] | getSelectedRows() |
public Color | getSelectionBackground() Return the background color. |
public SFont | getSelectionFont() Return the font. |
public Color | getSelectionForeground() Return the foreground color. |
public int | getSelectionMode() |
public SListSelectionModel | getSelectionModel() |
public String | getSelectionParameter(int row, int col) wingS internal method used to create specific HTTP request parameter names. |
public boolean | getShowHorizontalLines() |
public boolean | getShowVerticalLines() |
public String | getToggleSelectionParameter(int row, int col) wingS internal method used to create specific HTTP request parameter names. |
public Object | getValueAt(int row, int column) |
public Rectangle | getViewportSize() Returns the actual visible part of a scrollable. |
public int | getVisibleColumnCount() |
public boolean | isCellEditable(int row, int col) Returns true if the cell at row and column
is editable. |
public boolean | isEditable() If this table is editable, clicks on table cells will be catched and interpreted as
editor calls. |
public boolean | isEditing() Returns true is the table is editing a cell. |
public boolean | isEpochCheckEnabled() |
public boolean | isHeaderVisible() Returns Determines whether the header is visible or not. By
default the header is visible. CAVEAT:The
header is not (yet) implemented like in Swing. |
public boolean | isRowSelected(int row) |
public boolean | isSelectable() If this table is marked as selectable, clicks on a non-editable table cells
STable.setEditable(boolean) must be false ) will be catched
as
org.wings.event.SMouseEvent s and interpreted as selection calls. |
protected void | nameEditorComponent(SComponent component, int row, int col) Generates the name (= id) of the editing component so that
the STable implementation knows to associate the input
value with the correct data row/columns
Applies the unqique id/name for a component of the rows/column
to the cell component. |
protected void | nameRendererComponent(SComponent component, int row, int col) Generates the name (= id) of the editing component so that
the STable implementation knows to associate the input
value with the correct data row/columns
Applies the unqique id/name for a component of the rows/column
to the cell component. |
protected SComponent | prepareEditor(STableCellEditor editor, int row, int col) Prepares the specified editor using the value at the specified cell. |
public SComponent | prepareHeaderRenderer(STableCellRenderer headerRenderer, int col) Prepares and returns the renderer to render the column header
Parameters: col - Column number to render. |
public SComponent | prepareRenderer(STableCellRenderer r, int row, int col) |
public void | processLowLevelEvent(String action, String[] values) |
public void | removeEditor() Discard the editor object and return the real estate it used to
cell rendering. |
final public void | removeMouseListener(SMouseListener l) Removes the specified mouse listener so that it no longer
receives mouse events from this component. |
public void | removeSelectionListener(ListSelectionListener listener) |
public void | removeViewportChangeListener(SViewportChangeListener l) Removes the given SViewportChangeListener from the scrollable. |
public int | rowAtPoint(SPoint point) Returns the table row for the passed SPoint
instance received via
STable.addMouseListener(org.wings.event.SMouseListener) .
Parameters: point - The pointed retuned by the mouse event. |
public void | setAutoCreateColumnsFromModel(boolean autoCreateColumnsFromModel) Sets this table's autoCreateColumnsFromModel flag. |
protected void | setCellEditor(STableCellEditor anEditor) Set the cellEditor variable. |
public void | setColumnModel(STableColumnModel newColumnModel) Sets the model holding information about the columns for this table. |
public void | setDefaultEditor(Class columnClass, STableCellEditor r) Set a default editor to be used if no editor has been set in
a TableColumn. |
public void | setDefaultRenderer(STableCellRenderer r) |
public void | setDefaultRenderer(Class columnClass, STableCellRenderer r) |
public void | setEditable(boolean editable) If this table is editable, clicks on table cells will be catched
as
org.wings.event.SMouseEvent s and interpreted as
editor calls. |
public void | setEditingColumn(int editingColumn) Set the editingColumn variable. |
public void | setEditingRow(int editingRow) Set the editingRow variable. |
public void | setEpochCheckEnabled(boolean epochCheckEnabled) |
public void | setHeaderBackground(Color color) Set the foreground color. |
public void | setHeaderFont(SFont font) Set the font. |
public void | setHeaderForeground(Color color) Set the foreground color. |
public void | setHeaderRenderer(STableCellRenderer headerCellRenderer) The renderer component responsible for rendering the table's header cell. |
public void | setHeaderVisible(boolean hv) Sets Determines whether the header is visible or not. By
default the header is visible. CAVEAT:The
header is not (yet) implemented like in Swing. |
public void | setIntercellPadding(SDimension d) |
public void | setIntercellSpacing(SDimension d) |
public void | setModel(TableModel tm) |
public void | setParent(SContainer p) Sets the container, this component resides in. |
protected void | setParentFrame(SFrame f) Sets the frame in which this component resides. |
public void | setRowSelectionRenderer(STableCellRenderer rowSelectionRenderer) The cell renderer used to render a special selection column needed in cases clicks on table
cell cannot be distinguished as 'edit' or 'selection' click. |
public void | setSelectable(boolean selectable) If this table is marked as selectable, clicks on a non-editable table cells
STable.setEditable(boolean) must be false ) will be catched
as
org.wings.event.SMouseEvent s and interpreted as selection calls. |
public void | setSelectedRow(int selectedIndex) |
public void | setSelectionBackground(Color color) Set the foreground color. |
public void | setSelectionFont(SFont font) Set the font. |
public void | setSelectionForeground(Color color) Set the foreground color. |
public void | setSelectionMode(int s) Sets the selection mode. |
public void | setSelectionModel(SListSelectionModel model) Sets the row selection model for this table to model . |
public void | setShowGrid(boolean b) |
public void | setShowHorizontalLines(boolean b) |
public void | setShowVerticalLines(boolean b) |
public void | setValueAt(Object v, int row, int column) |
public void | setViewportSize(Rectangle newViewport) Sets the actual visible part of a scrollable. |
public void | tableChanged(TableModelEvent e) |