|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JTable com.jidesoft.navigation.NavigationTable
public class NavigationTable
NavigationTable
is a special table that is designed for the navigation purpose. It has the following
features.
NavigationTable
after the original table content is painted. However in order to prevent the cell renderer from painting the default
selection effect, we override prepareRenderer(javax.swing.table.TableCellRenderer, int, int)
to pass in
false for both isSelected and hasFocus methods when getting the renderer component from the cell renderers.
Nested Class Summary | |
---|---|
class |
NavigationTable.NavigationTableHelper
The navigation table helper class. |
Nested classes/interfaces inherited from class javax.swing.JTable |
---|
JTable.AccessibleJTable, JTable.DropLocation, 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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static String |
PROPERTY_EXPANDED_TIP
|
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 | |
---|---|
NavigationTable()
|
|
NavigationTable(int numRows,
int numColumns)
|
|
NavigationTable(Object[][] rowData,
Object[] columnNames)
|
|
NavigationTable(TableModel model)
|
|
NavigationTable(TableModel dm,
TableColumnModel cm)
|
|
NavigationTable(TableModel dm,
TableColumnModel cm,
ListSelectionModel sm)
|
|
NavigationTable(Vector<?> rowData,
Vector<?> columnNames)
|
Method Summary | |
---|---|
protected NavigationComponentHelper |
createNavigationHelper()
Creates the NavigationHelper which is a helper class that paints the rollover and the selection
effect. |
int |
getNavigationRolloverRow()
Gets the rollover row that currently has rollover effect. |
boolean |
isExpandedTip()
Checks if the ExpandedTip feature is enabled. |
protected void |
paintComponent(Graphics g)
|
Component |
prepareRenderer(TableCellRenderer renderer,
int row,
int column)
Overrides to use false for both isSelected and hasFocus parameters as in NavigationTable, we will paint the selected rows. |
void |
setExpandedTip(boolean expandedTip)
Sets the ExpandedTip flag. |
void |
setNavigationRolloverRow(int navigationRolloverRow)
Sets the rollover row. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_EXPANDED_TIP
Constructor Detail |
---|
public NavigationTable()
public NavigationTable(TableModel model)
public NavigationTable(TableModel dm, TableColumnModel cm)
public NavigationTable(TableModel dm, TableColumnModel cm, ListSelectionModel sm)
public NavigationTable(int numRows, int numColumns)
public NavigationTable(Vector<?> rowData, Vector<?> columnNames)
public NavigationTable(Object[][] rowData, Object[] columnNames)
Method Detail |
---|
protected NavigationComponentHelper createNavigationHelper()
NavigationHelper
which is a helper class that paints the rollover and the selection
effect.
By default, it creates a NavigationTableHelper instance.
protected void paintComponent(Graphics g)
paintComponent
in class JComponent
public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
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
under the event locationpublic boolean isExpandedTip()
ExpandedTipUtils
public void setExpandedTip(boolean expandedTip)
expandedTip
- true to enable the ExpandedTip feature and false to disable it. It is true by default.public int getNavigationRolloverRow()
public void setNavigationRolloverRow(int navigationRolloverRow)
navigationRolloverRow
- the row to show the rollover effect.
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |