|
swingx Version 2005-08-19 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
org.jdesktop.swingx.JXTable
public class JXTable
A JXTable is a JTable with built-in support for row sorting, filtering, and
highlighting, column visibility and a special popup control on the column
header for quick access to table configuration. You can instantiate a JXTable
just as you would a JTable, using a TableModel. However, a JXTable
automatically wraps TableColumns inside a TableColumnExt instance.
TableColumnExt supports visibility, sortability, and prototype values for
column sizing, none of which are available in TableColumn. You can retrieve
the TableColumnExt instance for a column using getColumnExt(Object)
or getColumnExt(int colnumber)
.
A JXTable is, by default, sortable by clicking on column headers; each
subsequent click on a header reverses the order of the sort, and a sort arrow
icon is automatically drawn on the header. Sorting can be disabled using
setSortable(boolean)
. Sorting on columns is handled by a Sorter
instance which contains a Comparator used to compare values in two rows of a
column. You can replace the Comparator for a given column by using
getColumnExt("column").getSorter().setComparator(customComparator)
Columns can be hidden or shown by setting the visible property on the
TableColumnExt using TableColumnExt.setVisible(boolean)
. Columns can
also be shown or hidden from the column control popup.
The column control popup is triggered by an icon drawn to the far right of
the column headers, above the table's scrollbar (when installed in a
JScrollPane). The popup allows the user to select which columns should be
shown or hidden, as well as to pack columns and turn on horizontal scrolling.
To show or hide the column control, use the
setColumnControlVisible(boolean show)
method.
Rows can be filtered from a JXTable using a Filter class and a
FilterPipeline. One assigns a FilterPipeline to the table using
setFilters(FilterPipeline)
. Filtering hides, but does not delete or
permanently remove rows from a JXTable. Filters are used to provide sorting
to the table--rows are not removed, but the table is made to believe rows in
the model are in a sorted order.
One can automatically highlight certain rows in a JXTable by attaching
Highlighters in the setHighlighters(HighlighterPipeline)
method. An
example would be a Highlighter that colors alternate rows in the table for
readability; AlternateRowHighlighter does this. Again, like Filters,
Highlighters can be chained together in a HighlighterPipeline to achieve more
interesting effects.
You can resize all columns, selected columns, or a single column using the
methods like packAll()
. Packing combines several other aspects of a
JXTable. If horizontal scrolling is enabled using
setHorizontalScrollEnabled(boolean)
, then the scrollpane will allow
the table to scroll right-left, and columns will be sized to their preferred
size. To control the preferred sizing of a column, you can provide a
prototype value for the column in the TableColumnExt using
TableColumnExt.setPrototypeValue(Object)
. The prototype is used as
an indicator of the preferred size of the column. This can be useful if some
data in a given column is very long, but where the resize algorithm would
normally not pick this up.
Last, you can also provide searches on a JXTable using the Searchable property.
Keys/Actions registered with this component:
HORIZONTALSCROLL_ACTION_COMMAND
- toggle the horizontal scrollbar
PACKSELECTED_ACTION_COMMAND
- resize the selected column to fit the widest
cell content
PACKALL_ACTION_COMMAND
- resize all columns to fit the widest
cell content in each column
Key bindings.
Client Properties.
MATCH_HIGHLIGHTER
- set to Boolean.TRUE to
use a SearchHighlighter to mark a cell as matching.
Nested Class Summary | |
---|---|
static class |
JXTable.BooleanEditor
|
static class |
JXTable.BooleanRenderer
|
static class |
JXTable.DateRenderer
|
static class |
JXTable.DoubleRenderer
|
static class |
JXTable.GenericEditor
Default Editors |
static class |
JXTable.IconRenderer
|
static class |
JXTable.NumberEditor
|
static class |
JXTable.NumberRenderer
|
protected static class |
JXTable.TableAdapter
|
static class |
JXTable.TableRolloverController<T extends JTable>
listens to rollover properties. |
class |
JXTable.TableSearchable
|
Nested classes/interfaces inherited from class javax.swing.JTable |
---|
JTable.AccessibleJTable, JTable.PrintMode |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected ComponentAdapter |
dataAdapter
The ComponentAdapter for model data access. |
protected FilterPipeline |
filters
The FilterPipeline for the table. |
protected HighlighterPipeline |
highlighters
The HighlighterPipeline for the table. |
static String |
HORIZONTALSCROLL_ACTION_COMMAND
Constant string for horizontal scroll actions, used in JXTable's Action Map. |
protected boolean |
isXTableRowHeightSet
temporary hack: rowheight will be internally adjusted to font size on instantiation and in updateUI if the height has not been set explicitly by the application. |
static String |
MATCH_HIGHLIGHTER
key for client property to use SearchHighlighter as match marker. |
static String |
PACKALL_ACTION_COMMAND
Constant string for packing all columns, used in JXTable's Action Map. |
static String |
PACKSELECTED_ACTION_COMMAND
Constant string for packing selected columns, used in JXTable's Action Map. |
protected Searchable |
searchable
|
static String |
UIPREFIX
The prefix marker to find component related properties in the resourcebundle. |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JXTable()
Instantiates a JXTable with a default table model, no data. |
|
JXTable(int numRows,
int numColumns)
Instantiates a JXTable for a given number of columns and rows. |
|
JXTable(Object[][] rowData,
Object[] columnNames)
Instantiates a JXTable with data in a array or rows and column names. |
|
JXTable(TableModel dm)
Instantiates a JXTable with a specific table model. |
|
JXTable(TableModel dm,
TableColumnModel cm)
Instantiates a JXTable with a specific table model. |
|
JXTable(TableModel dm,
TableColumnModel cm,
ListSelectionModel sm)
Instantiates a JXTable with a specific table model, column model, and selection model. |
|
JXTable(Vector rowData,
Vector columnNames)
Instantiates a JXTable with data in a vector or rows and column names. |
Method Summary | |
---|---|
void |
addHighlighter(Highlighter highlighter)
Adds a Highlighter. |
protected void |
adjustComponentOrientation(Component stamp)
adjusts the Component's orientation to JXTable's CO if appropriate. |
protected void |
adminSetRowHeight(int rowHeight)
calling setRowHeight for internal reasons. |
void |
columnRemoved(TableColumnModelEvent e)
overridden to remove the interactive sorter if the sorted column is no longer contained in the ColumnModel. |
void |
columnSelectionChanged(ListSelectionEvent e)
Notifies the table that a new column has been selected. |
protected void |
configureEnclosingScrollPane()
overridden to addionally configure the upper right corner of an enclosing scrollpane with the ColumnControl. |
protected void |
configureViewportBackground()
Deprecated. no longer used - replaced by fillsViewportHeight |
int |
convertRowIndexToModel(int row)
Convert row index from view coordinates to model coordinates accounting for the presence of sorters and filters. |
int |
convertRowIndexToView(int row)
Convert row index from model coordinates to view coordinates accounting for the presence of sorters and filters. |
protected TableColumn |
createAndConfigureColumn(TableModel model,
int modelColumn)
|
protected TableColumnModel |
createDefaultColumnModel()
? |
void |
createDefaultColumnsFromModel()
|
protected void |
createDefaultEditors()
Creates default cell editors for objects, numbers, and boolean values. |
protected void |
createDefaultRenderers()
Creates default cell renderers for objects, numbers, doubles, dates, booleans, icons, and links. |
protected JTableHeader |
createDefaultTableHeader()
? |
protected JXTable.TableRolloverController |
createLinkController()
|
protected PipelineListener |
createPipelineListener()
creates the listener for changes in filters. |
protected RolloverProducer |
createRolloverProducer()
creates and returns the RolloverProducer to use. |
TableColumn |
getColumn(int viewColumnIndex)
Returns the TableColumn object for the column in the
table whose column index is equal to viewColumnIndex . |
JComponent |
getColumnControl()
returns the component for column control. |
int |
getColumnCount(boolean includeHidden)
returns the number of TableColumns including hidden if the parameter is set to true. |
TableColumnExt |
getColumnExt(int viewColumnIndex)
Returns the TableColumnExt object for the column in the
table whose column index is equal to viewColumnIndex or
null if the column is not of type TableColumnExt |
TableColumnExt |
getColumnExt(Object identifier)
Returns the TableColumnExt object for the column in the
table whose identifier is equal to identifier , when
compared using equals . |
protected ColumnFactory |
getColumnFactory()
|
int |
getColumnMargin()
Returns the margin between columns. |
List |
getColumns()
returns a list of all visible TableColumns. |
List |
getColumns(boolean includeHidden)
returns a list of TableColumns including hidden if the parameter is set to true. |
protected ComponentAdapter |
getComponentAdapter()
|
boolean |
getFillsViewportHeight()
Returns the flag to control JXTable scrollableTracksViewportHeight property. |
protected PipelineListener |
getFilterPipelineListener()
returns the listener for changes in filters. |
FilterPipeline |
getFilters()
Returns the FilterPipeline for the table. |
HighlighterPipeline |
getHighlighters()
Returns the HighlighterPipeline assigned to the table, null if none. |
protected JXTable.TableRolloverController |
getLinkController()
|
TableCellRenderer |
getNewDefaultRenderer(Class columnClass)
Returns a new instance of the default renderer for the specified class. |
Dimension |
getPreferredScrollableViewportSize()
|
int |
getRowCount()
Returns the row count in the table; if filters are applied, this is the filtered row count. |
protected SizeSequenceMapper |
getRowModelMapper()
|
boolean |
getScrollableTracksViewportHeight()
Overridden to control the tracksHeight property depending on fillsViewportHeight and relative size to containing parent (viewport?). |
Searchable |
getSearchable()
|
protected SelectionMapper |
getSelectionMapper()
temporaryly exposed for testing... |
int |
getSelectionMode()
Returns the selection mode used by this table's selection model. |
protected SortController |
getSortController()
returns the currently active SortController. |
TableColumn |
getSortedColumn()
|
SortOrder |
getSortOrder(int columnIndex)
Returns the SortOrder of the interactive sorter if it is set from the given column. |
Object |
getValueAt(int row,
int column)
|
int |
getVisibleRowCount()
? |
protected void |
init()
Initializes the table for use. |
protected void |
initializeColumnPreferredWidth(TableColumn column)
Initialize the preferredWidth of the specified column based on the column's prototypeValue property. |
boolean |
isCellEditable(int row,
int column)
Overridden to account for row index mapping and to respect TableColumnExt.isEditable() property. |
boolean |
isColumnControlVisible()
returns visibility flag of column control. |
boolean |
isHierarchical(int column)
|
boolean |
isRolloverEnabled()
Returns the rolloverEnabled property. |
boolean |
isRowHeightEnabled()
|
boolean |
isSortable()
Returns true if the table is sortable. |
void |
packAll()
This resizes all columns to fit the viewport; if horizontal scrolling is enabled, all columns will get their preferred width. |
void |
packColumn(int column,
int margin)
Packs an indivudal column in the table. |
void |
packColumn(int column,
int margin,
int max)
Packs an indivual column in the table to less than or equal to the maximum witdth. |
void |
packSelected()
This resizes selected columns to fit the viewport; if horizontal scrolling is enabled, selected columns will get their preferred width. |
void |
packTable(int margin)
Packs all the columns to their optimal size. |
Component |
prepareEditor(TableCellEditor editor,
int row,
int column)
Overridden to adjust the editor's component orientation if appropriate. |
Component |
prepareRenderer(TableCellRenderer renderer,
int row,
int column)
Returns the decorated Component used as a stamp to render
the specified cell. |
protected void |
removeColumns()
Remove all columns, make sure to include hidden. |
void |
removeHighlighter(Highlighter highlighter)
Removes the Highlighter. |
void |
resetSortOrder()
Removes the interactive sorter. |
int |
rowAtPoint(Point point)
workaround bug in JTable. |
void |
scrollCellToVisible(int row,
int column)
Scrolls to make the cell at row and column visible. |
void |
scrollColumnToVisible(int column)
Scrolls horizontally to make the given column visible. |
void |
scrollRowToVisible(int row)
Scrolls vertically to make the given row visible. |
void |
setAutoResizeMode(int mode)
overridden to update the show horizontal scrollbar action's selected state. |
void |
setColumnControlVisible(boolean showColumnControl)
bound property to flag visibility state of column control. |
void |
setColumnMargin(int value)
Sets the margin between columns. |
void |
setColumnSequence(Object[] identifiers)
reorders the columns in the sequence given array. |
void |
setComponentOrientation(ComponentOrientation o)
Hack around core swing JScrollPane bug: can't cope with corners when changing component orientation at runtime. |
void |
setFillsViewportHeight(boolean fillsViewportHeight)
Set flag to control JXTable's scrollableTracksViewportHeight property. |
void |
setFilters(FilterPipeline pipeline)
Sets the FilterPipeline for filtering table rows. |
void |
setHighlighters(HighlighterPipeline pipeline)
Assigns a HighlighterPipeline to the table. bound property. |
void |
setHorizontalScrollEnabled(boolean enabled)
Controls horizontal scrolling in the viewport, and works in coordination with column sizing. |
void |
setModel(TableModel newModel)
|
void |
setRolloverEnabled(boolean rolloverEnabled)
Property to enable/disable rollover support. |
void |
setRowHeight(int rowHeight)
Changes the row height for all rows in the table. |
void |
setRowHeight(int row,
int rowHeight)
|
void |
setRowHeightEnabled(boolean enabled)
sets enabled state of individual rowHeight support. |
void |
setSearchable(Searchable searchable)
sets the Searchable for this editor. |
void |
setSelectionModel(ListSelectionModel newModel)
Overridden to update selectionMapper |
void |
setSortable(boolean sortable)
Sets "sortable" property indicating whether or not this table supports sortable columns. |
void |
setValueAt(Object aValue,
int row,
int column)
|
void |
setVisibleRowCount(int visibleRowCount)
? |
void |
tableChanged(TableModelEvent e)
additionally updates filtered state. |
void |
toggleSortOrder(int columnIndex)
request to sort the column at columnIndex. |
protected void |
updateHighlighters()
|
protected void |
updateOnFilterContentChanged()
method called on change notification from filterpipeline. |
void |
updateUI()
bug fix: super doesn't update all renderers/editors. |
protected void |
updateViewSizeSequence()
Called if individual row height mapping need to be updated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String HORIZONTALSCROLL_ACTION_COMMAND
public static final String PACKALL_ACTION_COMMAND
public static final String PACKSELECTED_ACTION_COMMAND
public static final String UIPREFIX
public static final String MATCH_HIGHLIGHTER
protected FilterPipeline filters
protected HighlighterPipeline highlighters
protected ComponentAdapter dataAdapter
protected boolean isXTableRowHeightSet
protected Searchable searchable
Constructor Detail |
---|
public JXTable()
public JXTable(TableModel dm)
dm
- The model to use.public JXTable(TableModel dm, TableColumnModel cm)
dm
- The model to use.public JXTable(TableModel dm, TableColumnModel cm, ListSelectionModel sm)
dm
- The table model to use.cm
- The colomn model to use.sm
- The list selection model to use.public JXTable(int numRows, int numColumns)
numRows
- Count of rows to accomodate.numColumns
- Count of columns to accomodate.public JXTable(Vector rowData, Vector columnNames)
rowData
- Row data, as a Vector of Objects.columnNames
- Column names, as a Vector of Strings.public JXTable(Object[][] rowData, Object[] columnNames)
rowData
- Row data, as a two-dimensional Array of Objects (by row, for
column).columnNames
- Column names, as a Array of Strings.Method Detail |
---|
protected void init()
public void setRolloverEnabled(boolean rolloverEnabled)
rolloverEnabled
- protected JXTable.TableRolloverController getLinkController()
protected JXTable.TableRolloverController createLinkController()
protected RolloverProducer createRolloverProducer()
RolloverProducer
public boolean isRolloverEnabled()
true
if rollover is enabledpublic void setFillsViewportHeight(boolean fillsViewportHeight)
public boolean getFillsViewportHeight()
public boolean getScrollableTracksViewportHeight()
getScrollableTracksViewportHeight
in interface Scrollable
getScrollableTracksViewportHeight
in class JTable
protected void configureEnclosingScrollPane()
configureEnclosingScrollPane
in class JTable
protected void configureViewportBackground()
PENDING: need to repeat on background changes to this!
public void setComponentOrientation(ComponentOrientation o)
setComponentOrientation
in class Component
public boolean isColumnControlVisible()
Note: if the table is not inside a JScrollPane the column control is not shown even if this returns true. In this case it's the responsibility of the client code to actually show it.
public JComponent getColumnControl()
public void setColumnControlVisible(boolean showColumnControl)
showColumnControl
- public void packAll()
public void packSelected()
public void setHorizontalScrollEnabled(boolean enabled)
enabled
- If true, the scrollpane will allow the table to scroll
horizontally, and columns will resize to their preferred
width. If false, columns will resize to fit the viewport.public void columnSelectionChanged(ListSelectionEvent e)
columnSelectionChanged
in interface TableColumnModelListener
columnSelectionChanged
in class JTable
public void setAutoResizeMode(int mode)
setAutoResizeMode
in class JTable
public int getRowCount()
getRowCount
in class JTable
public boolean isHierarchical(int column)
public int convertRowIndexToModel(int row)
row
- row index in view coordinates
public int convertRowIndexToView(int row)
row
- row index in model coordinates
public Object getValueAt(int row, int column)
getValueAt
in class JTable
public void setValueAt(Object aValue, int row, int column)
setValueAt
in class JTable
public boolean isCellEditable(int row, int column)
TableColumnExt.isEditable()
property.
isCellEditable
in class JTable
public void setSelectionModel(ListSelectionModel newModel)
setSelectionModel
in class JTable
public void setModel(TableModel newModel)
setModel
in class JTable
public void tableChanged(TableModelEvent e)
tableChanged
in interface TableModelListener
tableChanged
in class JTable
protected void updateViewSizeSequence()
protected SelectionMapper getSelectionMapper()
SelectionMapper
public FilterPipeline getFilters()
public void setFilters(FilterPipeline pipeline)
protected PipelineListener getFilterPipelineListener()
protected PipelineListener createPipelineListener()
protected void updateOnFilterContentChanged()
public void setSortable(boolean sortable)
sortable
is
true
then sorting will be enabled on all columns whose
sortable
property is true
. If
sortable
is false
then sorting will be
disabled for all columns, regardless of each column's individual
sorting
property. The default is true
.
sortable
- boolean indicating whether or not this table supports sortable
columnsTableColumnExt.isSortable()
public boolean isSortable()
public void resetSortOrder()
public void toggleSortOrder(int columnIndex)
columnIndex
- the columnIndex in view coordinates.public SortOrder getSortOrder(int columnIndex)
columnIndex
- the column index in view coordinates.
protected SortController getSortController()
SortController
may be nullpublic TableColumn getSortedColumn()
public void columnRemoved(TableColumnModelEvent e)
columnRemoved
in interface TableColumnModelListener
columnRemoved
in class JTable
protected void removeColumns()
public List getColumns()
TableColumns
public List getColumns(boolean includeHidden)
includeHidden
-
TableColumns
including hidden columns if
specifiedpublic int getColumnCount(boolean includeHidden)
includeHidden
-
TableColumns
including hidden columns
if specifiedpublic void setColumnSequence(Object[] identifiers)
identifiers
- array of logical column namespublic TableColumnExt getColumnExt(Object identifier)
TableColumnExt
object for the column in the
table whose identifier is equal to identifier
, when
compared using equals
. The returned TableColumn is
guaranteed to be part of the current ColumnModel but may be hidden, that
is
TableColumnExt column = table.getColumnExt(id);
if (column != null) {
int viewIndex = table.convertColumnIndexToView(column.getModelIndex());
assertEquals(column.isVisible(), viewIndex >= 0);
}
identifier
- the identifier object
TableColumnExt
object that matches the
identifier or null if none is found.public TableColumnExt getColumnExt(int viewColumnIndex)
TableColumnExt
object for the column in the
table whose column index is equal to viewColumnIndex
or
null if the column is not of type TableColumnExt
viewColumnIndex
- index of the column with the object in question
TableColumnExt
object that matches the column
index
ArrayIndexOutOfBoundsException
- if viewColumnIndex out of allowed range.public TableColumn getColumn(int viewColumnIndex)
TableColumn
object for the column in the
table whose column index is equal to viewColumnIndex
.
Note:
Super does not expose the TableColumn access by index which may lead to
unexpected IllegalArgumentException if client code assumes the delegate
method is available - autoboxing will convert the given int to an object
which will call the getColumn(Object) method ... We do here.
viewColumnIndex
- index of the column with the object in question
TableColumn
object that matches the column
index
ArrayIndexOutOfBoundsException
- if viewColumnIndex out of allowed range.public void createDefaultColumnsFromModel()
createDefaultColumnsFromModel
in class JTable
protected TableColumn createAndConfigureColumn(TableModel model, int modelColumn)
protected ColumnFactory getColumnFactory()
public int getColumnMargin()
public void setColumnMargin(int value)
value
- margin between columns; must be greater than or equal to zero.public int getSelectionMode()
public Searchable getSearchable()
public void setSearchable(Searchable searchable)
searchable
- public void scrollRowToVisible(int row)
Note: this method has no precondition as it internally uses getCellRect which is lenient to off-range coordinates.
row
- the view row index of the cellpublic void scrollColumnToVisible(int column)
Note: this method has no precondition as it internally uses getCellRect which is lenient to off-range coordinates.
column
- the view column index of the cellpublic void scrollCellToVisible(int row, int column)
Note: this method has no precondition as it internally uses getCellRect which is lenient to off-range coordinates.
row
- the view row index of the cellcolumn
- the view column index of the cellpublic void setVisibleRowCount(int visibleRowCount)
public int getVisibleRowCount()
public Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize
in interface Scrollable
getPreferredScrollableViewportSize
in class JTable
public void packTable(int margin)
margin
- the margin to apply to each column.public void packColumn(int column, int margin)
column
- The Column index to pack in View Coordinatesmargin
- The Margin to apply to the column width.public void packColumn(int column, int margin, int max)
column
- The Column index to pack in View Coordinatesmargin
- The margin to apply to the columnmax
- The maximum width the column can be resized to. -1 mean any
size.protected void initializeColumnPreferredWidth(TableColumn column)
TableColumnExt
or prototypeValue is null
then the preferredWidth is left unmodified.
column
- TableColumn object representing view columnTableColumnExt.setPrototypeValue(java.lang.Object)
protected ComponentAdapter getComponentAdapter()
public HighlighterPipeline getHighlighters()
public void setHighlighters(HighlighterPipeline pipeline)
public void addHighlighter(Highlighter highlighter)
highlighter
- the Highlighter to add - must not be null.
NullPointerException
- if highlighter is null.public void removeHighlighter(Highlighter highlighter)
highlighter
- the highlighter to remove.public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
Component
used as a stamp to render
the specified cell. Overrides superclass version to provide support for
cell decorators.
Adjusts component orientation (guaranteed to happen before applying
Highlighters).
see - https://swingx.dev.java.net/issues/show_bug.cgi?id=145
prepareRenderer
in class JTable
renderer
- the TableCellRenderer
to preparerow
- the row of the cell to render, where 0 is the first rowcolumn
- the column of the cell to render, where 0 is the first column
Component
used as a stamp to render
the specified cellHighlighter
public Component prepareEditor(TableCellEditor editor, int row, int column)
prepareEditor
in class JTable
protected void adjustComponentOrientation(Component stamp)
stamp
- public TableCellRenderer getNewDefaultRenderer(Class columnClass)
getDefaultRenderer()
in that it returns
a new instance each time so that the renderer may be set and
customized on a particular column.
PENDING: must not return null!
columnClass
- Class of value being rendered
protected void createDefaultRenderers()
createDefaultRenderers
in class JTable
protected void createDefaultEditors()
createDefaultEditors
in class JTable
DefaultCellEditor
public void updateUI()
updateUI
in class JTable
protected void updateHighlighters()
public void setRowHeight(int rowHeight)
setRowHeight
in class JTable
public void setRowHeight(int row, int rowHeight)
setRowHeight
in class JTable
public void setRowHeightEnabled(boolean enabled)
enabled
- public boolean isRowHeightEnabled()
protected SizeSequenceMapper getRowModelMapper()
SizeSequenceMapper
protected void adminSetRowHeight(int rowHeight)
public int rowAtPoint(Point point)
rowAtPoint
in class JTable
protected JTableHeader createDefaultTableHeader()
createDefaultTableHeader
in class JTable
protected TableColumnModel createDefaultColumnModel()
createDefaultColumnModel
in class JTable
|
swingx Version 2005-08-19 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |