C
- the type that this Cell representspublic static class ButtonCellBase.DefaultAppearance<C> extends Object implements ButtonCellBase.Appearance<C>
ButtonCellBase.Appearance
.Modifier and Type | Class and Description |
---|---|
static interface |
ButtonCellBase.DefaultAppearance.Resources
The resources used by this appearance.
|
static interface |
ButtonCellBase.DefaultAppearance.Style
The Styles used by this appearance.
|
Constructor and Description |
---|
DefaultAppearance(SafeHtmlRenderer<C> renderer)
Construct a new
ButtonCellBase.DefaultAppearance using the default styles. |
DefaultAppearance(SafeHtmlRenderer<C> renderer,
ButtonCellBase.DefaultAppearance.Resources resources)
Construct a new
ButtonCellBase.DefaultAppearance using the specified resources. |
Modifier and Type | Method and Description |
---|---|
SafeHtmlRenderer<C> |
getRenderer()
Return the
SafeHtmlRenderer used by this Appearance to render the
contents of the button. |
void |
onPush(Element parent)
Called when the user pushes the button down.
|
void |
onUnpush(Element parent)
Called when the user releases the button from being pushed.
|
void |
render(ButtonCellBase<C> cell,
Cell.Context context,
C value,
SafeHtmlBuilder sb)
Render the button and its contents.
|
void |
setFocus(Element parent,
boolean focused)
Explicitly focus/unfocus this cell.
|
public DefaultAppearance(SafeHtmlRenderer<C> renderer)
ButtonCellBase.DefaultAppearance
using the default styles.renderer
- the SafeHtmlRenderer
used to render the contentspublic DefaultAppearance(SafeHtmlRenderer<C> renderer, ButtonCellBase.DefaultAppearance.Resources resources)
ButtonCellBase.DefaultAppearance
using the specified resources.renderer
- the SafeHtmlRenderer
used to render the contentsresources
- the resources and styles to apply to the buttonpublic SafeHtmlRenderer<C> getRenderer()
SafeHtmlRenderer
used by this Appearance to render the
contents of the button.SafeHtmlRenderer
instancepublic void onPush(Element parent)
ButtonCellBase.Appearance
onPush
in interface ButtonCellBase.Appearance<C>
parent
- the parent Elementpublic void onUnpush(Element parent)
ButtonCellBase.Appearance
onUnpush
in interface ButtonCellBase.Appearance<C>
parent
- the parent Elementpublic void render(ButtonCellBase<C> cell, Cell.Context context, C value, SafeHtmlBuilder sb)
ButtonCellBase.Appearance
render
in interface ButtonCellBase.Appearance<C>
cell
- the cell that is being renderedcontext
- the Context
of the cellvalue
- the value that generated the contentsb
- the SafeHtmlBuilder
to render intopublic void setFocus(Element parent, boolean focused)
ButtonCellBase.Appearance
setFocus
in interface ButtonCellBase.Appearance<C>
parent
- the parent elementfocused
- whether this cell should take focus or release itCopyright © 2018. All rights reserved.