Class 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 interface  RatingInputWidget.Resources
      A ClientBundle that provides images and style sheets for the decorator.
      • 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 org.gwtproject.editor.client.Editor

        org.gwtproject.editor.client.Editor.Ignore, org.gwtproject.editor.client.Editor.Path
    • Field Summary

      • Fields inherited from class com.google.gwt.user.client.ui.UIObject

        DEBUG_ID_PREFIX
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler​(com.google.gwt.event.logical.shared.ValueChangeHandler<Integer> phandler)  
      ValueBoxEditor<Integer> asEditor()  
      protected void ensureDomEventHandlers()  
      protected static RatingInputWidget.Resources getDefaultResources()
      get default resource, if not set, create one.
      int getTabIndex()  
      com.google.gwt.user.client.ui.HTMLPanel getValidationMessageElement()
      get validation message element.
      Integer getValue()  
      void setAccessKey​(char pkey)  
      void setCustomValidity​(String message)
      set custom validity value.
      void setFocus​(boolean pfocused)  
      void setTabIndex​(int pindex)  
      void setTitle​(String title)
      set title of element.
      void setValidationMessageElement​(com.google.gwt.user.client.ui.HTMLPanel pelement)
      set validation message element.
      void setValue​(Integer pvalue)  
      void setValue​(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 interface com.google.gwt.event.shared.HasHandlers

        fireEvent
    • Constructor Detail

      • RatingInputWidget

        @UiConstructor
        public RatingInputWidget​(int max,
                                 String idBase)
        default constructor.
        Parameters:
        max - the number stars to display
        idBase - 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 display
        idBase - the id of the widget and base for the ids of the single radio buttons
        presource - 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)
        Specified by:
        setValue in interface com.google.gwt.user.client.ui.HasValue<Integer>
        Specified by:
        setValue in interface com.google.gwt.user.client.TakesValue<Integer>
        Specified by:
        setValue in interface org.gwtproject.editor.client.TakesValue<Integer>
      • setValue

        public void setValue​(Integer pvalue,
                             boolean pfireEvents)
        Specified by:
        setValue in interface com.google.gwt.user.client.ui.HasValue<Integer>
      • getValue

        public Integer getValue()
        Specified by:
        getValue in interface com.google.gwt.user.client.ui.HasValue<Integer>
        Specified by:
        getValue in interface com.google.gwt.user.client.TakesValue<Integer>
        Specified by:
        getValue in interface org.gwtproject.editor.client.TakesValue<Integer>
      • addValueChangeHandler

        public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler​(com.google.gwt.event.logical.shared.ValueChangeHandler<Integer> phandler)
        Specified by:
        addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<Integer>
      • ensureDomEventHandlers

        protected void ensureDomEventHandlers()
      • setTabIndex

        public void setTabIndex​(int pindex)
        Specified by:
        setTabIndex in interface com.google.gwt.user.client.ui.Focusable
      • getTabIndex

        public int getTabIndex()
        Specified by:
        getTabIndex in interface com.google.gwt.user.client.ui.Focusable
      • setAccessKey

        public void setAccessKey​(char pkey)
        Specified by:
        setAccessKey in interface com.google.gwt.user.client.ui.Focusable
      • setFocus

        public void setFocus​(boolean pfocused)
        Specified by:
        setFocus in interface com.google.gwt.user.client.ui.Focusable