|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjaron.gui.Rect
jaron.gui.ActuatorXY
jaron.pde.Slider
public class Slider
The Slider
class provides a virtual slider for the Processing
Development Environment (PDE).
Have a look at the example of the UAVsim
for the usage of the
Slider
.
Field Summary |
---|
Fields inherited from class jaron.gui.ActuatorXY |
---|
control |
Constructor Summary | |
---|---|
Slider(processing.core.PApplet applet,
int left,
int top)
Creates a new Slider object for the Processing Development
Environment (PDE). |
|
Slider(processing.core.PApplet applet,
int left,
int top,
int width,
int height)
Creates a new Slider object for the Processing Development
Environment (PDE). |
|
Slider(processing.core.PApplet applet,
java.lang.String label,
int left,
int top)
Creates a new Slider object for the Processing Development
Environment (PDE). |
|
Slider(processing.core.PApplet applet,
java.lang.String label,
int left,
int top,
int width,
int height)
Creates a new Slider object for the Processing Development
Environment (PDE). |
Method Summary | |
---|---|
void |
addSignalListener(SignalListener listener)
Adds a listener to the slider. |
void |
draw()
Draws the slider to the screen. |
Signal |
getSignal()
Returns a Signal object containing a value that represents the
current value of the slider. |
void |
setLabel(java.lang.String label)
Sets the slider's label that is displayed at the right side. |
void |
setValue(double value)
Sets the slider's value. |
Methods inherited from class jaron.gui.ActuatorXY |
---|
addListenerX, addListenerY, getPowerSignal, getSignalX, getSignalY, getValueX, getValueY, isMouseOver, isMousePressed, mouseDragged, mouseMoved, mousePressed, mouseReleased, setBandwidthX, setBandwidthY, setControlSize, setLocation, setLockedX, setLockedY, setSize, setSpringX, setSpringY, setValueX, setValueY, signalChanged |
Methods inherited from class jaron.gui.Rect |
---|
contains, createIntersection, getHeight, getLeft, getTop, getWidth, setHeight, setLeft, setTop, setWidth |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Slider(processing.core.PApplet applet, java.lang.String label, int left, int top, int width, int height)
Slider
object for the Processing Development
Environment (PDE).
applet
- a reference to the PDE applet that provides the drawing environmentlabel
- the label that is displayed at right sideleft
- the component's position from the lefttop
- the component's position from topheight
- the component's heightwidth
- the component's widthpublic Slider(processing.core.PApplet applet, int left, int top, int width, int height)
Slider
object for the Processing Development
Environment (PDE).
applet
- a reference to the PDE applet that provides the drawing environmentleft
- the component's position from the lefttop
- the component's position from topheight
- the component's heightwidth
- the component's widthpublic Slider(processing.core.PApplet applet, java.lang.String label, int left, int top)
Slider
object for the Processing Development
Environment (PDE).
applet
- a reference to the PDE applet that provides the drawing environmentlabel
- the label that is displayed at right sideleft
- the component's position from the lefttop
- the component's position from toppublic Slider(processing.core.PApplet applet, int left, int top)
Slider
object for the Processing Development
Environment (PDE).
applet
- a reference to the PDE applet that provides the drawing environmentleft
- the component's position from the lefttop
- the component's position from topMethod Detail |
---|
public void addSignalListener(SignalListener listener)
EventListener
mechanism.
listener
- the listener to be added to sliderSignalListener
public void draw()
draw
method of the Processing Development Environment. This
ensures that the slider is updated periodically.
public Signal getSignal()
Signal
object containing a value that represents the
current value of the slider.
Signal
object containing the current y-axis valueSignal
public void setLabel(java.lang.String label)
label
- the label
in shortpublic void setValue(double value)
setValue
in interface SignalListener
setValue
in class ActuatorXY
value
- the new valueSignal
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |