com.sencha.gxt.theme.base.client.colorpalette
Class ColorPaletteBaseAppearance

java.lang.Object
  extended by com.sencha.gxt.theme.base.client.colorpalette.ColorPaletteBaseAppearance
All Implemented Interfaces:
ColorPaletteCell.ColorPaletteAppearance
Direct Known Subclasses:
BlueColorPaletteAppearance

public abstract class ColorPaletteBaseAppearance
extends java.lang.Object
implements ColorPaletteCell.ColorPaletteAppearance


Nested Class Summary
static interface ColorPaletteBaseAppearance.BaseColorPaletteTemplate
           
static interface ColorPaletteBaseAppearance.ColorPaletteResources
           
static interface ColorPaletteBaseAppearance.ColorPaletteStyle
           
 
Constructor Summary
ColorPaletteBaseAppearance(ColorPaletteBaseAppearance.ColorPaletteResources resources, ColorPaletteBaseAppearance.BaseColorPaletteTemplate template)
           
 
Method Summary
 java.lang.String getAboveColor(XElement parent, java.lang.String value)
          Gets the color of the element above the specified element.
 java.lang.String getBelowColor(XElement parent, java.lang.String value)
          Gets the color of the element below the specified element.
 XElement getChildElement(XElement parent, java.lang.String color)
          Gets the child element with the specified color.
 java.lang.String getClickedColor(XElement parent, Element target)
          Gets the color associated with the specified child element.
 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()
           
 java.lang.String getLeftColor(XElement parent, java.lang.String value)
          Gets the color of the element to the left of the specified element.
 java.lang.String getRightColor(XElement parent, java.lang.String value)
          Gets the color of the element to the right of the specified element.
 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, java.lang.String value, java.lang.String[] colors, java.lang.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.
 void setColumnCount(int columnCount)
           
 java.lang.String stripColorName(java.lang.String className)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorPaletteBaseAppearance

public ColorPaletteBaseAppearance(ColorPaletteBaseAppearance.ColorPaletteResources resources,
                                  ColorPaletteBaseAppearance.BaseColorPaletteTemplate template)
Method Detail

getAboveColor

public java.lang.String getAboveColor(XElement parent,
                                      java.lang.String value)
Description copied from interface: ColorPaletteCell.ColorPaletteAppearance
Gets the color of the element above the specified element. The element is specified by its parent and color.

Specified by:
getAboveColor in interface ColorPaletteCell.ColorPaletteAppearance
Parameters:
parent - the parent of the specified element
value - the color of the specified element
Returns:
the color of the element above the specified element

getBelowColor

public java.lang.String getBelowColor(XElement parent,
                                      java.lang.String value)
Description copied from interface: ColorPaletteCell.ColorPaletteAppearance
Gets the color of the element below the specified element. The element is specified by its parent and color.

Specified by:
getBelowColor in interface ColorPaletteCell.ColorPaletteAppearance
Parameters:
parent - the parent of the specified element
value - the color of the specified element
Returns:
the color of the element below the specified element

getChildElement

public XElement getChildElement(XElement parent,
                                java.lang.String color)
Description copied from interface: ColorPaletteCell.ColorPaletteAppearance
Gets the child element with the specified color.

Specified by:
getChildElement in interface ColorPaletteCell.ColorPaletteAppearance
Parameters:
parent - the parent of the child element
color - the color
Returns:
the child element with the specified color

getClickedColor

public java.lang.String getClickedColor(XElement parent,
                                        Element target)
Description copied from interface: ColorPaletteCell.ColorPaletteAppearance
Gets the color associated with the specified child element.

Specified by:
getClickedColor in interface ColorPaletteCell.ColorPaletteAppearance
Parameters:
parent - the parent
target - the child
Returns:
the color of the child element

getColorElement

public Element getColorElement(XElement parent,
                               Element target)
Description copied from interface: ColorPaletteCell.ColorPaletteAppearance
Gets the color element associated with the specified child element.

Specified by:
getColorElement in interface ColorPaletteCell.ColorPaletteAppearance
Parameters:
parent - the parent
target - the child
Returns:
the color element of the child element

getColorElements

public NodeList<Element> getColorElements(XElement parent)
Description copied from interface: ColorPaletteCell.ColorPaletteAppearance
Gets the list of color elements for the specified parent.

Specified by:
getColorElements in interface ColorPaletteCell.ColorPaletteAppearance
Parameters:
parent - the parent
Returns:
a list of color elements for the parent

getColumnCount

public int getColumnCount()

getLeftColor

public java.lang.String getLeftColor(XElement parent,
                                     java.lang.String value)
Description copied from interface: ColorPaletteCell.ColorPaletteAppearance
Gets the color of the element to the left of the specified element. The element is specified by its parent and color.

Specified by:
getLeftColor in interface ColorPaletteCell.ColorPaletteAppearance
Parameters:
parent - the parent of the specified element
value - the color of the specified element
Returns:
the color of the element to the left of the specified element

getRightColor

public java.lang.String getRightColor(XElement parent,
                                      java.lang.String value)
Description copied from interface: ColorPaletteCell.ColorPaletteAppearance
Gets the color of the element to the right of the specified element. The element is specified by its parent and color.

Specified by:
getRightColor in interface ColorPaletteCell.ColorPaletteAppearance
Parameters:
parent - the parent of the specified element
value - the color of the specified element
Returns:
the color of the element to the right of the specified element

getRowCount

public int getRowCount(XElement parent)

hover

public void hover(XElement parent,
                  Element target,
                  boolean entering)
Description copied from interface: ColorPaletteCell.ColorPaletteAppearance
Modifies the appearance to indicate whether the specified child color element is being hovered over.

Specified by:
hover in interface ColorPaletteCell.ColorPaletteAppearance
Parameters:
parent - the parent
target - the child
entering - true to indicate the hover has just started

onMouseOut

public void onMouseOut(XElement parent,
                       Element target,
                       NativeEvent event)
Description copied from interface: ColorPaletteCell.ColorPaletteAppearance
Modifies the appearance to indicate that the mouse has moved off the specified child color element.

Specified by:
onMouseOut in interface ColorPaletteCell.ColorPaletteAppearance
Parameters:
parent - the parent
target - the child
event - the browser event associated with mousing out

onMouseOver

public void onMouseOver(XElement parent,
                        Element target,
                        NativeEvent event)
Description copied from interface: ColorPaletteCell.ColorPaletteAppearance
Modifies the appearance to indicate that the mouse has moved over the specified child color element.

Specified by:
onMouseOver in interface ColorPaletteCell.ColorPaletteAppearance
Parameters:
parent - the parent
target - the child
event - the browser event associated with mousing over

render

public void render(Cell.Context context,
                   java.lang.String value,
                   java.lang.String[] colors,
                   java.lang.String[] labels,
                   SafeHtmlBuilder result)
Description copied from interface: ColorPaletteCell.ColorPaletteAppearance
Renders the appearance of a color palette cell as HTML into a SafeHtmlBuilder, suitable for passing to Element.setInnerHTML(String) on a container element.

Specified by:
render in interface ColorPaletteCell.ColorPaletteAppearance
Parameters:
context - contains information about context of the element
value - the color of the currently selected element
colors - the colors, each consisting of a six digit hex value in RRGGBB format
labels - the color names, in the same order as colors
result - receives the rendered appearance

setColumnCount

public void setColumnCount(int columnCount)

stripColorName

public java.lang.String stripColorName(java.lang.String className)


Copyright © 2012. All Rights Reserved.