|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.grid.SortTableHeaderRenderer
public class SortTableHeaderRenderer
The SortTableHeaderRenderer will consider \n in headings and display them on multiple lines.
'Date of\nbirth'
will be displayed on two lines. 'Date of' on the first, birth on the second.
'Date of birth' will be displayed
on one lines,
Nested Class Summary | |
---|---|
static interface |
SortTableHeaderRenderer.SortArrow
An interface for SortArrow, the arrow which is used to display on the table header to indicate sort direction and sort index. |
Field Summary | |
---|---|
protected JPanel |
_headerPanel
|
protected com.jidesoft.grid.SortTableHeaderRenderer.SortPanel |
_sortPanel
|
protected JPanel |
_titlePanel
|
Constructor Summary | |
---|---|
SortTableHeaderRenderer()
|
|
SortTableHeaderRenderer(int alignment)
|
Method Summary | |
---|---|
protected JLabel |
createLabel(Icon icon)
|
protected JLabel |
createLabel(String text)
|
protected SortTableHeaderRenderer.SortArrow |
createSortArrow()
Creates the component to display the sort arrow. |
int |
getAlignment()
Get the alignment of the header renderer. |
int |
getDefaultHeaderWidth(String title)
Get an approximation of the width of the title based on the width in characters. |
Component |
getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
|
protected void |
initComponents()
Creation of the header panel. |
boolean |
isSortArrowVisible()
Get the flag indicating if the sort arrow is visible in the renderer while sorting. |
void |
setAlignment(int alignment)
Set the alignment of the header renderer. |
void |
setSortArrowVisible(boolean sortArrowVisible)
Set the flag indicating if the sort arrow is visible in the renderer while sorting. |
void |
updateSortPanel(JTable table,
int column)
Update the sort parameters for this component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected JPanel _headerPanel
protected JPanel _titlePanel
protected com.jidesoft.grid.SortTableHeaderRenderer.SortPanel _sortPanel
Constructor Detail |
---|
public SortTableHeaderRenderer()
public SortTableHeaderRenderer(int alignment)
Method Detail |
---|
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
getTableCellRendererComponent
in interface TableCellRenderer
public int getDefaultHeaderWidth(String title)
title
- the title.
protected void initComponents()
protected JLabel createLabel(Icon icon)
protected JLabel createLabel(String text)
public void updateSortPanel(JTable table, int column)
table
- the tablecolumn
- The column as display (0 leftmost)public boolean isSortArrowVisible()
public void setSortArrowVisible(boolean sortArrowVisible)
sortArrowVisible
- the flagisSortArrowVisible()
public int getAlignment()
javax.swing.SwingConstants.CENTER
. You could set it to other alignments if
you want.
public void setAlignment(int alignment)
alignment
- the alignmentgetAlignment()
protected SortTableHeaderRenderer.SortArrow createSortArrow()
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |