|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.AbstractComponent
nextapp.echo.AbstractButton
nextapp.echo.Button
echopoint.table.SortableTableHeaderRenderer
public class SortableTableHeaderRenderer
Renders the table header cells for a table with a SortableTableModel. The header cells are buttons that can be pressed to sort a particular table column.
Nested Class Summary | |
---|---|
static class |
SortableTableHeaderRenderer.NestedStyleInfo
Nested public static StyleInfo class. |
Field Summary | |
---|---|
static Color |
DEFAULT_HEADER_BACKGROUND
Default Header Background Color |
static ImageReference |
defaultDownIcon
|
static ImageReference |
defaultUpIcon
|
static java.lang.String |
DOWN_ICON_CHANGED_PROPERTY
|
protected SortableTableModel |
sortableTableModel
|
protected java.util.BitSet |
sortColumnBitSet
|
static java.lang.String |
STYLE_DOWN_ICON
Down Icon Property |
static java.lang.String |
STYLE_UP_ICON
Up Icon Property |
static ImageReference |
transparentIcon
|
static java.lang.String |
UP_ICON_CHANGED_PROPERTY
|
Fields inherited from interface nextapp.echo.ToolTipSupport |
---|
TOOL_TIP_TEXT_CHANGED_PROPERTY |
Constructor Summary | |
---|---|
SortableTableHeaderRenderer(SortableTableModel sortableTableModel)
Constructs a SortableTableHeaderRenderer |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
Invoked when an action occurs. |
void |
applyStyle(Style style)
Applies the provided style to the component. |
ImageReference |
getDownIcon()
Returns the Icon used for the decending sort order |
SortableTableModel |
getSortableTableModel()
Returns the SortableTableModel in use. |
Component |
getTableCellRendererComponent(Table table,
java.lang.Object value,
int column,
int row)
Returns a component that will be rendered at the given coordinate. |
ImageReference |
getUpIcon()
Returns the Icon used for the ascending sort order |
boolean |
isColumnSorted(int columnIndex)
Returns true if the specified column is sortable. |
java.lang.Object |
set(java.lang.reflect.Field field,
java.lang.Object newValue)
Called to save the old value of a field, set in a new value and return the old value of a field. |
void |
setColumnSorted(int columnIndex,
boolean isSorted)
Controls whether a Column in the TableModel is sortable. |
void |
setDownIcon(ImageReference newDownIcon)
Sets the Icon used for the decending sort order |
void |
setSortableTableModel(SortableTableModel newModel)
Sets the SortableTableModel to use. |
void |
setUpIcon(ImageReference newUpIcon)
Sets the Icon used for the ascending sort order |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ImageReference defaultUpIcon
public static final ImageReference defaultDownIcon
public static final ImageReference transparentIcon
public static final java.lang.String STYLE_UP_ICON
public static final java.lang.String UP_ICON_CHANGED_PROPERTY
public static final java.lang.String STYLE_DOWN_ICON
public static final java.lang.String DOWN_ICON_CHANGED_PROPERTY
public static final Color DEFAULT_HEADER_BACKGROUND
protected SortableTableModel sortableTableModel
protected java.util.BitSet sortColumnBitSet
Constructor Detail |
---|
public SortableTableHeaderRenderer(SortableTableModel sortableTableModel)
SortableTableHeaderRenderer
Method Detail |
---|
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
e
- The event describing the action.public void applyStyle(Style style)
nextapp.echo.Component
style names can be used as well.
applyStyle
in interface Component
applyStyle
in class AbstractButton
style
- The style object from which to retrieve properties for this
Component
.Component.applyStyle(Style)
public ImageReference getDownIcon()
public Component getTableCellRendererComponent(Table table, java.lang.Object value, int column, int row)
getTableCellRendererComponent
in interface TableCellRenderer
table
- The table for which the component is to be generated.value
- The value for which to generate a component.column
- The column coordinate of the value in the table.row
- The row coordinate of the value in the table.
public ImageReference getUpIcon()
public void setDownIcon(ImageReference newDownIcon)
newDownIcon
- nextapp.echo.ImageReferencepublic void setUpIcon(ImageReference newUpIcon)
newUpIcon
- nextapp.echo.ImageReferencepublic boolean isColumnSorted(int columnIndex)
columnIndex
-
public void setColumnSorted(int columnIndex, boolean isSorted)
columnIndex
- - the column in questionisSorted
- - true if the column is sortable.public SortableTableModel getSortableTableModel()
public void setSortableTableModel(SortableTableModel newModel)
newModel
- - a new sortable table modelpublic java.lang.Object set(java.lang.reflect.Field field, java.lang.Object newValue) throws java.lang.Exception
ReflectionSetter
public Object set(Field f, Object newValue) throws Exception { Object oldValue = f.get(this); f.set(this,newValue); return oldValue; }
set
in interface ReflectionSetter
field
- - the field to be setnewValue
- - the new value to be set
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.NullPointerException
java.lang.Exception
ReflectionSetter.set(Field, Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |