artofillusion.ui
Class ValueSelector

java.lang.Object
  extended by RowContainer
      extended by artofillusion.ui.ValueSelector

public class ValueSelector
extends RowContainer

This class is used for selecting a numeric value within a (possibly unbounded) range. The user may edit the value either by typing into a text field, or by clicking and dragging on an "adjuster" Widget. This class is similar to JSlider, but it can be used when the permitted values are not restricted to a finite range.


Constructor Summary
ValueSelector(double value, double min, double max, double increment)
          Create a ValueSelector.
 
Method Summary
 double getMaximumValue()
          Get the maximum allowed value.
 double getMinimumValue()
          Get the minimum allowed value.
 double getValue()
          Get the current value.
 void setEnabled(boolean enabled)
           
 void setMaximumValue(double max)
          Set the maximum allowed value.
 void setMinimumValue(double min)
          Set the minimum allowed value.
 void setValue(double value)
          Set the current value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueSelector

public ValueSelector(double value,
                     double min,
                     double max,
                     double increment)
Create a ValueSelector.

Parameters:
value - the initial value
min - the minimum legal value. Specify Double.NEGATIVE_INFINITY if the range is not bounded from below.
max - the maximum legal value. Specify Double.POSITIVE_INFINITY if the range is not bounded from above.
increment - the amount by which the value should change for each pixel the mouse is moved after clicking on the adjustor Widget
Method Detail

getValue

public double getValue()
Get the current value.


setValue

public void setValue(double value)
Set the current value.


getMinimumValue

public double getMinimumValue()
Get the minimum allowed value.


setMinimumValue

public void setMinimumValue(double min)
Set the minimum allowed value.


getMaximumValue

public double getMaximumValue()
Get the maximum allowed value.


setMaximumValue

public void setMaximumValue(double max)
Set the maximum allowed value.


setEnabled

public void setEnabled(boolean enabled)


Copyright © 1999-2011 by Peter Eastman.