org.openbp.jaspira.option.widget
Class IntegerSlideWidget

java.lang.Object
  extended by org.openbp.jaspira.option.OptionWidget
      extended by org.openbp.jaspira.option.widget.IntegerSlideWidget
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.ChangeListener

public class IntegerSlideWidget
extends OptionWidget
implements javax.swing.event.ChangeListener

A Menu Widget for selecting a number from a ranges.

Author:
Jens Ferchland

Field Summary
 
Fields inherited from class org.openbp.jaspira.option.OptionWidget
option
 
Constructor Summary
IntegerSlideWidget(Option option, int min, int max)
          Constructor.
IntegerSlideWidget(Option option, int min, int max, int orientation)
          Constructor.
IntegerSlideWidget(Option option, int min, int max, int steps, int orientation)
          Constructor.
 
Method Summary
 java.lang.Object getValue()
          Returns the value of the option widget.
 javax.swing.JComponent getWidgetComponent()
          Gets the widget component that visualizes the option.
 void setValue(java.lang.Object o)
          Sets the value that will be displayed in the option widget.
 void stateChanged(javax.swing.event.ChangeEvent e)
           
 
Methods inherited from class org.openbp.jaspira.option.OptionWidget
createHeading, getDescriptionComponent, getOption, notifyOptionMgrOfOptionChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerSlideWidget

public IntegerSlideWidget(Option option,
                          int min,
                          int max)
Constructor.

Parameters:
option - Option the widget refers to
min - Minimum value
max - Maximum value

IntegerSlideWidget

public IntegerSlideWidget(Option option,
                          int min,
                          int max,
                          int orientation)
Constructor.

Parameters:
option - Option the widget refers to
min - Minimum value
max - Maximum value
orientation - Orientation of the slider

IntegerSlideWidget

public IntegerSlideWidget(Option option,
                          int min,
                          int max,
                          int steps,
                          int orientation)
Constructor.

Parameters:
option - Option the widget refers to
min - Minimum value
max - Maximum value
steps - Slider step setting
orientation - Orientation of the slider
Method Detail

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Specified by:
stateChanged in interface javax.swing.event.ChangeListener
See Also:
ChangeListener.stateChanged(ChangeEvent)

getValue

public java.lang.Object getValue()
Description copied from class: OptionWidget
Returns the value of the option widget. This value might be different from the actual option value as long as the option has not been comitted.

Specified by:
getValue in class OptionWidget

setValue

public void setValue(java.lang.Object o)
Description copied from class: OptionWidget
Sets the value that will be displayed in the option widget.

Specified by:
setValue in class OptionWidget

getWidgetComponent

public javax.swing.JComponent getWidgetComponent()
Description copied from class: OptionWidget
Gets the widget component that visualizes the option.

Specified by:
getWidgetComponent in class OptionWidget


Copyright © 2011. All Rights Reserved.