|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectcontrolP5.Controller
controlP5.Slider
public class Slider
a slider is either used horizontally or vertically. when adding a slider to controlP5, the width is compared versus the height. width is bigger, you get a horizontal slider, height is bigger, you get a vertical slider. a slider can have a fixed slide controller (one end of the slider is fixed to the left or bottom side of the controller), or a flexible slide control (a knob that you can drag).
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 | |
---|---|
Slider(ControlP5 theControlP5,
ControllerGroup theParent,
java.lang.String theName,
float theMin,
float theMax,
float theDefaultValue,
int theX,
int theY,
int theWidth,
int theHeight)
|
Method Summary | |
---|---|
void |
addToXMLElement(ControlP5XMLElement theElement)
|
void |
draw(processing.core.PApplet theApplet)
|
void |
onEnter()
|
void |
onLeave()
|
Controller |
setHeight(int theValue)
set the height of the slider. |
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)
use the slider mode to set the mode of the slider bar, which can be Slider.FLEXIBLE or Slider.FIX |
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 java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int FIX
public static final int FLEXIBLE
Constructor Detail |
---|
public Slider(ControlP5 theControlP5, ControllerGroup theParent, java.lang.String theName, float theMin, float theMax, float theDefaultValue, int theX, int theY, int theWidth, int theHeight)
theControlP5
- ControlP5theParent
- ControllerGrouptheName
- StringtheMin
- floattheMax
- floattheDefaultValue
- floattheX
- inttheY
- inttheWidth
- inttheHeight
- intMethod Detail |
---|
public void setSliderMode(int theMode)
theMode
- intpublic void updateInternalEvents(processing.core.PApplet theApplet)
Controller
updateInternalEvents
in interface ControllerInterface
updateInternalEvents
in class Controller
ControllerInterfalce.updateInternalEvents
public void draw(processing.core.PApplet theApplet)
draw
in interface CDrawable
draw
in interface ControllerInterface
draw
in class Controller
theApplet
- PAppletpublic void setValue(float theValue)
setValue
in class Controller
theValue
- floatpublic void update()
Controller
update
in interface ControllerInterface
update
in class Controller
public void setMin(float theValue)
setMin
in class Controller
theValue
- floatpublic void setMax(float theValue)
setMax
in class Controller
theValue
- floatpublic Controller setWidth(int theValue)
setWidth
in class Controller
theValue
- intpublic Controller setHeight(int theValue)
setHeight
in class Controller
theValue
- intpublic void addToXMLElement(ControlP5XMLElement theElement)
theElement
- ControlP5XMLElementpublic void onEnter()
public void onLeave()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |