Package com.google.gwt.cell.client
Class ButtonCellBase.DefaultAppearance<C>
- java.lang.Object
-
- com.google.gwt.cell.client.ButtonCellBase.DefaultAppearance<C>
-
- Type Parameters:
C- the type that this Cell represents
- All Implemented Interfaces:
ButtonCellBase.Appearance<C>
- Direct Known Subclasses:
TextButtonCell.DefaultAppearance
- Enclosing class:
- ButtonCellBase<C>
public static class ButtonCellBase.DefaultAppearance<C> extends java.lang.Object implements ButtonCellBase.Appearance<C>
The default implementation of theButtonCellBase.Appearance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceButtonCellBase.DefaultAppearance.ResourcesThe resources used by this appearance.static interfaceButtonCellBase.DefaultAppearance.StyleThe Styles used by this appearance.(package private) static interfaceButtonCellBase.DefaultAppearance.TemplateThe templates used by this appearance.
-
Constructor Summary
Constructors Constructor Description DefaultAppearance(SafeHtmlRenderer<C> renderer)Construct a newButtonCellBase.DefaultAppearanceusing the default styles.DefaultAppearance(SafeHtmlRenderer<C> renderer, ButtonCellBase.DefaultAppearance.Resources resources)Construct a newButtonCellBase.DefaultAppearanceusing the specified resources.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SafeHtmlRenderer<C>getRenderer()Return theSafeHtmlRendererused by this Appearance to render the contents of the button.voidonPush(Element parent)Called when the user pushes the button down.voidonUnpush(Element parent)Called when the user releases the button from being pushed.voidrender(ButtonCellBase<C> cell, Cell.Context context, C value, SafeHtmlBuilder sb)Render the button and its contents.voidsetFocus(Element parent, boolean focused)Explicitly focus/unfocus this cell.
-
-
-
Constructor Detail
-
DefaultAppearance
public DefaultAppearance(SafeHtmlRenderer<C> renderer)
Construct a newButtonCellBase.DefaultAppearanceusing the default styles.- Parameters:
renderer- theSafeHtmlRendererused to render the contents
-
DefaultAppearance
public DefaultAppearance(SafeHtmlRenderer<C> renderer, ButtonCellBase.DefaultAppearance.Resources resources)
Construct a newButtonCellBase.DefaultAppearanceusing the specified resources.- Parameters:
renderer- theSafeHtmlRendererused to render the contentsresources- the resources and styles to apply to the button
-
-
Method Detail
-
getRenderer
public SafeHtmlRenderer<C> getRenderer()
Return theSafeHtmlRendererused by this Appearance to render the contents of the button.- Returns:
- a
SafeHtmlRendererinstance
-
onPush
public void onPush(Element parent)
Description copied from interface:ButtonCellBase.AppearanceCalled when the user pushes the button down.- Specified by:
onPushin interfaceButtonCellBase.Appearance<C>- Parameters:
parent- the parent Element
-
onUnpush
public void onUnpush(Element parent)
Description copied from interface:ButtonCellBase.AppearanceCalled when the user releases the button from being pushed.- Specified by:
onUnpushin interfaceButtonCellBase.Appearance<C>- Parameters:
parent- the parent Element
-
render
public void render(ButtonCellBase<C> cell, Cell.Context context, C value, SafeHtmlBuilder sb)
Description copied from interface:ButtonCellBase.AppearanceRender the button and its contents.- Specified by:
renderin interfaceButtonCellBase.Appearance<C>- Parameters:
cell- the cell that is being renderedcontext- theCell.Contextof the cellvalue- the value that generated the contentsb- theSafeHtmlBuilderto render into
-
setFocus
public void setFocus(Element parent, boolean focused)
Description copied from interface:ButtonCellBase.AppearanceExplicitly focus/unfocus this cell.- Specified by:
setFocusin interfaceButtonCellBase.Appearance<C>- Parameters:
parent- the parent elementfocused- whether this cell should take focus or release it
-
-