org.springframework.richclient.form.binding.swing
Class SliderBinder

Show UML class diagram
java.lang.Object
  extended by org.springframework.richclient.form.binding.swing.SliderBinder
All Implemented Interfaces:
Binder

public class SliderBinder
extends Object
implements Binder

Binder class for integer values that displays a slider. Can use a SliderLabelFactory for custom labels. If a SliderLabelFactory is not present and the majorTickValue is set, the binding will create it's own labels based on that value.


Constructor Summary
SliderBinder()
           
 
Method Summary
 Binding bind(FormModel formModel, String formPropertyPath, Map context)
          Returns a binding between a form model's property and a control that will be created by this Binder.
 Binding bind(JComponent control, FormModel formModel, String formPropertyPath, Map context)
          Returns a binding between a form model's property and the provided control.
 void setMajorTickSpacing(int maxTickSpacing)
          Sets the major tick value of the slider
 void setMaxValue(int maxValue)
          Sets the maximum value of the slider
 void setMinValue(int minValue)
          Sets the minimum value of the slider
 void setReadOnly(boolean readOnly)
          Sets whether the control is readonly
 void setSliderLabelFactory(SliderLabelFactory sliderLabelFactory)
          Set the factory for the custom labels
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SliderBinder

public SliderBinder()
Method Detail

bind

public Binding bind(FormModel formModel,
                    String formPropertyPath,
                    Map context)
Description copied from interface: Binder
Returns a binding between a form model's property and a control that will be created by this Binder.

Specified by:
bind in interface Binder
Parameters:
formModel - the form model that this binding is for
context - additional context that may be used by this binder.
Returns:
a Binding (never null).

bind

public Binding bind(JComponent control,
                    FormModel formModel,
                    String formPropertyPath,
                    Map context)
Description copied from interface: Binder
Returns a binding between a form model's property and the provided control.

Specified by:
bind in interface Binder
Parameters:
control - the visual control that will be bound to the form model's property.
formModel - the form model that this binding is for
context - additional context that may be used by this binder
Returns:
a Binding (never null).

setMaxValue

public void setMaxValue(int maxValue)
Sets the maximum value of the slider


setMinValue

public void setMinValue(int minValue)
Sets the minimum value of the slider


setReadOnly

public void setReadOnly(boolean readOnly)
Sets whether the control is readonly


setMajorTickSpacing

public void setMajorTickSpacing(int maxTickSpacing)
Sets the major tick value of the slider


setSliderLabelFactory

public void setSliderLabelFactory(SliderLabelFactory sliderLabelFactory)
Set the factory for the custom labels



Copyright © 2004-2009 The Spring Framework. All Rights Reserved.