Package com.vaadin.client.ui.colorpicker
Class VColorPickerGrid
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.ComplexPanel
-
- com.google.gwt.user.client.ui.AbsolutePanel
-
- com.vaadin.client.ui.colorpicker.VColorPickerGrid
-
- All Implemented Interfaces:
com.google.gwt.event.dom.client.ClickHandler,com.google.gwt.event.dom.client.HasClickHandlers,com.google.gwt.event.logical.shared.HasAttachHandlers,com.google.gwt.event.shared.EventHandler,com.google.gwt.event.shared.HasHandlers,com.google.gwt.user.client.EventListener,com.google.gwt.user.client.ui.HasVisibility,com.google.gwt.user.client.ui.HasWidgets,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget,com.google.gwt.user.client.ui.IndexedPanel,com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget,com.google.gwt.user.client.ui.InsertPanel,com.google.gwt.user.client.ui.InsertPanel.ForIsWidget,com.google.gwt.user.client.ui.IsWidget,Iterable<com.google.gwt.user.client.ui.Widget>
public class VColorPickerGrid extends com.google.gwt.user.client.ui.AbsolutePanel implements com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.dom.client.HasClickHandlersClient side implementation for ColorPickerGrid.- Since:
- 7.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
-
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
-
-
Constructor Summary
Constructors Constructor Description VColorPickerGrid()Instantiates the client side component for a color picker grid.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gwt.event.shared.HandlerRegistrationaddClickHandler(com.google.gwt.event.dom.client.ClickHandler handler)intgetSelectedX()Returns currently selected x-coordinate of the grid.intgetSelectedY()Returns currently selected y-coordinate of the grid.booleanisGridLoaded()Checks whether the colors have been successfully updated at least once.voidonClick(com.google.gwt.event.dom.client.ClickEvent event)voidupdateColor(String[] changedColor, String[] changedX, String[] changedY)Updates the changed colors within the grid based on the given x- and y-coordinates.voidupdateGrid(int rowCount, int columnCount)Updates the row and column count and creates a new grid based on them.-
Methods inherited from class com.google.gwt.user.client.ui.AbsolutePanel
add, add, add, getWidgetLeft, getWidgetTop, insert, insert, insert, remove, setWidgetPosition, setWidgetPositionImpl
-
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
-
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
getWidgetIndex
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
updateGrid
public 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.For internal use only. May be renamed or removed in a future release.
- Parameters:
rowCount- how many rows the grid should havecolumnCount- how many columns the grid should have
-
updateColor
public void updateColor(String[] changedColor, String[] changedX, 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.For internal use only. May be renamed or removed in a future release.
- Parameters:
changedColor- the changed colorschangedX- the x-coordinates for the changed colorschangedY- the y-coordinates for the changed colors
-
getSelectedX
public int getSelectedX()
Returns currently selected x-coordinate of the grid.- Returns:
- the selected x-coordinate
-
getSelectedY
public int getSelectedY()
Returns currently selected y-coordinate of the grid.- Returns:
- the selected y-coordinate
-
isGridLoaded
public boolean isGridLoaded()
Checks whether the colors have been successfully updated at least once.For internal use only. May be renamed or removed in a future release.
- Returns:
trueif the colors have been successfully updated at least once,falseotherwise
-
onClick
public void onClick(com.google.gwt.event.dom.client.ClickEvent event)
- Specified by:
onClickin interfacecom.google.gwt.event.dom.client.ClickHandler
-
addClickHandler
public com.google.gwt.event.shared.HandlerRegistration addClickHandler(com.google.gwt.event.dom.client.ClickHandler handler)
- Specified by:
addClickHandlerin interfacecom.google.gwt.event.dom.client.HasClickHandlers
-
-