controlp5/reference/controlP5/Knob.html

1404 lines
73 KiB
HTML
Raw Normal View History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_51) on Sun Apr 27 21:39:47 SGT 2014 -->
<title>Knob (Javadocs: controlP5)</title>
<meta name="date" content="2014-04-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Knob (Javadocs: controlP5)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../controlP5/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../index-all.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../controlP5/Group.html" title="class in controlP5"><span class="strong">Prev Class</span></a></li>
<li><a href="../controlP5/Label.html" title="class in controlP5"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?controlP5/Knob.html" target="_top">Frames</a></li>
<li><a href="Knob.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">controlP5</div>
<h2 title="Class Knob" class="title">Class Knob</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../controlP5/Controller.html" title="class in controlP5">controlP5.Controller</a>&lt;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&gt;</li>
<li>
<ul class="inheritance">
<li>controlP5.Knob</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../controlP5/CDrawable.html" title="interface in controlP5">CDrawable</a>, <a href="../controlP5/ControllerInterface.html" title="interface in controlP5">ControllerInterface</a>&lt;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&gt;, <a href="../controlP5/ControlP5Constants.html" title="interface in controlP5">ControlP5Constants</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">Knob</span>
extends <a href="../controlP5/Controller.html" title="class in controlP5">Controller</a>&lt;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&gt;</pre>
<div class="block">A knob is a circular slider which can be used with a limited and unlimited range. Knobs come in 3
designs LINE, ARC and ELIPSE and can be controller with both the mouse and the mouse wheel.</div>
<dl><script type="text/javascript">
<!--
document.getElementsByTagName('html')[0].className = 'isjs';function toggle(dt) { var display, dd=dt; do{ dd = dd.nextSibling } while(dd.tagName!='DD'); toOpen =!dd.style.display;dd.style.display = toOpen? 'block':''; dt.getElementsByTagName('span')[0].innerHTML = toOpen? '-':'+' ; }
-->
</script>
<div id="test" class="toggleList"><dl><dt onclick="toggle(this);"><span>+</span>Example</dt><dd><code><pre>/**
* ControlP5 Knob
*
*
* find a list of public methods available for the Knob Controller
* at the bottom of this sketch.
*
* by Andreas Schlegel, 2012
* www.sojamo.de/libraries/controlp5
*
*/
import controlP5.*;
ControlP5 cp5;
int myColorBackground = color(0,0,0);
int knobValue = 100;
Knob myKnobA;
Knob myKnobB;
void setup() {
size(700,400);
smooth();
noStroke();
cp5 = new ControlP5(this);
myKnobA = cp5.addKnob("knob")
.setRange(0,255)
.setValue(50)
.setPosition(100,70)
.setRadius(50)
.setDragDirection(Knob.VERTICAL)
;
myKnobB = cp5.addKnob("knobValue")
.setRange(0,255)
.setValue(220)
.setPosition(100,210)
.setRadius(50)
.setNumberOfTickMarks(10)
.setTickMarkLength(4)
.snapToTickMarks(true)
.setColorForeground(color(255))
.setColorBackground(color(0, 160, 100))
.setColorActive(color(255,255,0))
.setDragDirection(Knob.HORIZONTAL)
;
}
void draw() {
background(myColorBackground);
fill(knobValue);
rect(0,height/2,width,height/2);
fill(0,100);
rect(80,40,140,320);
}
void knob(int theValue) {
myColorBackground = color(theValue);
println("a knob event. setting background to "+theValue);
}
void keyPressed() {
switch(key) {
case('1'):myKnobA.setValue(180);break;
case('2'):myKnobB.setConstrained(false).hideTickMarks().snapToTickMarks(false);break;
case('3'):myKnobA.shuffle();myKnobB.shuffle();break;
}
}
/*
a list of all methods available for the Knob Controller
use ControlP5.printPublicMethodsFor(Knob.class);
to print the following list into the console.
You can find further details about class Knob in the javadoc.
Format:
ClassName : returnType methodName(parameter type)
controlP5.Knob : Knob setConstrained(boolean)
controlP5.Knob : Knob setDragDirection(int)
controlP5.Knob : Knob setMax(float)
controlP5.Knob : Knob setMin(float)
controlP5.Knob : Knob setNumberOfTickMarks(int)
controlP5.Knob : Knob setRadius(float)
controlP5.Knob : Knob setRange(float)
controlP5.Knob : Knob setResolution(float)
controlP5.Knob : Knob setScrollSensitivity(float)
controlP5.Knob : Knob setSensitivity(float)
controlP5.Knob : Knob setShowRange(boolean)
controlP5.Knob : Knob setStartAngle(float)
controlP5.Knob : Knob setTickMarkLength(int)
controlP5.Knob : Knob setTickMarkWeight(float)
controlP5.Knob : Knob setValue(float)
controlP5.Knob : Knob setViewStyle(int)
controlP5.Knob : Knob showTickMarks(boolean)
controlP5.Knob : Knob shuffle()
controlP5.Knob : Knob snapToTickMarks(boolean)
controlP5.Knob : Knob update()
controlP5.Knob : boolean isConstrained()
controlP5.Knob : boolean isShowRange()
controlP5.Knob : boolean isShowTickMarks()
controlP5.Knob : float getAngle()
controlP5.Knob : float getRadius()
controlP5.Knob : float getRange()
controlP5.Knob : float getResolution()
controlP5.Knob : float getStartAngle()
controlP5.Knob : float getTickMarkWeight()
controlP5.Knob : float getValue()
controlP5.Knob : int getDragDirection()
controlP5.Knob : int getNumberOfTickMarks()
controlP5.Knob : int getTickMarkLength()
controlP5.Knob : int getViewStyle()
controlP5.Controller : CColor getColor()
controlP5.Controller : ControlBehavior getBehavior()
controlP5.Controller : ControlWindow getControlWindow()
controlP5.Controller : ControlWindow getWindow()
controlP5.Controller : ControllerProperty getProperty(String)
controlP5.Controller : ControllerProperty getProperty(String, String)
controlP5.Controller : Knob addCallback(CallbackListener)
controlP5.Controller : Knob addListener(ControlListener)
controlP5.Controller : Knob bringToFront()
controlP5.Controller : Knob bringToFront(ControllerInterface)
controlP5.Controller : Knob hide()
controlP5.Controller : Knob linebreak()
controlP5.Controller : Knob listen(boolean)
controlP5.Controller : Knob lock()
controlP5.Controller : Knob plugTo(Object)
controlP5.Controller : Knob plugTo(Object, String)
controlP5.Controller : Knob plugTo(Object[])
controlP5.Controller : Knob plugTo(Object[], String)
controlP5.Controller : Knob registerProperty(String)
controlP5.Controller : Knob registerProperty(String, String)
controlP5.Controller : Knob registerTooltip(String)
controlP5.Controller : Knob removeBehavior()
controlP5.Controller : Knob removeCallback()
controlP5.Controller : Knob removeCallback(CallbackListener)
controlP5.Controller : Knob removeListener(ControlListener)
controlP5.Controller : Knob removeProperty(String)
controlP5.Controller : Knob removeProperty(String, String)
controlP5.Controller : Knob setArrayValue(float[])
controlP5.Controller : Knob setArrayValue(int, float)
controlP5.Controller : Knob setBehavior(ControlBehavior)
controlP5.Controller : Knob setBroadcast(boolean)
controlP5.Controller : Knob setCaptionLabel(String)
controlP5.Controller : Knob setColor(CColor)
controlP5.Controller : Knob setColorActive(int)
controlP5.Controller : Knob setColorBackground(int)
controlP5.Controller : Knob setColorCaptionLabel(int)
controlP5.Controller : Knob setColorForeground(int)
controlP5.Controller : Knob setColorValueLabel(int)
controlP5.Controller : Knob setDecimalPrecision(int)
controlP5.Controller : Knob setDefaultValue(float)
controlP5.Controller : Knob setHeight(int)
controlP5.Controller : Knob setId(int)
controlP5.Controller : Knob setImages(PImage, PImage, PImage)
controlP5.Controller : Knob setImages(PImage, PImage, PImage, PImage)
controlP5.Controller : Knob setLabelVisible(boolean)
controlP5.Controller : Knob setLock(boolean)
controlP5.Controller : Knob setMax(float)
controlP5.Controller : Knob setMin(float)
controlP5.Controller : Knob setMouseOver(boolean)
controlP5.Controller : Knob setMoveable(boolean)
controlP5.Controller : Knob setPosition(PVector)
controlP5.Controller : Knob setPosition(float, float)
controlP5.Controller : Knob setSize(PImage)
controlP5.Controller : Knob setSize(int, int)
controlP5.Controller : Knob setStringValue(String)
controlP5.Controller : Knob setUpdate(boolean)
controlP5.Controller : Knob setValueLabel(String)
controlP5.Controller : Knob setView(ControllerView)
controlP5.Controller : Knob setVisible(boolean)
controlP5.Controller : Knob setWidth(int)
controlP5.Controller : Knob show()
controlP5.Controller : Knob unlock()
controlP5.Controller : Knob unplugFrom(Object)
controlP5.Controller : Knob unplugFrom(Object[])
controlP5.Controller : Knob unregisterTooltip()
controlP5.Controller : Knob update()
controlP5.Controller : Knob updateSize()
controlP5.Controller : Label getCaptionLabel()
controlP5.Controller : Label getValueLabel()
controlP5.Controller : List getControllerPlugList()
controlP5.Controller : PImage setImage(PImage)
controlP5.Controller : PImage setImage(PImage, int)
controlP5.Controller : PVector getAbsolutePosition()
controlP5.Controller : PVector getPosition()
controlP5.Controller : String getAddress()
controlP5.Controller : String getInfo()
controlP5.Controller : String getName()
controlP5.Controller : String getStringValue()
controlP5.Controller : String toString()
controlP5.Controller : Tab getTab()
controlP5.Controller : boolean isActive()
controlP5.Controller : boolean isBroadcast()
controlP5.Controller : boolean isInside()
controlP5.Controller : boolean isLabelVisible()
controlP5.Controller : boolean isListening()
controlP5.Controller : boolean isLock()
controlP5.Controller : boolean isMouseOver()
controlP5.Controller : boolean isMousePressed()
controlP5.Controller : boolean isMoveable()
controlP5.Controller : boolean isUpdate()
controlP5.Controller : boolean isVisible()
controlP5.Controller : float getArrayValue(int)
controlP5.Controller : float getDefaultValue()
controlP5.Controller : float getMax()
controlP5.Controller : float getMin()
controlP5.Controller : float getValue()
controlP5.Controller : float[] getArrayValue()
controlP5.Controller : int getDecimalPrecision()
controlP5.Controller : int getHeight()
controlP5.Controller : int getId()
controlP5.Controller : int getWidth()
controlP5.Controller : int listenerSize()
controlP5.Controller : void remove()
controlP5.Controller : void setView(ControllerView, int)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
*/
</pre></code></dd></dl></div></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#autoHeight">autoHeight</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#autoWidth">autoWidth</a></strong></code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_controlP5.ControlP5Constants">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;controlP5.<a href="../controlP5/ControlP5Constants.html" title="interface in controlP5">ControlP5Constants</a></h3>
<code><a href="../controlP5/ControlP5Constants.html#acceptClassList">acceptClassList</a>, <a href="../controlP5/ControlP5Constants.html#ACTION_BROADCAST">ACTION_BROADCAST</a>, <a href="../controlP5/ControlP5Constants.html#ACTION_CLICK">ACTION_CLICK</a>, <a href="../controlP5/ControlP5Constants.html#ACTION_DRAG">ACTION_DRAG</a>, <a href="../controlP5/ControlP5Constants.html#ACTION_ENTER">ACTION_ENTER</a>, <a href="../controlP5/ControlP5Constants.html#ACTION_EXIT">ACTION_EXIT</a>, <a href="../controlP5/ControlP5Constants.html#ACTION_LEAVE">ACTION_LEAVE</a>, <a href="../controlP5/ControlP5Constants.html#ACTION_MOVE">ACTION_MOVE</a>, <a href="../controlP5/ControlP5Constants.html#ACTION_PRESS">ACTION_PRESS</a>, <a href="../controlP5/ControlP5Constants.html#ACTION_PRESSED">ACTION_PRESSED</a>, <a href="../controlP5/ControlP5Constants.html#ACTION_RELEASE">ACTION_RELEASE</a>, <a href="../controlP5/ControlP5Constants.html#ACTION_RELEASED">ACTION_RELEASED</a>, <a href="../controlP5/ControlP5Constants.html#ACTION_RELEASEDOUTSIDE">ACTION_RELEASEDOUTSIDE</a>, <a href="../controlP5/ControlP5Constants.html#ACTION_WHEEL">ACTION_WHEEL</a>, <a href="../controlP5/ControlP5Constants.html#ACTIVE">ACTIVE</a>, <a href="../controlP5/ControlP5Constants.html#ALL">ALL</a>, <a href="../controlP5/ControlP5Constants.html#ALT">ALT</a>, <a href="../controlP5/ControlP5Constants.html#AQUA">AQUA</a>, <a href="../controlP5/ControlP5Constants.html#ARC">ARC</a>, <a href="../controlP5/ControlP5Constants.html#ARRAY">ARRAY</a>, <a href="../controlP5/ControlP5Constants.html#BACKSPACE">BACKSPACE</a>, <a href="../controlP5/ControlP5Constants.html#BASELINE">BASELINE</a>, <a href="../controlP5/ControlP5Constants.html#BITFONT">BITFONT</a>, <a href="../controlP5/ControlP5Constants.html#BLACK">BLACK</a>, <a href="../controlP5/ControlP5Constants.html#BLUE">BLUE</a>, <a href="../controlP5/ControlP5Constants.html#BOOLEAN">BOOLEAN</a>, <a href="../controlP5/ControlP5Constants.html#BOTTOM">BOTTOM</a>, <a href="../controlP5/ControlP5Constants.html#BOTTOM_OUTSIDE">BOTTOM_OUTSIDE</a>, <a href="../controlP5/ControlP5Constants.html#CAPTIONLABEL">CAPTIONLABEL</a>, <a href="../controlP5/ControlP5Constants.html#CENTER">CENTER</a>, <a href="../controlP5/ControlP5Constants.html#CHECKBOX">CHECKBOX</a>, <a href="../controlP5/ControlP5Constants.html#COMMANDKEY">COMMANDKEY</a>, <a href="../controlP5/ControlP5Constants.html#CONTROL">CONTROL</a>, <a href="../controlP5/ControlP5Constants.html#controlEventClass">controlEventClass</a>, <a href="../controlP5/ControlP5Constants.html#CUSTOM">CUSTOM</a>, <a href="../controlP5/ControlP5Constants.html#DECREASE">DECREASE</a>, <a href="../controlP5/ControlP5Constants.html#DEFAULT">DEFAULT</a>, <a href="../controlP5/ControlP5Constants.html#DELETE">DELETE</a>, <a href="../controlP5/ControlP5Constants.html#DONE">DONE</a>, <a href="../controlP5/ControlP5Constants.html#DOWN">DOWN</a>, <a href="../controlP5/ControlP5Constants.html#DROPDOWN">DROPDOWN</a>, <a href="../controlP5/ControlP5Constants.html#ELLIPSE">ELLIPSE</a>, <a href="../controlP5/ControlP5Constants.html#ENTER">ENTER</a>, <a href="../controlP5/ControlP5Constants.html#ESCAPE">ESCAPE</a>, <a href="../controlP5/ControlP5Constants.html#EVENT">EVENT</a>, <a href="../controlP5/ControlP5Constants.html#eventMethod">eventMethod</a>, <a href="../controlP5/ControlP5Constants.html#FADEIN">FADEIN</a>, <a href="../controlP5/ControlP5Constants.html#FADEOUT">FADEOUT</a>, <a href="../controlP5/ControlP5Constants.html#FIELD">FIELD</a>, <a href="../controlP5/ControlP5Constants.html#FLOAT">FLOAT</a>, <a href="../controlP5/ControlP5Constants.html#FUCHSIA">FUCHSIA</a>, <a href="../controlP5/ControlP5Constants.html#GRAY">GRAY</a>, <a href="../controlP5/ControlP5Constants.html#GREEN">GREEN</a>, <a href="../controlP5/ControlP5Constants.html#grixel">grixel</a>, <a href="../controlP5/ControlP5Constants.html#HALF_PI">HALF_PI</a>, <a href="../controlP5/ControlP5Constants.html#HIDE">HIDE</a>, <a href="../controlP5/ControlP5Constants.html#HIGHLIGHT">HIGHLIGHT</a>, <a href="../controlP5/ControlP5Constants.html#HORIZONTAL">HOR
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../controlP5/Knob.html#Knob(controlP5.ControlP5, controlP5.ControllerGroup, java.lang.String, float, float, float, int, int, int)">Knob</a></strong>(<a href="../controlP5/ControlP5.html" title="class in controlP5">ControlP5</a>&nbsp;theControlP5,
<a href="../controlP5/ControllerGroup.html" title="class in controlP5">ControllerGroup</a>&lt;?&gt;&nbsp;theParent,
java.lang.String&nbsp;theName,
float&nbsp;theMin,
float&nbsp;theMax,
float&nbsp;theDefaultValue,
int&nbsp;theX,
int&nbsp;theY,
int&nbsp;theWidth)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../controlP5/Knob.html#Knob(controlP5.ControlP5, java.lang.String)">Knob</a></strong>(<a href="../controlP5/ControlP5.html" title="class in controlP5">ControlP5</a>&nbsp;theControlP5,
java.lang.String&nbsp;theName)</code>
<div class="block">Convenience constructor to extend Knob.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#getAngle()">getAngle</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#getAngleRange()">getAngleRange</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#getDragDirection()">getDragDirection</a></strong>()</code>
<div class="block">Gets the drag direction which is either Controller.HORIZONTAL or Controller.VERTICAL.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#getNumberOfTickMarks()">getNumberOfTickMarks</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#getRadius()">getRadius</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#getResolution()">getResolution</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#getStartAngle()">getStartAngle</a></strong>()</code>
<div class="block">get the start angle, 0 is at 3 o'clock.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#getTickMarkLength()">getTickMarkLength</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#getTickMarkWeight()">getTickMarkWeight</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#getValue()">getValue</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#getViewStyle()">getViewStyle</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#hideTickMarks()">hideTickMarks</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#isConstrained()">isConstrained</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#isShowAngleRange()">isShowAngleRange</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#isShowTickMarks()">isShowTickMarks</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#mousePressed()">mousePressed</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#mouseReleasedOutside()">mouseReleasedOutside</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#scrolled(int)">scrolled</a></strong>(int&nbsp;theRotationValue)</code>
<div class="block">Changes the value of the knob when hovering and using the mouse wheel or the scroll function
of a multi-touch track pad.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setAngleRange(float)">setAngleRange</a></strong>(float&nbsp;theRange)</code>
<div class="block">set the range in between which the know operates.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setConstrained(boolean)">setConstrained</a></strong>(boolean&nbsp;theValue)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setDragDirection(int)">setDragDirection</a></strong>(int&nbsp;theValue)</code>
<div class="block">Sets the drag direction, when controlling a knob, parameter is either Controller.HORIZONTAL
or Controller.VERTICAL.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setMax(float)">setMax</a></strong>(float&nbsp;theValue)</code>
<div class="block">sets the maximum value of the Controller.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setMin(float)">setMin</a></strong>(float&nbsp;theValue)</code>
<div class="block">sets the minimum value of the Controller.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setNumberOfTickMarks(int)">setNumberOfTickMarks</a></strong>(int&nbsp;theNumber)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setRadius(float)">setRadius</a></strong>(float&nbsp;theValue)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setRange(float, float)">setRange</a></strong>(float&nbsp;theMin,
float&nbsp;theMax)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setResolution(float)">setResolution</a></strong>(float&nbsp;theValue)</code>
<div class="block">resolution is a sensitivity value when dragging a knob.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setScrollSensitivity(float)">setScrollSensitivity</a></strong>(float&nbsp;theValue)</code>
<div class="block">Sets the sensitivity for the scroll behavior when using the mouse wheel or the scroll
function of a multi-touch track pad.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setShowAngleRange(boolean)">setShowAngleRange</a></strong>(boolean&nbsp;theValue)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setSize(int, int)">setSize</a></strong>(int&nbsp;theWidth,
int&nbsp;theHeight)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setStartAngle(float)">setStartAngle</a></strong>(float&nbsp;theAngle)</code>
<div class="block">The start angle is a value between 0 and TWO_PI.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setTickMarkLength(int)">setTickMarkLength</a></strong>(int&nbsp;theLength)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setTickMarkWeight(float)">setTickMarkWeight</a></strong>(float&nbsp;theWeight)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setValue(float)">setValue</a></strong>(float&nbsp;theValue)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#setViewStyle(int)">setViewStyle</a></strong>(int&nbsp;theStyle)</code>
<div class="block">set the display style of a knob.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#showTickMarks()">showTickMarks</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#shuffle()">shuffle</a></strong>()</code>
<div class="block">Assigns a random value to the controller.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#snapToTickMarks(boolean)">snapToTickMarks</a></strong>(boolean&nbsp;theFlag)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#update()">update</a></strong>()</code>
<div class="block">updates the value of the controller without having to set the value explicitly.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#updateDisplayMode(int)">updateDisplayMode</a></strong>(int&nbsp;theMode)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../controlP5/Knob.html" title="class in controlP5">Knob</a></code></td>
<td class="colLast"><code><strong><a href="../controlP5/Knob.html#updateInternalEvents(processing.core.PApplet)">updateInternalEvents</a></strong>(processing.core.PApplet&nbsp;theApplet)</code>
<div class="block">a method for putting input events like e.g.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_controlP5.Controller">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;controlP5.<a href="../controlP5/Controller.html" title="class in controlP5">Controller</a></h3>
<code><a href="../controlP5/Controller.html#add(controlP5.ControllerInterface)">add</a>, <a href="../controlP5/Controller.html#addCallback(controlP5.CallbackListener)">addCallback</a>, <a href="../controlP5/Controller.html#addListener(controlP5.ControlListener)">addListener</a>, <a href="../controlP5/Controller.html#align(int, int, int, int)">align</a>, <a href="../controlP5/Controller.html#bringToFront()">bringToFront</a>, <a href="../controlP5/Controller.html#bringToFront(controlP5.ControllerInterface)">bringToFront</a>, <a href="../controlP5/Controller.html#changeValue(float)">changeValue</a>, <a href="../controlP5/Controller.html#continuousUpdateEvents()">continuousUpdateEvents</a>, <a href="../controlP5/Controller.html#draw(processing.core.PGraphics)">draw</a>, <a href="../controlP5/Controller.html#getAbsolutePosition()">getAbsolutePosition</a>, <a href="../controlP5/Controller.html#getAddress()">getAddress</a>, <a href="../controlP5/Controller.html#getArrayValue()">getArrayValue</a>, <a href="../controlP5/Controller.html#getArrayValue(int)">getArrayValue</a>, <a href="../controlP5/Controller.html#getBehavior()">getBehavior</a>, <a href="../controlP5/Controller.html#getCaptionLabel()">getCaptionLabel</a>, <a href="../controlP5/Controller.html#getColor()">getColor</a>, <a href="../controlP5/Controller.html#getControllerPlugList()">getControllerPlugList</a>, <a href="../controlP5/Controller.html#getControlWindow()">getControlWindow</a>, <a href="../controlP5/Controller.html#getDecimalPrecision()">getDecimalPrecision</a>, <a href="../controlP5/Controller.html#getDefaultValue()">getDefaultValue</a>, <a href="../controlP5/Controller.html#getHeight()">getHeight</a>, <a href="../controlP5/Controller.html#getId()">getId</a>, <a href="../controlP5/Controller.html#getInfo()">getInfo</a>, <a href="../controlP5/Controller.html#getLabel()">getLabel</a>, <a href="../controlP5/Controller.html#getMax()">getMax</a>, <a href="../controlP5/Controller.html#getMin()">getMin</a>, <a href="../controlP5/Controller.html#getName()">getName</a>, <a href="../controlP5/Controller.html#getParent()">getParent</a>, <a href="../controlP5/Controller.html#getPickingColor()">getPickingColor</a>, <a href="../controlP5/Controller.html#getPointer()">getPointer</a>, <a href="../controlP5/Controller.html#getPosition()">getPosition</a>, <a href="../controlP5/Controller.html#getProperty(java.lang.String)">getProperty</a>, <a href="../controlP5/Controller.html#getProperty(java.lang.String, java.lang.String)">getProperty</a>, <a href="../controlP5/Controller.html#getStringValue()">getStringValue</a>, <a href="../controlP5/Controller.html#getTab()">getTab</a>, <a href="../controlP5/Controller.html#getValueLabel()">getValueLabel</a>, <a href="../controlP5/Controller.html#getView()">getView</a>, <a href="../controlP5/Controller.html#getWidth()">getWidth</a>, <a href="../controlP5/Controller.html#getWindow()">getWindow</a>, <a href="../controlP5/Controller.html#hide()">hide</a>, <a href="../controlP5/Controller.html#init()">init</a>, <a href="../controlP5/Controller.html#isActive()">isActive</a>, <a href="../controlP5/Controller.html#isBroadcast()">isBroadcast</a>, <a href="../controlP5/Controller.html#isInside()">isInside</a>, <a href="../controlP5/Controller.html#isLabelVisible()">isLabelVisible</a>, <a href="../controlP5/Controller.html#isListening()">isListening</a>, <a href="../controlP5/Controller.html#isLock()">isLock</a>, <a href="../controlP5/Controller.html#isMouseOver()">isMouseOver</a>, <a href="../controlP5/Controller.html#isMousePressed()">isMousePressed</a>, <a href="../controlP5/Controller.html#isMoveable()">isMoveable</a>, <a href="../controlP5/Controller.html#isUpdate()">isUpdate</a>, <a href="../controlP5/Controller.html#isUserInteraction()">isUserInteraction</a>, <a href="../controlP5/Controller.html#isVisible()">isVisible</a>, <a href="../controlP5/Controller.html#keyEvent(processing.event.KeyEvent)">keyEvent</a>, <a href="../controlP5/Controller.html#linebreak()">linebreak</a>, <a href="../controlP5/Controller.html#listen(boolean)">listen</a
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_controlP5.ControllerInterface">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;controlP5.<a href="../controlP5/ControllerInterface.html" title="interface in controlP5">ControllerInterface</a></h3>
<code><a href="../controlP5/ControllerInterface.html#parent()">parent</a>, <a href="../controlP5/ControllerInterface.html#setColorLabel(int)">setColorLabel</a>, <a href="../controlP5/ControllerInterface.html#setColorValue(int)">setColorValue</a>, <a href="../controlP5/ControllerInterface.html#setLabel(java.lang.String)">setLabel</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="autoHeight">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>autoHeight</h4>
<pre>public static&nbsp;int autoHeight</pre>
</li>
</ul>
<a name="autoWidth">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>autoWidth</h4>
<pre>public static&nbsp;int autoWidth</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Knob(controlP5.ControlP5, controlP5.ControllerGroup, java.lang.String, float, float, float, int, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Knob</h4>
<pre>public&nbsp;Knob(<a href="../controlP5/ControlP5.html" title="class in controlP5">ControlP5</a>&nbsp;theControlP5,
<a href="../controlP5/ControllerGroup.html" title="class in controlP5">ControllerGroup</a>&lt;?&gt;&nbsp;theParent,
java.lang.String&nbsp;theName,
float&nbsp;theMin,
float&nbsp;theMax,
float&nbsp;theDefaultValue,
int&nbsp;theX,
int&nbsp;theY,
int&nbsp;theWidth)</pre>
</li>
</ul>
<a name="Knob(controlP5.ControlP5, java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Knob</h4>
<pre>public&nbsp;Knob(<a href="../controlP5/ControlP5.html" title="class in controlP5">ControlP5</a>&nbsp;theControlP5,
java.lang.String&nbsp;theName)</pre>
<div class="block">Convenience constructor to extend Knob.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>theControlP5</code> - </dd><dd><code>theName</code> - </dd><script type="text/javascript">
<!--
document.getElementsByTagName('html')[0].className = 'isjs';function toggle(dt) { var display, dd=dt; do{ dd = dd.nextSibling } while(dd.tagName!='DD'); toOpen =!dd.style.display;dd.style.display = toOpen? 'block':''; dt.getElementsByTagName('span')[0].innerHTML = toOpen? '-':'+' ; }
-->
</script>
<div id="test" class="toggleList"><dl><dt onclick="toggle(this);"><span>+</span>Example</dt><dd><code><pre>/**
* ControlP5 extending Controllers
*
* the following example shows how to extend the Controller class to
* create customizable Controllers. You can either extend the Controller class itself,
* or any class that extends Controller itself like the Slider, Button, DropdownList, etc.
*
* How to:
*
* 1) do a super call to the convenience constructor requiring
* 2 parameter (ControlP5 instance, name)
*
* 2) the Controller class has a set of empty methods that allow you to capture
* inputs from the mouse including
* onEnter(), onLeave(), onPress(), onRelease(), onClick(), onScroll(int), onDrag()
* These you can override and include functionality as needed.
*
* 3) use method getPointer() to return the local (relative)
* xy-coordinates of the controller
*
* 4) after instantiation custom controllers are treated the same
* as default controlP5 controllers.
*
* by Andreas Schlegel, 2012
* www.sojamo.de/libraries/controlp5
*
*/
import controlP5.*;
ControlP5 cp5;
PApplet p;
void setup() {
size(400, 400);
cp5 = new ControlP5(this);
// create 2 groups to show nesting of custom controllers and
//
Group g1 = cp5.addGroup("a").setPosition(0,100).setWidth(180);
Group g2 = cp5.addGroup("b").setPosition(0,10).setWidth(180);
g2.moveTo(g1);
// create 2 custom Controllers from class MyButton
// MyButton extends Controller and inherits all methods accordingly.
new MyButton(cp5, "b1").setPosition(0, 0).setSize(180, 200).moveTo(g2);
new MyButton(cp5, "b2").setPosition(205, 15).setSize(180, 200);
}
void draw() {
background(0);
}
// b1 will be called from Controller b1
public void b1(float theValue) {
println("yay button "+theValue);
}
public void controlEvent(ControlEvent theEvent) {
println("controlEvent : "+theEvent);
}
// Create a custom Controller, please not that
// MyButton extends Controller<MyButton>, <MyButton>
// is an indicator for the super class about the type of
// custom controller to be created.
class MyButton extends Controller<MyButton> {
int current = 0xffff0000;
float a = 128;
float na;
int y;
// use the convenience constructor of super class Controller
// MyButton will automatically registered and move to the
// default controlP5 tab.
MyButton(ControlP5 cp5, String theName) {
super(cp5, theName);
// replace the default view with a custom view.
setView(new ControllerView() {
public void display(PApplet p, Object b) {
// draw button background
na += (a-na) * 0.1;
p.fill(current,na);
p.rect(0, 0, getWidth(), getHeight());
// draw horizontal line which can be moved on the x-axis
// using the scroll wheel.
p.fill(0,255,0);
p.rect(0,y,width,10);
// draw the custom label
p.fill(128);
translate(0,getHeight()+14);
p.text(getName(),0,0);
p.text(getName(),0,0);
}
}
);
}
// override various input methods for mouse input control
void onEnter() {
cursor(HAND);
println("enter");
a = 255;
}
void onScroll(int n) {
println("scrolling");
y -= n;
y = constrain(y,0,getHeight()-10);
}
void onPress() {
println("press");
current = 0xffffff00;
}
void onClick() {
Pointer p1 = getPointer();
println("clicked at "+p1.x()+", "+p1.y());
current = 0xffffff00;
setValue(y);
}
void onRelease() {
println("release");
current = 0xffffffff;
}
void onMove() {
println("moving "+this+" "+_myControlWindow.getMouseOverList());
}
void onDrag() {
current = 0xff0000ff;
Pointer p1 = getPointer();
float dif = dist(p1.px(),p1.py(),p1.x(),p1.y());
println("dragging at "+p1.x()+", "+p1.y()+" "+dif);
}
void onReleaseOutside() {
onLeave();
}
void onLeave() {
println("leave");
cursor(ARROW);
a = 128;
}
}
</pre></code></dd></dl></div></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getAngle()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAngle</h4>
<pre>public&nbsp;float&nbsp;getAngle()</pre>
</li>
</ul>
<a name="getAngleRange()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAngleRange</h4>
<pre>public&nbsp;float&nbsp;getAngleRange()</pre>
</li>
</ul>
<a name="getDragDirection()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDragDirection</h4>
<pre>public&nbsp;int&nbsp;getDragDirection()</pre>
<div class="block">Gets the drag direction which is either Controller.HORIZONTAL or Controller.VERTICAL.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>int returns Controller.HORIZONTAL or Controller.VERTICAL</dd></dl>
</li>
</ul>
<a name="getNumberOfTickMarks()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumberOfTickMarks</h4>
<pre>public&nbsp;int&nbsp;getNumberOfTickMarks()</pre>
</li>
</ul>
<a name="getRadius()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRadius</h4>
<pre>public&nbsp;float&nbsp;getRadius()</pre>
</li>
</ul>
<a name="getResolution()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResolution</h4>
<pre>public&nbsp;float&nbsp;getResolution()</pre>
</li>
</ul>
<a name="getStartAngle()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStartAngle</h4>
<pre>public&nbsp;float&nbsp;getStartAngle()</pre>
<div class="block">get the start angle, 0 is at 3 o'clock.</div>
</li>
</ul>
<a name="getTickMarkLength()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTickMarkLength</h4>
<pre>public&nbsp;int&nbsp;getTickMarkLength()</pre>
</li>
</ul>
<a name="getTickMarkWeight()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTickMarkWeight</h4>
<pre>public&nbsp;float&nbsp;getTickMarkWeight()</pre>
</li>
</ul>
<a name="getValue()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getValue</h4>
<pre>public&nbsp;float&nbsp;getValue()</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../controlP5/ControllerInterface.html#getValue()">getValue</a></code>&nbsp;in interface&nbsp;<code><a href="../controlP5/ControllerInterface.html" title="interface in controlP5">ControllerInterface</a>&lt;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&gt;</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../controlP5/Controller.html#getValue()">getValue</a></code>&nbsp;in class&nbsp;<code><a href="../controlP5/Controller.html" title="class in controlP5">Controller</a>&lt;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&gt;</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>float</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../controlP5/Controller.html#getStringValue()"><code>Controller.getStringValue()</code></a>,
<a href="../controlP5/Controller.html#getArrayValue()"><code>Controller.getArrayValue()</code></a></dd></dl>
</li>
</ul>
<a name="getViewStyle()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getViewStyle</h4>
<pre>public&nbsp;int&nbsp;getViewStyle()</pre>
</li>
</ul>
<a name="hideTickMarks()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hideTickMarks</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;hideTickMarks()</pre>
</li>
</ul>
<a name="isConstrained()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isConstrained</h4>
<pre>public&nbsp;boolean&nbsp;isConstrained()</pre>
</li>
</ul>
<a name="isShowAngleRange()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isShowAngleRange</h4>
<pre>public&nbsp;boolean&nbsp;isShowAngleRange()</pre>
</li>
</ul>
<a name="isShowTickMarks()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isShowTickMarks</h4>
<pre>public&nbsp;boolean&nbsp;isShowTickMarks()</pre>
</li>
</ul>
<a name="mousePressed()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mousePressed</h4>
<pre>public&nbsp;void&nbsp;mousePressed()</pre>
</li>
</ul>
<a name="mouseReleasedOutside()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mouseReleasedOutside</h4>
<pre>public&nbsp;void&nbsp;mouseReleasedOutside()</pre>
</li>
</ul>
<a name="scrolled(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>scrolled</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;scrolled(int&nbsp;theRotationValue)</pre>
<div class="block">Changes the value of the knob when hovering and using the mouse wheel or the scroll function
of a multi-touch track pad.</div>
</li>
</ul>
<a name="setAngleRange(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAngleRange</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setAngleRange(float&nbsp;theRange)</pre>
<div class="block">set the range in between which the know operates. By default the range is PI + HALF_PI</div>
</li>
</ul>
<a name="setConstrained(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setConstrained</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setConstrained(boolean&nbsp;theValue)</pre>
</li>
</ul>
<a name="setDragDirection(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDragDirection</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setDragDirection(int&nbsp;theValue)</pre>
<div class="block">Sets the drag direction, when controlling a knob, parameter is either Controller.HORIZONTAL
or Controller.VERTICAL.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>theValue</code> - must be Controller.HORIZONTAL or Controller.VERTICAL</dd>
<dt><span class="strong">Returns:</span></dt><dd>Knob</dd></dl>
</li>
</ul>
<a name="setMax(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMax</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setMax(float&nbsp;theValue)</pre>
<div class="block"><strong>Description copied from class:&nbsp;<code><a href="../controlP5/Controller.html#setMax(float)">Controller</a></code></strong></div>
<div class="block">sets the maximum value of the Controller.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../controlP5/Controller.html#setMax(float)">setMax</a></code>&nbsp;in class&nbsp;<code><a href="../controlP5/Controller.html" title="class in controlP5">Controller</a>&lt;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>theValue</code> - float</dd>
<dt><span class="strong">Returns:</span></dt><dd>Controller</dd></dl>
</li>
</ul>
<a name="setMin(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMin</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setMin(float&nbsp;theValue)</pre>
<div class="block"><strong>Description copied from class:&nbsp;<code><a href="../controlP5/Controller.html#setMin(float)">Controller</a></code></strong></div>
<div class="block">sets the minimum value of the Controller.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../controlP5/Controller.html#setMin(float)">setMin</a></code>&nbsp;in class&nbsp;<code><a href="../controlP5/Controller.html" title="class in controlP5">Controller</a>&lt;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>theValue</code> - float</dd>
<dt><span class="strong">Returns:</span></dt><dd>Controller</dd></dl>
</li>
</ul>
<a name="setNumberOfTickMarks(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setNumberOfTickMarks</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setNumberOfTickMarks(int&nbsp;theNumber)</pre>
</li>
</ul>
<a name="setRadius(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRadius</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setRadius(float&nbsp;theValue)</pre>
</li>
</ul>
<a name="setRange(float, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRange</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setRange(float&nbsp;theMin,
float&nbsp;theMax)</pre>
</li>
</ul>
<a name="setResolution(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setResolution</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setResolution(float&nbsp;theValue)</pre>
<div class="block">resolution is a sensitivity value when dragging a knob. the higher the value, the more
sensitive the dragging.</div>
</li>
</ul>
<a name="setScrollSensitivity(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setScrollSensitivity</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setScrollSensitivity(float&nbsp;theValue)</pre>
<div class="block">Sets the sensitivity for the scroll behavior when using the mouse wheel or the scroll
function of a multi-touch track pad. The smaller the value (closer to 0) the higher the
sensitivity.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>theValue</code> - </dd>
<dt><span class="strong">Returns:</span></dt><dd>Knob</dd></dl>
</li>
</ul>
<a name="setShowAngleRange(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setShowAngleRange</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setShowAngleRange(boolean&nbsp;theValue)</pre>
</li>
</ul>
<a name="setSize(int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSize</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setSize(int&nbsp;theWidth,
int&nbsp;theHeight)</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../controlP5/Controller.html#setSize(int, int)">setSize</a></code>&nbsp;in class&nbsp;<code><a href="../controlP5/Controller.html" title="class in controlP5">Controller</a>&lt;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&gt;</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>Controller</dd></dl>
</li>
</ul>
<a name="setStartAngle(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStartAngle</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setStartAngle(float&nbsp;theAngle)</pre>
<div class="block">The start angle is a value between 0 and TWO_PI. By default the start angle is set to HALF_PI
+ PI * 0.25f</div>
</li>
</ul>
<a name="setTickMarkLength(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTickMarkLength</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setTickMarkLength(int&nbsp;theLength)</pre>
</li>
</ul>
<a name="setTickMarkWeight(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTickMarkWeight</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setTickMarkWeight(float&nbsp;theWeight)</pre>
</li>
</ul>
<a name="setValue(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setValue</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setValue(float&nbsp;theValue)</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../controlP5/ControllerInterface.html#setValue(float)">setValue</a></code>&nbsp;in interface&nbsp;<code><a href="../controlP5/ControllerInterface.html" title="interface in controlP5">ControllerInterface</a>&lt;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&gt;</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../controlP5/Controller.html#setValue(float)">setValue</a></code>&nbsp;in class&nbsp;<code><a href="../controlP5/Controller.html" title="class in controlP5">Controller</a>&lt;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>theValue</code> - float</dd></dl>
</li>
</ul>
<a name="setViewStyle(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setViewStyle</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;setViewStyle(int&nbsp;theStyle)</pre>
<div class="block">set the display style of a knob. takes parameters Knob.LINE, Knob.ELLIPSE or Knob.ARC.
default style is Knob.LINE</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>theStyle</code> - use Knob.LINE, Knob.ELLIPSE or Knob.ARC</dd>
<dt><span class="strong">Returns:</span></dt><dd>Knob</dd></dl>
</li>
</ul>
<a name="showTickMarks()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>showTickMarks</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;showTickMarks()</pre>
</li>
</ul>
<a name="shuffle()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shuffle</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;shuffle()</pre>
<div class="block">Assigns a random value to the controller.</div>
</li>
</ul>
<a name="snapToTickMarks(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>snapToTickMarks</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;snapToTickMarks(boolean&nbsp;theFlag)</pre>
</li>
</ul>
<a name="update()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>update</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;update()</pre>
<div class="block"><strong>Description copied from class:&nbsp;<code><a href="../controlP5/Controller.html#update()">Controller</a></code></strong></div>
<div class="block">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().</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../controlP5/ControllerInterface.html#update()">update</a></code>&nbsp;in interface&nbsp;<code><a href="../controlP5/ControllerInterface.html" title="interface in controlP5">ControllerInterface</a>&lt;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&gt;</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../controlP5/Controller.html#update()">update</a></code>&nbsp;in class&nbsp;<code><a href="../controlP5/Controller.html" title="class in controlP5">Controller</a>&lt;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&gt;</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>Controller</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../controlP5/Controller.html#setUpdate(boolean)"><code>Controller.setUpdate(boolean)</code></a>,
<a href="../controlP5/Controller.html#isUpdate()"><code>Controller.isUpdate()</code></a></dd></dl>
</li>
</ul>
<a name="updateDisplayMode(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateDisplayMode</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;updateDisplayMode(int&nbsp;theMode)</pre>
</li>
</ul>
<a name="updateInternalEvents(processing.core.PApplet)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>updateInternalEvents</h4>
<pre>public&nbsp;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&nbsp;updateInternalEvents(processing.core.PApplet&nbsp;theApplet)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../controlP5/ControllerInterface.html#updateInternalEvents(processing.core.PApplet)">ControllerInterface</a></code></strong></div>
<div class="block">a method for putting input events like e.g. mouse or keyboard events and queries. this has
been taken out of the draw method for better overwriting capability.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../controlP5/ControllerInterface.html#updateInternalEvents(processing.core.PApplet)">updateInternalEvents</a></code>&nbsp;in interface&nbsp;<code><a href="../controlP5/ControllerInterface.html" title="interface in controlP5">ControllerInterface</a>&lt;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&gt;</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../controlP5/Controller.html#updateInternalEvents(processing.core.PApplet)">updateInternalEvents</a></code>&nbsp;in class&nbsp;<code><a href="../controlP5/Controller.html" title="class in controlP5">Controller</a>&lt;<a href="../controlP5/Knob.html" title="class in controlP5">Knob</a>&gt;</code></dd>
<dt><span class="strong">See Also:</span></dt><dd><code>ControllerInterface.updateInternalEvents</code></dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../controlP5/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../index-all.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../controlP5/Group.html" title="class in controlP5"><span class="strong">Prev Class</span></a></li>
<li><a href="../controlP5/Label.html" title="class in controlP5"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?controlP5/Knob.html" target="_top">Frames</a></li>
<li><a href="Knob.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>processing library controlP5 by Andreas Schlegel. (c) 2006-2014</small></p>
</body>
</html>