use of org.olat.core.gui.components.form.flexible.elements.SliderElement in project openolat by klemens.
the class RubricController method forgeDiscreteSlider.
private SliderWrapper forgeDiscreteSlider(Slider slider, Rubric element) {
SliderElement sliderEl = uifactory.addSliderElement("slider_" + (count++), null, flc);
sliderEl.setDomReplacementWrapperRequired(false);
sliderEl.addActionListener(FormEvent.ONCHANGE);
sliderEl.setMinValue(element.getStart());
sliderEl.setMaxValue(element.getEnd());
sliderEl.setStep(1);
SliderWrapper sliderWrapper = new SliderWrapper(slider, sliderEl);
sliderEl.setUserObject(sliderWrapper);
return sliderWrapper;
}
use of org.olat.core.gui.components.form.flexible.elements.SliderElement in project openolat by klemens.
the class EvaluationFormController method forgeContinuousSlider.
private SliderWrapper forgeContinuousSlider(Slider slider, Rubric element, EvaluationFormResponse response) {
SliderElement sliderEl = uifactory.addSliderElement("slider_" + (count++), null, flc);
sliderEl.setDomReplacementWrapperRequired(false);
sliderEl.addActionListener(FormEvent.ONCHANGE);
sliderEl.setEnabled(!readOnly);
if (response != null && response.getNumericalResponse() != null) {
double val = response.getNumericalResponse().doubleValue();
sliderEl.setInitialValue(val);
}
sliderEl.setMinValue(element.getStart());
sliderEl.setMaxValue(element.getEnd());
SliderWrapper sliderWrapper = new SliderWrapper(slider, sliderEl);
sliderEl.setUserObject(sliderWrapper);
return sliderWrapper;
}
Aggregations