org.olat.core.gui.components.rating
Class RatingComponent
java.lang.Object
org.olat.core.gui.components.Component
org.olat.core.gui.components.rating.RatingComponent
public class RatingComponent
- extends Component
Description:
The rating controller offers a view for users to rate on something using a
star-like view.
Events fired by this conmponent:
RatingEvent that contains the new rating
Initial Date: 31.10.2008
- Author:
- gnaegi
|
Constructor Summary |
RatingComponent(java.lang.String name,
float currentRating,
int maxRating,
boolean allowUserInput)
Create a rating component with no title and a default explanation and hover
texts. |
| Methods inherited from class org.olat.core.gui.components.Component |
addListener, debuginfoGetListeners, dispatchRequest, getAndClearLatestFiredEvent, getComponentName, getDispatchID, getExtendedDebugInfo, getLatestDispatchedController, getListenerInfo, getParent, getSpanAsDomReplaceable, getTimestamp, getTranslator, isDirty, isDirtyForUser, isDomReplaceable, isEnabled, isVisible, setDirty, setDomReplaceable, setEnabled, setSpanAsDomReplaceable, setVisible, toString, validate |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RatingComponent
public RatingComponent(java.lang.String name,
float currentRating,
int maxRating,
boolean allowUserInput)
- Create a rating component with no title and a default explanation and hover
texts. Use the setter methods to change the values. Use NULL values to
disable texts (title, explanation, labels)
- Parameters:
name - currentRating - the current ratingmaxRating - maximum number that can be ratedallowUserInput -
getHTMLRendererSingleton
public ComponentRenderer getHTMLRendererSingleton()
- Specified by:
getHTMLRendererSingleton in class Component
- See Also:
Component.getHTMLRendererSingleton()
getRatingLabel
public java.lang.String getRatingLabel(int position)
setLevelLabel
public void setLevelLabel(int position,
java.lang.String ratingLabel)
isTranslateRatingLabels
public boolean isTranslateRatingLabels()
setTranslateRatingLabels
public void setTranslateRatingLabels(boolean translateRatingLabels)
getTitle
public java.lang.String getTitle()
setTitle
public void setTitle(java.lang.String title)
isTranslateTitle
public boolean isTranslateTitle()
setTranslateTitle
public void setTranslateTitle(boolean translateTitle)
getExplanation
public java.lang.String getExplanation()
setExplanation
public void setExplanation(java.lang.String explanation)
isTranslateExplanation
public boolean isTranslateExplanation()
setTranslateExplanation
public void setTranslateExplanation(boolean translateExplanation)
isShowRatingAsText
public boolean isShowRatingAsText()
setShowRatingAsText
public void setShowRatingAsText(boolean showRatingAsText)
isAllowUserInput
public boolean isAllowUserInput()
setAllowUserInput
public void setAllowUserInput(boolean allowUserInput)
getRatingSteps
public int getRatingSteps()
getCssClass
public java.lang.String getCssClass()
setCssClass
public void setCssClass(java.lang.String cssClass)
getCurrentRating
public float getCurrentRating()
setCurrentRating
public void setCurrentRating(float currentRating)