artofillusion.ui
Class ValueSlider

java.lang.Object
  extended by buoy.event.EventSource
      extended by buoy.widget.Widget
          extended by buoy.widget.WidgetContainer
              extended by artofillusion.ui.ValueSlider

public class ValueSlider
extends buoy.widget.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(buoy.widget.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(buoy.event.ValueChangedEvent ev)
           
 
Methods inherited from class buoy.widget.WidgetContainer
isOpaque, setOpaque
 
Methods inherited from class buoy.widget.Widget
addEventLink, dispatchEvent, getBackground, getBounds, getComponent, getCursor, getFont, getMaximumSize, getName, getParent, hasFocus, isEnabled, isFocusable, isVisible, repaint, requestFocus, setBackground, setCursor, setFocusable, setFont, setName, setVisible
 
Methods inherited from class buoy.event.EventSource
addEventLink, addEventLink, removeEventLink
 
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(buoy.event.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)
Overrides:
setEnabled in class buoy.widget.Widget

getChildCount

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

Specified by:
getChildCount in class buoy.widget.WidgetContainer

getChildren

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

Specified by:
getChildren in class buoy.widget.WidgetContainer

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.

Specified by:
layoutChildren in class buoy.widget.WidgetContainer

remove

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

Specified by:
remove in class buoy.widget.WidgetContainer

removeAll

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

Specified by:
removeAll in class buoy.widget.WidgetContainer

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.

Overrides:
getMinimumSize in class buoy.widget.Widget

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.

Overrides:
getPreferredSize in class buoy.widget.Widget


Copyright © 1999-2008 by Peter Eastman.