artofillusion.ui
Class ValueSlider

java.lang.Object
  extended by WidgetContainer
      extended by artofillusion.ui.ValueSlider

public class ValueSlider
extends WidgetContainer

A ValueSlider contains a BTextField and a BSlider which are together used for choosing a value. Editing either one causes the other to change automatically. If an illegal value is entered into the BTextField, the text turns red to indicate this.


Constructor Summary
ValueSlider(double min, double max, int increments, double value)
           
 
Method Summary
 int getChildCount()
          Get the number of children in this container.
 java.util.Collection getChildren()
          Get an Iterator listing all child Widgets.
 double getMaximumValue()
          Get the maximum allowed value.
 java.awt.Dimension getMinimumSize()
          Get the smallest size at which this Widget can reasonably be drawn.
 double getMinimumValue()
          Get the minimum allowed value.
 java.awt.Dimension getPreferredSize()
          Get the preferred size at which this Widget will look best.
 double getValue()
           
 void layoutChildren()
          Layout the child Widgets.
 void remove(Widget widget)
          Do not allow children to be removed.
 void removeAll()
          Do not allow children to be removed.
 void setEnabled(boolean enabled)
           
 void setForceInteger(boolean force)
           
 void setMaximumValue(double max)
          Set the maximum allowed value.
 void setMinimumValue(double min)
          Set the minimum allowed value.
 void setValue(double val)
           
 void textChanged(ValueChangedEvent ev)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueSlider

public ValueSlider(double min,
                   double max,
                   int increments,
                   double value)
Method Detail

setForceInteger

public void setForceInteger(boolean force)

textChanged

public void textChanged(ValueChangedEvent ev)

getValue

public double getValue()

setValue

public void setValue(double val)

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)

getChildCount

public int getChildCount()
Get the number of children in this container.


getChildren

public java.util.Collection getChildren()
Get an Iterator listing all child Widgets.


layoutChildren

public void layoutChildren()
Layout the child Widgets. This may be invoked whenever something has changed (the size of this WidgetContainer, the preferred size of one of its children, etc.) that causes the layout to no longer be correct. If a child is itself a WidgetContainer, its layoutChildren() method will be called in turn.


remove

public void remove(Widget widget)
Do not allow children to be removed.


removeAll

public void removeAll()
Do not allow children to be removed.


getMinimumSize

public java.awt.Dimension getMinimumSize()
Get the smallest size at which this Widget can reasonably be drawn. When a WidgetContainer lays out its contents, it will attempt never to make this Widget smaller than its minimum size.


getPreferredSize

public java.awt.Dimension getPreferredSize()
Get the preferred size at which this Widget will look best. When a WidgetContainer lays out its contents, it will attempt to make this Widget as close as possible to its preferred size.



Copyright © 1999-2011 by Peter Eastman.