controlP5
Class Range

java.lang.Object
  extended by controlP5.Controller
      extended by controlP5.Range
All Implemented Interfaces:
CDrawable, ControllerInterface, ControlP5Constants

public class Range
extends Controller

a slider.


Field Summary
static int FIX
           
static int FLEXIBLE
           
 
Fields inherited from class controlP5.Controller
MOVE, PRESSED, RELEASE
 
Fields inherited from interface controlP5.ControlP5Constants
acceptClassList, ALT, ARRAY, BACKSPACE, BOOLEAN, CONTROL, DECREASE, DELETE, DOWN, ENTER, ESCAPE, eventMethod, FIELD, FLOAT, HALF_PI, HIDE, INCREASE, INTEGER, INVALID, KEYCONTROL, LEFT, LOAD, MENU, METHOD, PI, PRINT, RESET, RIGHT, SAVE, SHIFT, STRING, SWITCH_BACK, SWITCH_FORE, TAB, TWO_PI, UP, VERBOSE
 
Constructor Summary
Range(ControlP5 theControlP5, ControllerGroup theParent, java.lang.String theName, float theMin, float theMax, float theDefaultMinValue, float theDefaultMaxValue, int theX, int theY, int theWidth, int theHeight)
           
 
Method Summary
 void addToXMLElement(ControlP5XMLElement theElement)
           
 float[] arrayValue()
           
 void draw(processing.core.PApplet theApplet)
           
 float highValue()
           
 float lowValue()
           
 void mouseReleased()
           
 void mouseReleasedOutside()
           
 void onLeave()
           
 void setDraggable(boolean theFlag)
           
 Controller setHeight(int theValue)
          set the height of the slider.
 void setHighValue(float theValue)
           
 void setLowValue(float theValue)
           
 void setMax(float theValue)
          set the maximum value of the slider.
 void setMin(float theValue)
          set the minimum value of the slider.
 void setSliderMode(int theMode)
           
 void setValue(float theValue)
          set the value of the slider.
 Controller setWidth(int theValue)
          set the width of the slider.
 void update()
          updates the value of the controller without having to set the value explicitly.
 void updateInternalEvents(processing.core.PApplet theApplet)
          TODO
 
Methods inherited from class controlP5.Controller
absolutePosition, add, addListener, behavior, captionLabel, changeValue, color, continuousUpdateEvents, controlWindow, defaultValue, disableSprite, enableSprite, getAsXML, getColor, getHeight, getTab, getWidth, getWindow, hide, id, init, isBroadcast, isInside, isMousePressed, isUpdate, isVisible, isXMLsavable, keyEvent, label, listenerSize, max, min, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, name, parent, position, remove, remove, removeBehavior, removeListener, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColorActive, setColorBackground, setColorForeground, setColorLabel, setColorValue, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setId, setLabel, setLabelVisible, setMousePressed, setMoveable, setParent, setPosition, setSprite, setTab, setTab, setUpdate, setValueLabel, setVisible, setWindow, setWindow, show, stringValue, trigger, updateAbsolutePosition, updateEvents, value, valueLabel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIX

public static final int FIX
See Also:
Constant Field Values

FLEXIBLE

public static final int FLEXIBLE
See Also:
Constant Field Values
Constructor Detail

Range

public Range(ControlP5 theControlP5,
             ControllerGroup theParent,
             java.lang.String theName,
             float theMin,
             float theMax,
             float theDefaultMinValue,
             float theDefaultMaxValue,
             int theX,
             int theY,
             int theWidth,
             int theHeight)
Parameters:
theControlP5 - ControlP5
theParent - ControllerGroup
theName - String
theMin - float
theMax - float
theDefaultValue - float
theX - int
theY - int
theWidth - int
theHeight - int
Method Detail

setSliderMode

public void setSliderMode(int theMode)
Parameters:
theMode - int

updateInternalEvents

public void updateInternalEvents(processing.core.PApplet theApplet)
Description copied from class: Controller
TODO

Specified by:
updateInternalEvents in interface ControllerInterface
Overrides:
updateInternalEvents in class Controller
See Also:
ControllerInterfalce.updateInternalEvents

draw

public void draw(processing.core.PApplet theApplet)
Specified by:
draw in interface CDrawable
Specified by:
draw in interface ControllerInterface
Overrides:
draw in class Controller
Parameters:
theApplet - PApplet

setValue

public void setValue(float theValue)
set the value of the slider.

Specified by:
setValue in class Controller
Parameters:
theValue - float

update

public void update()
Description copied from class: Controller
updates the value of the controller without having to set the value explicitly. update does not visually update the controller. the updating status can be set with setUpdate(true/false) and checked with isUpdate().

Specified by:
update in interface ControllerInterface
Overrides:
update in class Controller

setDraggable

public void setDraggable(boolean theFlag)

arrayValue

public float[] arrayValue()
Overrides:
arrayValue in class Controller

setMin

public void setMin(float theValue)
set the minimum value of the slider.

Overrides:
setMin in class Controller
Parameters:
theValue - float

setMax

public void setMax(float theValue)
set the maximum value of the slider.

Overrides:
setMax in class Controller
Parameters:
theValue - float

lowValue

public float lowValue()

highValue

public float highValue()

setLowValue

public void setLowValue(float theValue)

setHighValue

public void setHighValue(float theValue)

setWidth

public Controller setWidth(int theValue)
set the width of the slider.

Overrides:
setWidth in class Controller
Parameters:
theValue - int

setHeight

public Controller setHeight(int theValue)
set the height of the slider.

Overrides:
setHeight in class Controller
Parameters:
theValue - int

mouseReleased

public void mouseReleased()

mouseReleasedOutside

public void mouseReleasedOutside()

onLeave

public void onLeave()

addToXMLElement

public void addToXMLElement(ControlP5XMLElement theElement)
Parameters:
theElement - ControlP5XMLElement


processing library controlP5 by Andreas Schlegel. (c) 2010