com.arsdigita.bebop.list
Class DefaultListCellRenderer
java.lang.Object
com.arsdigita.bebop.list.DefaultListCellRenderer
- All Implemented Interfaces:
- ListCellRenderer
- Direct Known Subclasses:
- PropertyEditor.IdentityCellRenderer
- public class DefaultListCellRenderer
- extends Object
- implements ListCellRenderer
The default renderer for list items in a List
. Used by the List
component if no renderer is given
explicitly.
- Version:
- $Id: //core-platform/dev/src/com/arsdigita/bebop/list/DefaultListCellRenderer.java#8 $
- Author:
- David Lutterkort
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
versionId
public static final String versionId
- See Also:
- Constant Field Values
DefaultListCellRenderer
public DefaultListCellRenderer()
getComponent
public Component getComponent(List list,
PageState state,
Object value,
String key,
int index,
boolean isSelected)
- Return a component that has been configured to display
the specified value. If
isSelected
is true, returns a
bolded Label
containing value.toString()
. If
isSelected
is not true, returns a
ControlLink
labelled with
value.toString()
. When the user clicks on the link, that
item becomes selected.
- Specified by:
getComponent
in interface ListCellRenderer
- Parameters:
list
- the List
in which this item is being displayed.state
- represents the state of the current request.value
- the value returned by
list.getModel(state).getElement()
key
- the value returned by
list.getModel(state).getKey()
index
- the number of the item in the listisSelected
- true is the item is selected
- Returns:
- the component used to generate the output for the list item
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC