com.sap.ui.commons.client
Class RatingIndicator

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.sap.ui.core.client.Element
          extended by com.sap.ui.core.client.Control
              extended by com.sap.ui.commons.client.RatingIndicator

public class RatingIndicator
extends com.sap.ui.core.client.Control

The class RatingIndicator is the GWT wrapper for the Phoenix control: sap.ui.commons.RatingIndicator.

You can specify the amount of rating symbols, as well as the URIs to the image icons which shall be used as rating symbols. When the user performs a rating, an event is fired.

Version:
0.18.0-SNAPSHOT
Author:
GENERATOR (JavaScript control: sap.ui.commons.RatingIndicator)

Constructor Summary
protected RatingIndicator()
          constructs the class RatingIndicator
hidden due to JavaScriptObject restriction
 
Method Summary
 RatingIndicator attachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener The event is fired when the user has done a rating.
static RatingIndicator create()
          creates a new instance of the class RatingIndicator
static RatingIndicator create(String idOrConfig)
          creates a new instance of the class RatingIndicator
static RatingIndicator create(String id, String config)
          creates a new instance of the class RatingIndicator
 RatingIndicator detachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener The event is fired when the user has done a rating.
 String getIconHovered()
          Getter for property iconHovered URI to the image which is displayed when hovering the mouse onto a rating symbol.
 String getIconSelected()
          Getter for property iconSelected URI to the image which is displayed for all selected rating symbols.
 String getIconUnselected()
          Getter for property iconUnselected URI to the image which is displayed for all deselected rating symbols.
 int getMaxValue()
          Getter for property maxValue The amount of rating symbols.
 float getValue()
          Getter for property value The current selected value.
 RatingIndicatorVisualMode getVisualMode()
          Getter for property visualMode Defines how float values are visualized.
 boolean isEditable()
          Getter for property editable Value "true" is required for displaying changed rating indicator colors, for example.
 boolean isVisible()
          Getter for property visible Invisible rating indicators are not rendered.
 RatingIndicator setEditable(boolean value)
          Setter for property editable
Default value is: true
 RatingIndicator setIconHovered(String value)
          Setter for property iconHovered
 RatingIndicator setIconSelected(String value)
          Setter for property iconSelected
 RatingIndicator setIconUnselected(String value)
          Setter for property iconUnselected
 RatingIndicator setMaxValue(int value)
          Setter for property maxValue
Default value is: 5
 RatingIndicator setValue(float value)
          Setter for property value
Default value is: 0
 RatingIndicator setVisible(boolean value)
          Setter for property visible
Default value is: true
 RatingIndicator setVisualMode(RatingIndicatorVisualMode value)
          Setter for property visualMode
Default value is: Half
 
Methods inherited from class com.sap.ui.core.client.Control
addStyleClass, hasStyleClass, invalidate, placeAt, placeAt, removeStyleClass, rerender
 
Methods inherited from class com.sap.ui.core.client.Element
_convertArray, _convertArray, _convertArray, _convertArray, _convertArray, attachBrowserEvent, attachEvent, bindAggregation, bindContext, bindProperty, bindProperty, destroy, detachBrowserEvent, detachEvent, getDomRef, getElementName, getId, getLibraryName, getModel, getParent, getProperty, getTooltip_AsString, getTooltip_Text, getTooltip, isActive, setModel, setProperty, setTooltip, setTooltip, unbindAggregation, unbindContext, unbindProperty
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RatingIndicator

protected RatingIndicator()
constructs the class RatingIndicator
hidden due to JavaScriptObject restriction

Method Detail

create

public static RatingIndicator create()
creates a new instance of the class RatingIndicator


create

public static RatingIndicator create(String idOrConfig)
creates a new instance of the class RatingIndicator

Parameters:
id - id of the RatingIndicator or configuration JSON string

create

public static RatingIndicator create(String id,
                                     String config)
creates a new instance of the class RatingIndicator

Parameters:
id - id of the RatingIndicator
config - configuration JSON string

isVisible

public final boolean isVisible()
Getter for property visible Invisible rating indicators are not rendered.

Returns:
the value of property visible

setVisible

public final RatingIndicator setVisible(boolean value)
Setter for property visible
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

isEditable

public final boolean isEditable()
Getter for property editable Value "true" is required for displaying changed rating indicator colors, for example.

Returns:
the value of property editable

setEditable

public final RatingIndicator setEditable(boolean value)
Setter for property editable
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

getMaxValue

public final int getMaxValue()
Getter for property maxValue The amount of rating symbols.

Returns:
the value of property maxValue

setMaxValue

public final RatingIndicator setMaxValue(int value)
Setter for property maxValue
Default value is: 5

Parameters:
value - int
Returns:
this to allow method chaining

getValue

public final float getValue()
Getter for property value The current selected value.

Returns:
the value of property value

setValue

public final RatingIndicator setValue(float value)
Setter for property value
Default value is: 0

Parameters:
value - float
Returns:
this to allow method chaining

getIconSelected

public final String getIconSelected()
Getter for property iconSelected URI to the image which is displayed for all selected rating symbols. When this icon-relevant attribute is used also the other icon attributes have to be set. Requirement is that all custom icons have the same size.

Returns:
the value of property iconSelected

setIconSelected

public final RatingIndicator setIconSelected(String value)
Setter for property iconSelected

Parameters:
value - String
Returns:
this to allow method chaining

getIconUnselected

public final String getIconUnselected()
Getter for property iconUnselected URI to the image which is displayed for all deselected rating symbols. When this icon-relevant attribute is used also the other icon attributes have to be set. Requirement is that all custom icons have the same size.

Returns:
the value of property iconUnselected

setIconUnselected

public final RatingIndicator setIconUnselected(String value)
Setter for property iconUnselected

Parameters:
value - String
Returns:
this to allow method chaining

getIconHovered

public final String getIconHovered()
Getter for property iconHovered URI to the image which is displayed when hovering the mouse onto a rating symbol. When this icon-relevant attribute is used also the other icon attributes have to be set. Requirement is that all custom icons have the same size.

Returns:
the value of property iconHovered

setIconHovered

public final RatingIndicator setIconHovered(String value)
Setter for property iconHovered

Parameters:
value - String
Returns:
this to allow method chaining

getVisualMode

public final RatingIndicatorVisualMode getVisualMode()
Getter for property visualMode Defines how float values are visualized.

Returns:
the value of property visualMode

setVisualMode

public final RatingIndicator setVisualMode(RatingIndicatorVisualMode value)
Setter for property visualMode
Default value is: Half

Parameters:
value - com.sap.ui.commons.client.RatingIndicatorVisualMode
Returns:
this to allow method chaining

attachChangeEvent

public final RatingIndicator attachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener The event is fired when the user has done a rating.
Event Parameters:
{int} value The rated value.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

detachChangeEvent

public final RatingIndicator detachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener The event is fired when the user has done a rating.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining


Copyright © 2011 SAP. All Rights Reserved.