com.vaadin.client.ui.colorpicker
Class VColorPickerGrid

java.lang.Object
  extended by AbsolutePanel
      extended by com.vaadin.client.ui.colorpicker.VColorPickerGrid

public class VColorPickerGrid
extends AbsolutePanel

Client side implementation for ColorPickerGrid.

Since:
7.0.0

Constructor Summary
VColorPickerGrid()
          Instantiates the client side component for a color picker grid.
 
Method Summary
 com.google.gwt.event.shared.HandlerRegistration addClickHandler(ClickHandler handler)
           
protected  int getSelectedX()
          Returns currently selected x-coordinate of the grid.
protected  int getSelectedY()
          Returns currently selected y-coordinate of the grid.
protected  boolean isGridLoaded()
          Returns true if the colors have been successfully updated at least once, false otherwise.
 void onClick(ClickEvent event)
           
protected  void updateColor(java.lang.String[] changedColor, java.lang.String[] changedX, java.lang.String[] changedY)
          Updates the changed colors within the grid based on the given x- and y-coordinates.
protected  void updateGrid(int rowCount, int columnCount)
          Updates the row and column count and creates a new grid based on them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VColorPickerGrid

public VColorPickerGrid()
Instantiates the client side component for a color picker grid.

Method Detail

updateGrid

protected void updateGrid(int rowCount,
                          int columnCount)
Updates the row and column count and creates a new grid based on them. The new grid replaces the old grid if one existed.

Parameters:
rowCount -
columnCount -

updateColor

protected void updateColor(java.lang.String[] changedColor,
                           java.lang.String[] changedX,
                           java.lang.String[] changedY)
Updates the changed colors within the grid based on the given x- and y-coordinates. Nothing happens if any of the parameters is null or the parameter lengths don't match.

Parameters:
changedColor -
changedX -
changedY -

getSelectedX

protected int getSelectedX()
Returns currently selected x-coordinate of the grid.


getSelectedY

protected int getSelectedY()
Returns currently selected y-coordinate of the grid.


isGridLoaded

protected boolean isGridLoaded()
Returns true if the colors have been successfully updated at least once, false otherwise.


onClick

public void onClick(ClickEvent event)

addClickHandler

public com.google.gwt.event.shared.HandlerRegistration addClickHandler(ClickHandler handler)


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.