C
- the button data typepublic class ButtonCellDefaultAppearance<C> extends Object implements ButtonCell.ButtonCellAppearance<C>
Default implementation of the ButtonCellAppearance.
Note: The Blue and Gray buttons.
Modifier and Type | Class and Description |
---|---|
static interface |
ButtonCellDefaultAppearance.ButtonCellResources |
static interface |
ButtonCellDefaultAppearance.ButtonCellStyle |
static interface |
ButtonCellDefaultAppearance.ButtonCellTemplates |
Modifier and Type | Field and Description |
---|---|
protected Frame |
frame |
protected int |
heightOffset |
protected ButtonCellDefaultAppearance.ButtonCellResources |
resources |
protected ButtonCellDefaultAppearance.ButtonCellStyle |
style |
protected ButtonCellDefaultAppearance.ButtonCellTemplates |
templates |
Constructor and Description |
---|
ButtonCellDefaultAppearance()
Creates a button cell base appearance.
|
ButtonCellDefaultAppearance(ButtonCellDefaultAppearance.ButtonCellResources resources)
Creates a button cell base appearance using the specified resources and templates.
|
ButtonCellDefaultAppearance(ButtonCellDefaultAppearance.ButtonCellResources resources,
ButtonCellDefaultAppearance.ButtonCellTemplates templates,
Frame frame)
Creates a button cell base appearance using the specified resources and templates.
|
Modifier and Type | Method and Description |
---|---|
XElement |
getButtonElement(XElement parent) |
XElement |
getFocusElement(XElement parent) |
void |
onFocus(XElement parent,
boolean focused) |
void |
onOver(XElement parent,
boolean over) |
void |
onPress(XElement parent,
boolean pressed) |
void |
onToggle(XElement parent,
boolean pressed) |
void |
render(ButtonCell<C> cell,
Context context,
C value,
SafeHtmlBuilder sb) |
protected void |
writeIcon(SafeHtmlBuilder builder,
ImageResource icon,
int height) |
protected void |
writeValue(SafeHtmlBuilder builder,
SafeHtml value,
int width,
int height) |
protected final Frame frame
protected final ButtonCellDefaultAppearance.ButtonCellResources resources
protected final ButtonCellDefaultAppearance.ButtonCellStyle style
protected final ButtonCellDefaultAppearance.ButtonCellTemplates templates
protected int heightOffset
public ButtonCellDefaultAppearance()
public ButtonCellDefaultAppearance(ButtonCellDefaultAppearance.ButtonCellResources resources)
resources
- the button cell resourcespublic ButtonCellDefaultAppearance(ButtonCellDefaultAppearance.ButtonCellResources resources, ButtonCellDefaultAppearance.ButtonCellTemplates templates, Frame frame)
resources
- the button cell resourcestemplates
- the templatesframe
- the framepublic XElement getButtonElement(XElement parent)
getButtonElement
in interface ButtonCell.ButtonCellAppearance<C>
public XElement getFocusElement(XElement parent)
getFocusElement
in interface ButtonCell.ButtonCellAppearance<C>
public void onFocus(XElement parent, boolean focused)
onFocus
in interface ButtonCell.ButtonCellAppearance<C>
public void onOver(XElement parent, boolean over)
onOver
in interface ButtonCell.ButtonCellAppearance<C>
public void onPress(XElement parent, boolean pressed)
onPress
in interface ButtonCell.ButtonCellAppearance<C>
public void onToggle(XElement parent, boolean pressed)
onToggle
in interface ButtonCell.ButtonCellAppearance<C>
public void render(ButtonCell<C> cell, Context context, C value, SafeHtmlBuilder sb)
render
in interface ButtonCell.ButtonCellAppearance<C>
protected void writeIcon(SafeHtmlBuilder builder, ImageResource icon, int height)
protected void writeValue(SafeHtmlBuilder builder, SafeHtml value, int width, int height)
Copyright © 2018. All rights reserved.