EchoPoint
1.0

echopoint.table
Class NonSortableTableHeaderRenderer

java.lang.Object
  extended bynextapp.echo.Component
      extended bynextapp.echo.AbstractButton
          extended bynextapp.echo.Button
              extended byechopoint.table.SortableTableHeaderRenderer
                  extended byechopoint.table.NonSortableTableHeaderRenderer
All Implemented Interfaces:
nextapp.echo.event.ActionListener, java.util.EventListener, ReflectionSetter, java.io.Serializable, nextapp.echo.table.TableCellRenderer, nextapp.echo.ToolTipSupport

public class NonSortableTableHeaderRenderer
extends SortableTableHeaderRenderer

Renders the table header cells for a table with a SortableTableModel. The header cells are labels and cannot be be pressed to sort a particular table column.

Use this derived SortableTableHeaderRenderer to provide a header for a SortableTable that CANNOT be sorted.

This is a convenience class so that you dont have to set the "default" renderer for each column and also so that the SortableTable class can have a type safe header renderer.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class echopoint.table.SortableTableHeaderRenderer
SortableTableHeaderRenderer.NestedStyleInfo
 
Field Summary
 
Fields inherited from class echopoint.table.SortableTableHeaderRenderer
DEFAULT_HEADER_BACKGROUND, defaultDownIcon, defaultUpIcon, DOWN_ICON_CHANGED_PROPERTY, STYLE_DOWN_ICON, STYLE_UP_ICON, transparentIcon, UP_ICON_CHANGED_PROPERTY
 
Fields inherited from class nextapp.echo.AbstractButton
ACTION_COMMAND_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, ICON_TEXT_MARGIN_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, ROLLOVER_BACKGROUND_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_FONT_CHANGED_PROPERTY, ROLLOVER_FOREGROUND_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, STYLE_HORIZONTAL_ALIGNMENT, STYLE_HORIZONTAL_TEXT_POSITION, STYLE_ICON_TEXT_MARGIN, STYLE_ROLLOVER_BACKGROUND, STYLE_ROLLOVER_ENABLED, STYLE_ROLLOVER_FONT, STYLE_ROLLOVER_FOREGROUND, STYLE_VERTICAL_ALIGNMENT, STYLE_VERTICAL_TEXT_POSITION, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
 
Fields inherited from class nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, listenerList, LOCALE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Fields inherited from interface nextapp.echo.ToolTipSupport
TOOL_TIP_TEXT_CHANGED_PROPERTY
 
Constructor Summary
NonSortableTableHeaderRenderer(SortableTableModel sortableTableModel)
          Constructs a NonSortableTableHeaderRenderer wih the given model
 
Method Summary
 void actionPerformed(nextapp.echo.event.ActionEvent e)
          Invoked when an action occurs.
 void applyStyle(nextapp.echo.Style style)
          Applies the provided style to the component.
 nextapp.echo.Component getTableCellRendererComponent(nextapp.echo.Table table, java.lang.Object value, int column, int row)
          Returns a component that will be rendered at the given coordinate.
 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.
 
Methods inherited from class echopoint.table.SortableTableHeaderRenderer
getDownIcon, getSortableTableModel, getUpIcon, isColumnSorted, setColumnSorted, setDownIcon, setSortableTableModel, setUpIcon
 
Methods inherited from class nextapp.echo.AbstractButton
addActionListener, addChangeListener, addItemListener, doAction, fireActionPerformed, fireItemStateChanged, fireStateChanged, getActionCommand, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextMargin, getModel, getRolloverBackground, getRolloverFont, getRolloverForeground, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getText, getToolTipText, getVerticalAlignment, getVerticalTextPosition, hasActionListeners, isRolloverEnabled, isSelected, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextMargin, setModel, setRolloverBackground, setRolloverEnabled, setRolloverFont, setRolloverForeground, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setToolTipText, setVerticalAlignment, setVerticalTextPosition
 
Methods inherited from class nextapp.echo.Component
add, add, addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getLocale, getParent, indexOf, init, isAncestorOf, isEnabled, isRegistered, isShowing, isVisible, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setEnabled, setFont, setForeground, setIdentifier, setLocale, setVisible, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonSortableTableHeaderRenderer

public NonSortableTableHeaderRenderer(SortableTableModel sortableTableModel)
Constructs a NonSortableTableHeaderRenderer wih the given model

Method Detail

actionPerformed

public void actionPerformed(nextapp.echo.event.ActionEvent e)
Invoked when an action occurs. Does nothing in particular.

Specified by:
actionPerformed in interface nextapp.echo.event.ActionListener
Overrides:
actionPerformed in class SortableTableHeaderRenderer
Parameters:
e - The event describing the action.

applyStyle

public void applyStyle(nextapp.echo.Style style)
Applies the provided style to the component. The base nextapp.echo.Component style names can be used as well.

Overrides:
applyStyle in class SortableTableHeaderRenderer

getTableCellRendererComponent

public nextapp.echo.Component getTableCellRendererComponent(nextapp.echo.Table table,
                                                            java.lang.Object value,
                                                            int column,
                                                            int row)
Returns a component that will be rendered at the given coordinate. This is a label that is built using the current parameters of the cell renderer, which is itself a label.

Specified by:
getTableCellRendererComponent in interface nextapp.echo.table.TableCellRenderer
Overrides:
getTableCellRendererComponent in class SortableTableHeaderRenderer
Parameters:
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.
Returns:
A component representation of the value. This component must be unique. Returning a single instance of a component across multiple calls to this method will result in undefined behavior.

set

public java.lang.Object set(java.lang.reflect.Field field,
                            java.lang.Object newValue)
                     throws java.lang.Exception
Description copied from interface: ReflectionSetter
Called to save the old value of a field, set in a new value and return the old value of a field. This interface allows a field set operation to be "delegated" back into the class that has permission to perform the field set.

 public Object set(Field f, Object newValue) throws Exception {
      Object oldValue = f.get(this);
      f.set(this,newValue);
      return oldValue;
 }
 

Specified by:
set in interface ReflectionSetter
Overrides:
set in class SortableTableHeaderRenderer
Throws:
java.lang.Exception
See Also:
ReflectionSetter.set(Field, Object)

EchoPoint
1.0