public class ColorPaletteBaseAppearance extends Object implements ColorPaletteCell.ColorPaletteAppearance
| Modifier and Type | Class and Description |
|---|---|
static interface |
ColorPaletteBaseAppearance.BaseColorPaletteTemplate |
static interface |
ColorPaletteBaseAppearance.ColorPaletteResources |
static interface |
ColorPaletteBaseAppearance.ColorPaletteStyle |
| Constructor and Description |
|---|
ColorPaletteBaseAppearance(ColorPaletteBaseAppearance.ColorPaletteResources resources,
ColorPaletteBaseAppearance.BaseColorPaletteTemplate template) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAboveColor(XElement parent,
String value)
Gets the color of the element above the specified element.
|
String |
getBelowColor(XElement parent,
String value)
Gets the color of the element below the specified element.
|
XElement |
getChildElement(XElement parent,
String color)
Gets the child element with the specified color.
|
String |
getClickedColor(XElement parent,
Element target)
Gets the color associated with the specified child element.
|
static int |
getCol(Element a) |
Element |
getColorElement(XElement parent,
Element target)
Gets the color element associated with the specified child element.
|
NodeList<Element> |
getColorElements(XElement parent)
Gets the list of color elements for the specified parent.
|
int |
getColumnCount() |
String |
getLeftColor(XElement parent,
String value)
Gets the color of the element to the left of the specified element.
|
String |
getRightColor(XElement parent,
String value)
Gets the color of the element to the right of the specified element.
|
static int |
getRow(Element a) |
int |
getRowCount(XElement parent) |
void |
hover(XElement parent,
Element target,
boolean entering)
Modifies the appearance to indicate whether the specified child color
element is being hovered over.
|
void |
onMouseOut(XElement parent,
Element target,
NativeEvent event)
Modifies the appearance to indicate that the mouse has moved off the
specified child color element.
|
void |
onMouseOver(XElement parent,
Element target,
NativeEvent event)
Modifies the appearance to indicate that the mouse has moved over the
specified child color element.
|
void |
render(Cell.Context context,
String value,
String[] colors,
String[] labels,
SafeHtmlBuilder result)
Renders the appearance of a color palette cell as HTML into a
SafeHtmlBuilder, suitable for passing to
Element.setInnerHTML(String) on a container element. |
String |
stripColorName(String className) |
public ColorPaletteBaseAppearance(ColorPaletteBaseAppearance.ColorPaletteResources resources, ColorPaletteBaseAppearance.BaseColorPaletteTemplate template)
public static int getCol(Element a)
public static int getRow(Element a)
public String getAboveColor(XElement parent, String value)
ColorPaletteCell.ColorPaletteAppearancegetAboveColor in interface ColorPaletteCell.ColorPaletteAppearanceparent - the parent of the specified elementvalue - the color of the specified elementpublic String getBelowColor(XElement parent, String value)
ColorPaletteCell.ColorPaletteAppearancegetBelowColor in interface ColorPaletteCell.ColorPaletteAppearanceparent - the parent of the specified elementvalue - the color of the specified elementpublic XElement getChildElement(XElement parent, String color)
ColorPaletteCell.ColorPaletteAppearancegetChildElement in interface ColorPaletteCell.ColorPaletteAppearanceparent - the parent of the child elementcolor - the colorpublic String getClickedColor(XElement parent, Element target)
ColorPaletteCell.ColorPaletteAppearancegetClickedColor in interface ColorPaletteCell.ColorPaletteAppearanceparent - the parenttarget - the childpublic Element getColorElement(XElement parent, Element target)
ColorPaletteCell.ColorPaletteAppearancegetColorElement in interface ColorPaletteCell.ColorPaletteAppearanceparent - the parenttarget - the childpublic NodeList<Element> getColorElements(XElement parent)
ColorPaletteCell.ColorPaletteAppearancegetColorElements in interface ColorPaletteCell.ColorPaletteAppearanceparent - the parentpublic int getColumnCount()
public String getLeftColor(XElement parent, String value)
ColorPaletteCell.ColorPaletteAppearancegetLeftColor in interface ColorPaletteCell.ColorPaletteAppearanceparent - the parent of the specified elementvalue - the color of the specified elementpublic String getRightColor(XElement parent, String value)
ColorPaletteCell.ColorPaletteAppearancegetRightColor in interface ColorPaletteCell.ColorPaletteAppearanceparent - the parent of the specified elementvalue - the color of the specified elementpublic int getRowCount(XElement parent)
public void hover(XElement parent, Element target, boolean entering)
ColorPaletteCell.ColorPaletteAppearancehover in interface ColorPaletteCell.ColorPaletteAppearanceparent - the parenttarget - the childentering - true to indicate the hover has just startedpublic void onMouseOut(XElement parent, Element target, NativeEvent event)
ColorPaletteCell.ColorPaletteAppearanceonMouseOut in interface ColorPaletteCell.ColorPaletteAppearanceparent - the parenttarget - the childevent - the browser event associated with mousing outpublic void onMouseOver(XElement parent, Element target, NativeEvent event)
ColorPaletteCell.ColorPaletteAppearanceonMouseOver in interface ColorPaletteCell.ColorPaletteAppearanceparent - the parenttarget - the childevent - the browser event associated with mousing overpublic void render(Cell.Context context, String value, String[] colors, String[] labels, SafeHtmlBuilder result)
ColorPaletteCell.ColorPaletteAppearanceSafeHtmlBuilder, suitable for passing to
Element.setInnerHTML(String) on a container element.render in interface ColorPaletteCell.ColorPaletteAppearancecontext - contains information about context of the elementvalue - the color of the currently selected elementcolors - the colors, each consisting of a six digit hex value in
RRGGBB formatlabels - the color names, in the same order as colorsresult - receives the rendered appearanceCopyright © 2012. All Rights Reserved.