corelib.services.web.components
Class Slider

java.lang.Object
  extended by corelib.services.web.components.WebComponent
      extended by corelib.services.web.components.VisualComponent
          extended by corelib.services.web.components.FormElement
              extended by corelib.services.web.components.FormInput
                  extended by corelib.services.web.components.Slider

public class Slider
extends FormInput

This class is used to inject the slider bar in your Ellipse web pages. This web component can allow the user to select a value. It can be used simply, or add step to facilitate the selection. You can also display value in an input.

Since:
0.4.0
Author:
Alexia Ramaioli & Dominique Liard

Field Summary
 
Fields inherited from class corelib.services.web.components.FormInput
autoPost, oldValue, readOnly
 
Fields inherited from class corelib.services.web.components.FormElement
disabled, value
 
Fields inherited from class corelib.services.web.components.VisualComponent
cssClass, cssStyle, toolTipText, visible
 
Fields inherited from class corelib.services.web.components.WebComponent
dataBindings, webPage, xmlNode
 
Constructor Summary
Slider()
           
 
Method Summary
 void component_load(WebPageEvent event)
          Fired when the web page is fully initialized.
 void component_renderBegin(WebPageEvent webPageEvent)
           
 void component_renderEnd(WebPageEvent webPageEvent)
           
 int getEndValue()
          Get the slider end value.
 boolean getPaintTicks()
          This method returns if the slider component draw ticks for each interval (depending of the value of step).
 java.lang.String getSelectedValue()
          Get the selected value.
 int getStartValue()
          Get the slider start value.
 int getStep()
          This method returns the step beetween two tick marks.
 boolean getTextBoxVisible()
          Get the TextBox value visibility.
 java.lang.String getUnitMeasurement()
          Get the unit of measurement.
 void setEndValue(int value)
          Fixes the slider end value.
 void setPaintTicks(boolean state)
          This method indicates to the slider component if it's should draw ticks for each interval (depending of the value of step).
 void setStartValue(int startValue)
          Fixes the slider start value.
 void setStep(int step)
          This method changes the step between two ticks.
 void setTextBoxVisible(boolean value)
          Indicates if the TextBox used to show the selected value is visible or not.
 void setUnitMeasurement(java.lang.String value)
          Fixes the slider unit of measurement.
 
Methods inherited from class corelib.services.web.components.FormInput
addFormInputListener, fireFormInputEvent, getOldValue, getSharedAttributesHtmlEncoding, isAutoPost, isReadOnly, oldValueHtmlEnconding, setAutoPost, setOldValue, setReadOnly
 
Methods inherited from class corelib.services.web.components.FormElement
getValue, isDisabled, setDisabled, setValue
 
Methods inherited from class corelib.services.web.components.VisualComponent
component_postRender, component_preRender, component_renderChildren, component_renderJavascriptLocalisation, encodeAttributeValue, getCssClass, getCssStyle, getOnClickListener, getToolTipText, isVisible, renderElement, setCssClass, setCssStyle, setOnClickListener, setToolTipText, setVisible
 
Methods inherited from class corelib.services.web.components.WebComponent
addBindingExpression, addChildComponent, component_init, component_preRepeaterDuplications, getChildComponents, getDataBinding, getElementsByTagName, getId, getWebPage, getXmlNode, setId, setWebPage, setXmlNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Slider

public Slider()
Method Detail

getStartValue

public int getStartValue()
Get the slider start value.

Returns:
The start value.

setStartValue

public void setStartValue(int startValue)
Fixes the slider start value.

Parameters:
startValue - The start value, as integer.

getEndValue

public int getEndValue()
Get the slider end value.

Returns:
The end value.

setEndValue

public void setEndValue(int value)
Fixes the slider end value.

Parameters:
value - The end value, as integer

getUnitMeasurement

public java.lang.String getUnitMeasurement()
Get the unit of measurement.

Returns:
a unit of measurement String.

setUnitMeasurement

public void setUnitMeasurement(java.lang.String value)
Fixes the slider unit of measurement.

Parameters:
value - The slider unit of measurement.

getStep

public int getStep()
This method returns the step beetween two tick marks.

Returns:
The step beetween two ticks.
See Also:
setStep(int), getPaintTicks(), setPaintTicks(boolean)

setStep

public void setStep(int step)
This method changes the step between two ticks. Caution: if the currently selected value does not match with a correct tick (depending on the new step), the value is automaticly ajusted.

Parameters:
step - The new step value (necessarily greater than 0).
See Also:
getStep(), getPaintTicks(), setPaintTicks(boolean)

getTextBoxVisible

public boolean getTextBoxVisible()
Get the TextBox value visibility.

Returns:
True or false depending on the TextBox visibility

setTextBoxVisible

public void setTextBoxVisible(boolean value)
Indicates if the TextBox used to show the selected value is visible or not.

Parameters:
value - True or false, by default true.

getPaintTicks

public boolean getPaintTicks()
This method returns if the slider component draw ticks for each interval (depending of the value of step).

Returns:
true if the slider component draw ticks, false otherwise.
See Also:
getStep(), setStep(int), setPaintTicks(boolean)

setPaintTicks

public void setPaintTicks(boolean state)
This method indicates to the slider component if it's should draw ticks for each interval (depending of the value of step).

Parameters:
state - true if the slider component should draw ticks, false otherwise.
See Also:
getStep(), setStep(int), getPaintTicks()

getSelectedValue

public java.lang.String getSelectedValue()
Get the selected value.

Returns:
The selected value.

component_load

public void component_load(WebPageEvent event)
Description copied from class: WebComponent
Fired when the web page is fully initialized.

Overrides:
component_load in class FormInput
Parameters:
event - Qualify the current web page event.

component_renderBegin

public void component_renderBegin(WebPageEvent webPageEvent)
Overrides:
component_renderBegin in class VisualComponent

component_renderEnd

public void component_renderEnd(WebPageEvent webPageEvent)
Overrides:
component_renderEnd in class VisualComponent


CAUTION: Ellipse is proposed to you in BETA version to allow evaluation of this framework. Infini Software is released from any responsibility for the use of Ellipse Framework.

Copyright 2012 Infini Software - All Rights Reserved.