|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.util.LockableImpl
com.arsdigita.cms.ui.util.DefaultTableCellRenderer
The default renderer for table cells. This renderer is used by the
Table
component for rendering the table
headers and cells if no other renderer is specified.
This renderer can operate in two different modes: active
and inactive mode. In inactive mode, all objects are rendered
by converting them to a string and enclosing that string in a Label
. If the renderer is in active mode, this
label is further enclosed in a control link. When the user clicks on
this link, the table will fire an TableActionEvent
whose
getKey()
and getColumn()
method return the
values of the key
and column
parameters that
were passed into getComponent
.
In a nutshell, an active renderer will let the user click a link
that causes a TableActionEvent
for the corresponding cell,
while an inactive renderer will display the values just as strings, thus
making it impossible for the user to cause such an event.
Table
,
TableActionEvent
Field Summary |
Fields inherited from interface com.arsdigita.bebop.table.TableCellRenderer |
versionId |
Fields inherited from interface com.arsdigita.util.Lockable |
versionId |
Constructor Summary | |
DefaultTableCellRenderer()
Creates a new table cell renderer. |
|
DefaultTableCellRenderer(boolean active)
Creates a new table cell renderer. |
Method Summary | |
com.arsdigita.bebop.Component |
getComponent(com.arsdigita.bebop.Table table,
com.arsdigita.bebop.PageState state,
Object value,
boolean isSelected,
Object key,
int row,
int column)
Return the component that should be used to render the given value . |
boolean |
isActive()
Return true if the renderer is in active mode. |
void |
setActive(boolean v)
Set the renderer to active or inactive mode. |
Methods inherited from class com.arsdigita.util.LockableImpl |
isLocked, lock |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultTableCellRenderer()
public DefaultTableCellRenderer(boolean active)
active
argument
specifies whether the renderer should be active or not.
active
- true
if the renderer should generate links
instead of just static labels.Method Detail |
public final boolean isActive()
true
if the renderer is in active mode. A
rendererin active mode will enclose the objects it renders in links
that, when clicked, will cause the containing table to fire a
TableActionEvent
.
true
if the renderer is in active mode.public void setActive(boolean v)
v
- true
if the renderer should operate in active
mode.public com.arsdigita.bebop.Component getComponent(com.arsdigita.bebop.Table table, com.arsdigita.bebop.PageState state, Object value, boolean isSelected, Object key, int row, int column)
value
. Returns a Label
if the
renderer is active, and a ControlLink
if
the renderer is inactive.
getComponent
in interface com.arsdigita.bebop.table.TableCellRenderer
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |