|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.citra.table.SortTableRenderer
com.citra.table.SortTableButtonRenderer
public class SortTableButtonRenderer
A SortTableRenderer implementation that uses JButtons in order to render the table header. This class shows the column sorting order as a number next to the column name.
Field Summary | |
---|---|
protected boolean |
showButtonPress
boolean flag that when true, the buttons are pressed when clicked. |
Constructor Summary | |
---|---|
SortTableButtonRenderer()
Constructs a SortTableButtonRenderer. |
Method Summary | |
---|---|
JButton |
getAscendingButton()
Returns the button used to render a column sorted in ascending order. |
JButton |
getDescendingButton()
Returns the button used to render a column sorted in descending order. |
JButton |
getNoSortButton()
Returns the button used to render a non-sortable column. |
boolean |
getShowButtonPress()
Returns true if the button should be pressed when clicked. |
Component |
prepareRenderer(int sortIndex,
boolean ascending,
int sortSize,
boolean isPressed,
Object value,
int column)
Prepares and returns the component used for drawing the column header according to the method's arguments. |
void |
setShowButtonPress(boolean showButtonPress)
Sets a flag that is true if the button should be pressed when clicked. |
void |
updateUI()
Called whenever the UI changes, in order to update the components used to draw the columns of the table header. |
Methods inherited from class com.citra.table.SortTableRenderer |
---|
getTableCellRendererComponent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean showButtonPress
Constructor Detail |
---|
public SortTableButtonRenderer()
Method Detail |
---|
public JButton getAscendingButton()
public JButton getDescendingButton()
public JButton getNoSortButton()
public boolean getShowButtonPress()
public Component prepareRenderer(int sortIndex, boolean ascending, int sortSize, boolean isPressed, Object value, int column)
prepareRenderer
in class SortTableRenderer
sortIndex
- the sorting order of the column. -1 indicates no sorting.ascending
- flag that is true if ascending sorting is in use, false if descending.sortSize
- the total number of sorting columns.isPressed
- flag that is true if the column is being pressed with the mouse.value
- the value of the header column.column
- the column being drawn.public void setShowButtonPress(boolean showButtonPress)
showButtonPress
- the showButtonPress flagpublic void updateUI()
updateUI
in class SortTableRenderer
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |