Class RatingInputWidget
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Composite
-
- de.knightsoftnet.mtwidgets.client.ui.widget.RatingInputWidget
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers,com.google.gwt.event.logical.shared.HasValueChangeHandlers<Integer>,com.google.gwt.event.shared.HasHandlers,com.google.gwt.user.client.EventListener,com.google.gwt.user.client.TakesValue<Integer>,com.google.gwt.user.client.ui.Focusable,com.google.gwt.user.client.ui.HasValue<Integer>,com.google.gwt.user.client.ui.HasVisibility,com.google.gwt.user.client.ui.IsRenderable,com.google.gwt.user.client.ui.IsWidget,HasValidationMessageElement<Integer,ValueBoxEditor<Integer>>,org.gwtproject.editor.client.Editor<Integer>,org.gwtproject.editor.client.HasEditorErrors<Integer>,org.gwtproject.editor.client.IsEditor<ValueBoxEditor<Integer>>,org.gwtproject.editor.client.TakesValue<Integer>
public class RatingInputWidget extends com.google.gwt.user.client.ui.Composite implements com.google.gwt.user.client.ui.HasValue<Integer>, org.gwtproject.editor.client.TakesValue<Integer>, com.google.gwt.user.client.ui.Focusable, HasValidationMessageElement<Integer,ValueBoxEditor<Integer>>
input field for star ratings.- Author:
- Manfred Tremmel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceRatingInputWidget.ResourcesA ClientBundle that provides images and style sheets for the decorator.
-
Constructor Summary
Constructors Constructor Description RatingInputWidget(int max, String idBase)default constructor.RatingInputWidget(int max, String idBase, RatingInputWidget.Resources presource)constructor with styling information.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gwt.event.shared.HandlerRegistrationaddValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<Integer> phandler)ValueBoxEditor<Integer>asEditor()protected voidensureDomEventHandlers()protected static RatingInputWidget.ResourcesgetDefaultResources()get default resource, if not set, create one.intgetTabIndex()com.google.gwt.user.client.ui.HTMLPanelgetValidationMessageElement()get validation message element.IntegergetValue()voidsetAccessKey(char pkey)voidsetCustomValidity(String message)set custom validity value.voidsetFocus(boolean pfocused)voidsetTabIndex(int pindex)voidsetTitle(String title)set title of element.voidsetValidationMessageElement(com.google.gwt.user.client.ui.HTMLPanel pelement)set validation message element.voidsetValue(Integer pvalue)voidsetValue(Integer pvalue, boolean pfireEvents)-
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, 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, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, 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 de.knightsoftnet.mtwidgets.client.ui.widget.features.HasValidationMessageElement
editorErrorMatches, showErrors, showErrors
-
-
-
-
Constructor Detail
-
RatingInputWidget
@UiConstructor public RatingInputWidget(int max, String idBase)default constructor.- Parameters:
max- the number stars to displayidBase- the id of the widget and base for the ids of the single radio buttons
-
RatingInputWidget
public RatingInputWidget(int max, String idBase, RatingInputWidget.Resources presource)constructor with styling information.- Parameters:
max- the number stars to displayidBase- the id of the widget and base for the ids of the single radio buttonspresource- resources with styling information
-
-
Method Detail
-
getDefaultResources
protected static RatingInputWidget.Resources getDefaultResources()
get default resource, if not set, create one.- Returns:
- default resource.
-
setValue
public void setValue(Integer pvalue)
-
setValue
public void setValue(Integer pvalue, boolean pfireEvents)
- Specified by:
setValuein interfacecom.google.gwt.user.client.ui.HasValue<Integer>
-
getValue
public Integer getValue()
-
addValueChangeHandler
public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<Integer> phandler)
- Specified by:
addValueChangeHandlerin interfacecom.google.gwt.event.logical.shared.HasValueChangeHandlers<Integer>
-
ensureDomEventHandlers
protected void ensureDomEventHandlers()
-
setTabIndex
public void setTabIndex(int pindex)
- Specified by:
setTabIndexin interfacecom.google.gwt.user.client.ui.Focusable
-
getTabIndex
public int getTabIndex()
- Specified by:
getTabIndexin interfacecom.google.gwt.user.client.ui.Focusable
-
setAccessKey
public void setAccessKey(char pkey)
- Specified by:
setAccessKeyin interfacecom.google.gwt.user.client.ui.Focusable
-
setFocus
public void setFocus(boolean pfocused)
- Specified by:
setFocusin interfacecom.google.gwt.user.client.ui.Focusable
-
asEditor
public ValueBoxEditor<Integer> asEditor()
- Specified by:
asEditorin interfaceorg.gwtproject.editor.client.IsEditor<ValueBoxEditor<Integer>>
-
setCustomValidity
public void setCustomValidity(String message)
Description copied from interface:HasValidationMessageElementset custom validity value.- Specified by:
setCustomValidityin interfaceHasValidationMessageElement<Integer,ValueBoxEditor<Integer>>- Parameters:
message- message to show
-
setTitle
public void setTitle(String title)
Description copied from interface:HasValidationMessageElementset title of element.- Specified by:
setTitlein interfaceHasValidationMessageElement<Integer,ValueBoxEditor<Integer>>- Overrides:
setTitlein classcom.google.gwt.user.client.ui.UIObject- Parameters:
title- title to set
-
setValidationMessageElement
public void setValidationMessageElement(com.google.gwt.user.client.ui.HTMLPanel pelement)
Description copied from interface:HasValidationMessageElementset validation message element.- Specified by:
setValidationMessageElementin interfaceHasValidationMessageElement<Integer,ValueBoxEditor<Integer>>- Parameters:
pelement- element to set
-
getValidationMessageElement
public com.google.gwt.user.client.ui.HTMLPanel getValidationMessageElement()
Description copied from interface:HasValidationMessageElementget validation message element.- Specified by:
getValidationMessageElementin interfaceHasValidationMessageElement<Integer,ValueBoxEditor<Integer>>- Returns:
- element or null if non is set
-
-