diff --git a/reference/allclasses-frame.html b/reference/allclasses-frame.html deleted file mode 100644 index e479b91..0000000 --- a/reference/allclasses-frame.html +++ /dev/null @@ -1,85 +0,0 @@ - - - -
- -Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final java.lang.String |
-grixelbase64 |
-"AnoADABgACAFAgQICAoIAgQEBgYDBQIKCQMICAgICAcICAIDBQYFBwkICAgIBwcICAYHCAcJCAgICAgICAgICggICAQKBAQHBAcHBwcHBQcHAgUHBAoHBwcHBgcGBwcKBwcHBQIFCAJAJeIjkENBAAAAQHzk4wPz5/Pz8QEAAB4ePj8+Pz6fX9AHCgoECvL58fnx+QsKiigo6C8CIAEIIAAAARwgEAoEAAAAAAAABAAAAAAAICIAAZVIUiERBQEAAIAIWlAQSkAQKCgIICCEhAQFBQUFAgFBBCgoMGwoKCgoKAghKCiioCCgEIAKQIAAAAQIgAAgEAAAAAAAABAAAAAAAICIsAUEfwlCRBCkEAAAIUhAQCQBAaCgIEAAAcoUFBQQFAgEBBGgoECpoqCgoKAAhKCgiEREQIIAAgAAAgAQIAACgEAAAAAAAABAAAAAAAAAIrIBEIgkgBBBEEEAAIIgAQGJ/ARAgoKS+AioVFBQQFAgEBBEgEICmZKCgoKCAhCCgiKioIAIBAgA4Pl4fJ7n+YRC8c7H8/F5ni8UiigU+okIAEAg4gOBA0HfhwcEguTDEwL0g/DxAwFAoFJ/PwFBv1/eHwH6CASKCgoKCvJBCAqKCAEBISAgAAAoFAqFQigUikREoVAoFISEUCgiSQgSQgAAgQgSAlEEEQQACAhSANAfUBAhCAiIj2BKBQUFBAUCQUEEKCQQKCzoJ+gHCCEoKCIKBIIAgQAAvlAg9AuhUOgREYVCoVBgEEKhiBghhIgAAAB/SITEEKQQABAgSAFAIEBBhCAgQABByBMUFBAUCAQFEaGgQKCgoICgECCEIJGIRBAEAggCAIRCgVAghEKhSEQUCoVCAUYIhSJihAgiAgAAiCQJFUMQAAgggCAFBIEEBRGCghACAkBAUFBQUCAQFESEggKBgoICkoKCEIIoIgpCCAhACAAQCoVCoRAKhUIRUSgUCgUhISSJSBISiAgAQCDiE4gTQQAgUAB89OcD4uND8PFJAAAEfkE/Pj++gF/Q5wn6BQryCfAJ8kHwQXAnCOEvACIAgM/j8XiCLxQKWUQhz8cXeDgPw52Q7yciAAAAAAIAANgAQAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAgAPg4AcAAAAAACAACAAAAAABEAAAAAAAACAAawAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4ABgAAAAABEAAAAAAAAB4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" |
-
-
-public static final java.lang.String |
-standard56base64 |
-"AeYACQBgACAEAgQGBggHAgMDBgYDBQIFBgMGBgYGBgYGBgIDBAYEBggGBgYGBgYGBgIGBgUIBgYGBgYGBgYGCAYGBgMFAwYHAwUFBQUFAwUFAgMFAggFBQUFBAQEBQUIBQUFBAMEBQKgUgghRwoBAIAcOQ7yOZ/jAADAAXAe5/k+JwqKQlDkPM7jfFGUFEXfwghAQAAICIQUAgAAAAABAAAAQAkVqBSvJFJUEQCQaFHEBBEURQAAiDiiKIqCIIqCkjAWRVEURUQUJUURFCEFIBAAAgEBhAAAAABAAAAAAEikBIIvkFAQOQQAJBIEKU8ARVGiLyCRKAqiIAiioCJUTVEURQERRUmKgkQoAsAd40zcSambY447u5SSUnoSAYBAcRBMRNWHh4iEMAn0II4HBBAk6XuC6HmyL2gISVX0RI9DREoSQRAhAgBIKaW0lFIpKaWUIiSlpJRQhAAg+CCSFBFBACAiEdAHRUgEgfiIqIqiIAqCKAoqQlAWBVEBEZGSpBBCiAAAUgrpJaU0SkoppRBJKckkIxEAAJRHKkIEEACESEKERBERRUEAAVKiKIqCIIqKkhAURUGUREREJEVEECQAgJRSCkkplZJSSilIUkpKKUgEAAKFCHGhAIBAwdHnII5DOA4iIAiB6HGeL3CinOgFRU7gRA7hEDYR8QUJ+MEd40xcSqmkZI6LEWdsknsSAQAAAAAAAAAgAAAAAAAAAACAAACAAwAAAAAAAAAAAAAAQAAAAAAAAAADAwAAAAAABBAAAICAAAAAAIAAJQAAAAAAAAAABAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAACAAAgIAAAAAAYAAA=" |
-
-
-public static final java.lang.String |
-standard58base64 |
-"AakACQBgACAEAgQGBggGAgMDBAYDBAIGBQMFBQUFBQUFBQICBAUEBQgFBQUFBQUFBQIFBQQGBQUFBQUFBAUGCAUGBQMFAwYGAwQEBAQEBAQEAgQEAgYEBAQEAwQEBAQGBAQEBAIEBQKgUgghIaUAAIiRMeiZZwwAAANgjjnvmRRKESVzzDGXoqQUvYURQCCAQCCSCAAAAAgAAABEqECleCVFkRAAiLSUWEgoJQAAiSOllEJIKVRiSymllCRFSSlCEVIAQQBBQAARAAAAEAAAACQpgeALJASiIwAQSQipE1BKRS+QSEohhRBSqES1UkopSIqSkkIiFAGwEZOwSaplZGx2VVXVSQIAgeIgSETy4RCSCEnoEONAgJCkd0I6p73QiKilk46RpCQZQoQIAFBVVVOVVFVVVUKqqiqKCACCDyKpiIoAICQJ9FAiCUE8ElUphRRCSqESUUohJSRJSUpECBEAoCrqoiqZqqqqiFRVUiIJAADKI5UQASEgSAoJpSRSCgECUlJKKYSUSiWilEJKSRKRlIgQJABAVVVEVVJVVVUhqaqqQhIACBQixEIBQFBg9AwyRhhDBEIIpGPOCyZl0kXJBJOMGMImEW9owAcbMQmrpKpKxjJiopQdFQAAAAAAAABAAAAAAAAAAIAAAOAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAQIAAAEAQAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgAAAgCAAAAAgAA" |
-
Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final int |
-POST |
-1 |
-
-
-public static final int |
-PRE |
-0 |
-
Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final int |
-AREA |
-5 |
-
-
-public static final int |
-BAR |
-1 |
-
-
-public static final int |
-BAR_CENTERED |
-2 |
-
-
-public static final int |
-HISTOGRAM |
-3 |
-
-
-public static final int |
-LINE |
-0 |
-
-
-public static final int |
-PIE |
-4 |
-
Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final int |
-CLOSE |
-1 |
-
-
-public static final int |
-OPEN |
-0 |
-
Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final java.lang.String |
-VERSION |
-"2.1.6" |
-
Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final int |
-ACTION_BROADCAST |
-100 |
-
-
-public static final int |
-ACTION_CLICK |
-3 |
-
-
-public static final int |
-ACTION_DRAG |
-4 |
-
-
-public static final int |
-ACTION_ENTER |
-6 |
-
-
-public static final int |
-ACTION_EXIT |
-7 |
-
-
-public static final int |
-ACTION_LEAVE |
-7 |
-
-
-public static final int |
-ACTION_MOVE |
-5 |
-
-
-public static final int |
-ACTION_PRESS |
-1 |
-
-
-public static final int |
-ACTION_PRESSED |
-1 |
-
-
-public static final int |
-ACTION_RELEASE |
-2 |
-
-
-public static final int |
-ACTION_RELEASED |
-2 |
-
-
-public static final int |
-ACTION_RELEASEDOUTSIDE |
-9 |
-
-
-public static final int |
-ACTION_WHEEL |
-8 |
-
-
-public static final int |
-ACTIVE |
-2 |
-
-
-public static final int |
-ALL |
-1 |
-
-
-public static final int |
-ALT |
-18 |
-
-
-public static final int |
-AQUA |
--8397825 |
-
-
-public static final int |
-ARC |
-3 |
-
-
-public static final int |
-ARRAY |
-5 |
-
-
-public static final int |
-BACKSPACE |
-8 |
-
-
-public static final int |
-BASELINE |
-0 |
-
-
-public static final int |
-BITFONT |
-100 |
-
-
-public static final int |
-BLACK |
--15658735 |
-
-
-public static final int |
-BLUE |
--16747303 |
-
-
-public static final int |
-BOOLEAN |
-3 |
-
-
-public static final int |
-BOTTOM |
-102 |
-
-
-public static final int |
-BOTTOM_OUTSIDE |
-13 |
-
-
-public static final int |
-CAPTIONLABEL |
-0 |
-
-
-public static final int |
-CENTER |
-3 |
-
-
-public static final int |
-CHECKBOX |
-2 |
-
-
-public static final int |
-COMMANDKEY |
-157 |
-
-
-public static final int |
-CONTROL |
-17 |
-
-
-public static final int |
-CUSTOM |
-3 |
-
-
-public static final char |
-DECREASE |
-40 |
-
-
-public static final int |
-DEFAULT |
-0 |
-
-
-public static final int |
-DELETE |
-127 |
-
-
-public static final int |
-DONE |
-6 |
-
-
-public static final int |
-DOWN |
-40 |
-
-
-public static final int |
-DROPDOWN |
-1 |
-
-
-public static final int |
-ELLIPSE |
-2 |
-
-
-public static final int |
-ENTER |
-10 |
-
-
-public static final int |
-ESCAPE |
-27 |
-
-
-public static final int |
-EVENT |
-2 |
-
-
-public static final java.lang.String |
-eventMethod |
-"controlEvent" |
-
-
-public static final int |
-FADEIN |
-3 |
-
-
-public static final int |
-FADEOUT |
-5 |
-
-
-public static final int |
-FIELD |
-1 |
-
-
-public static final int |
-FLOAT |
-2 |
-
-
-public static final int |
-FUCHSIA |
--1043778 |
-
-
-public static final int |
-GRAY |
--5592406 |
-
-
-public static final int |
-GREEN |
--13710272 |
-
-
-public static final int |
-grixel |
-3 |
-
-
-public static final float |
-HALF_PI |
-1.5707963705062866f |
-
-
-public static final char |
-HIDE |
-72 |
-
-
-public static final int |
-HIGHLIGHT |
-3 |
-
-
-public static final int |
-HORIZONTAL |
-0 |
-
-
-public static final int |
-IDLE |
-4 |
-
-
-public static final int |
-IMAGE |
-1 |
-
-
-public static final int |
-INACTIVE |
-0 |
-
-
-public static final char |
-INCREASE |
-38 |
-
-
-public static final int |
-INTEGER |
-1 |
-
-
-public static final int |
-INVALID |
--1 |
-
-
-public static final int |
-J2D |
-1 |
-
-
-public static final char |
-KEYCONTROL |
-75 |
-
-
-public static final int |
-LEFT |
-37 |
-
-
-public static final int |
-LEFT_OUTSIDE |
-10 |
-
-
-public static final int |
-LIME |
--16646288 |
-
-
-public static final int |
-LINE |
-1 |
-
-
-public static final int |
-LIST |
-0 |
-
-
-public static final char |
-LOAD |
-76 |
-
-
-public static final int |
-MAROON |
--8055733 |
-
-
-public static final char |
-MENU |
-77 |
-
-
-public static final int |
-METHOD |
-0 |
-
-
-public static final int |
-MOVE |
-0 |
-
-
-public static final int |
-MULTI |
-1 |
-
-
-public static final int |
-MULTIPLES |
-2 |
-
-
-public static final int |
-NAVY |
--16769217 |
-
-
-public static final int |
-OLIVE |
--12740240 |
-
-
-public static final int |
-ORANGE |
--31461 |
-
-
-public static final int |
-OVER |
-1 |
-
-
-public static final int |
-P2D |
-2 |
-
-
-public static final int |
-P3D |
-3 |
-
-
-public static final float |
-PI |
-3.1415927410125732f |
-
-
-public static final int |
-PRESSED |
-2 |
-
-
-public static final char |
-PRINT |
-32 |
-
-
-public static final int |
-PURPLE |
--5173815 |
-
-
-public static final int |
-RED |
--48842 |
-
-
-public static final int |
-RELEASE |
-1 |
-
-
-public static final char |
-RESET |
-82 |
-
-
-public static final int |
-RIGHT |
-39 |
-
-
-public static final int |
-RIGHT_OUTSIDE |
-11 |
-
-
-public static final char |
-SAVE |
-83 |
-
-
-public static final int |
-SHIFT |
-16 |
-
-
-public static final int |
-SILVER |
--2236963 |
-
-
-public static final int |
-SINGLE |
-0 |
-
-
-public static final int |
-SINGLE_COLUMN |
-0 |
-
-
-public static final int |
-SINGLE_ROW |
-1 |
-
-
-public static final int |
-SPRITE |
-2 |
-
-
-public static final int |
-standard56 |
-1 |
-
-
-public static final int |
-standard58 |
-0 |
-
-
-public static final int |
-STRING |
-4 |
-
-
-public static final int |
-SWITCH |
-100 |
-
-
-public static final char |
-SWITCH_BACK |
-39 |
-
-
-public static final char |
-SWITCH_FORE |
-37 |
-
-
-public static final int |
-synt24 |
-2 |
-
-
-public static final int |
-TAB |
-9 |
-
-
-public static final int |
-TEAL |
--12989236 |
-
-
-public static final int |
-TOP |
-101 |
-
-
-public static final int |
-TOP_OUTSIDE |
-12 |
-
-
-public static final int |
-TRANSITION_WAIT_FADEIN |
-2 |
-
-
-public static final int |
-TREE |
-3 |
-
-
-public static final float |
-TWO_PI |
-6.2831854820251465f |
-
-
-public static final int |
-UP |
-38 |
-
-
-public static final int |
-VALUELABEL |
-1 |
-
-
-public static final boolean |
-VERBOSE |
-false |
-
-
-public static final int |
-VERTICAL |
-1 |
-
-
-public static final int |
-WAIT |
-1 |
-
-
-public static final int |
-WHITE |
--1 |
-
-
-public static final int |
-YELLOW |
--9216 |
-
Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final int |
-CHECKBOX |
-2 |
-
-
-public static final int |
-DROPDOWN |
-1 |
-
-
-public static final int |
-LIST |
-0 |
-
-
-public static final int |
-TREE |
-3 |
-
Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final int |
-FIX |
-1 |
-
-
-public static final int |
-FLEXIBLE |
-0 |
-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Accordion.html b/reference/controlP5/Accordion.html deleted file mode 100644 index 1561add..0000000 --- a/reference/controlP5/Accordion.html +++ /dev/null @@ -1,994 +0,0 @@ - - - - - -public class Accordion -extends ControlGroup<Accordion>-
- The Accordion is a list of ControlGroups which can be expanded and collapsed. Only one item can - be open at a time. -
ControllerGroup
,
-ControlGroup
/**
- * ControlP5 Accordion
- * arrange controller groups in an accordion like style.
- *
- * find a list of public methods available for the Accordion Controller
- * at the bottom of this sketch. In the example below 3 groups with controllers
- * are created and added to an accordion controller. Furthermore several key
- * combinations are mapped to control individual settings of the accordion.
- * An accordion comes in 2 modes, Accordion.SINGLE and Accordion.MULTI where the
- * latter allows to open multiple groups of an accordion and the SINGLE mode only
- * allows 1 group to be opened at a time.
- *
- * by Andreas Schlegel, 2012
- * www.sojamo.de/libraries/controlp5
- *
- */
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-Accordion accordion;
-
-color c = color(0, 160, 100);
-
-void setup() {
- size(400, 600);
- noStroke();
- smooth();
- gui();
-}
-
-void gui() {
-
- cp5 = new ControlP5(this);
-
- // group number 1, contains 2 bangs
- Group g1 = cp5.addGroup("myGroup1")
- .setBackgroundColor(color(0, 64))
- .setBackgroundHeight(150)
- ;
-
- cp5.addBang("bang")
- .setPosition(10,20)
- .setSize(100,100)
- .moveTo(g1)
- .plugTo(this,"shuffle");
- ;
-
- // group number 2, contains a radiobutton
- Group g2 = cp5.addGroup("myGroup2")
- .setBackgroundColor(color(0, 64))
- .setBackgroundHeight(150)
- ;
-
- cp5.addRadioButton("radio")
- .setPosition(10,20)
- .setItemWidth(20)
- .setItemHeight(20)
- .addItem("black", 0)
- .addItem("red", 1)
- .addItem("green", 2)
- .addItem("blue", 3)
- .addItem("grey", 4)
- .setColorLabel(color(255))
- .activate(2)
- .moveTo(g2)
- ;
-
- // group number 3, contains a bang and a slider
- Group g3 = cp5.addGroup("myGroup3")
- .setBackgroundColor(color(0, 64))
- .setBackgroundHeight(150)
- ;
-
- cp5.addBang("shuffle")
- .setPosition(10,20)
- .setSize(40,50)
- .moveTo(g3)
- ;
-
- cp5.addSlider("hello")
- .setPosition(60,20)
- .setSize(100,20)
- .setRange(100,500)
- .setValue(100)
- .moveTo(g3)
- ;
-
- cp5.addSlider("world")
- .setPosition(60,50)
- .setSize(100,20)
- .setRange(100,500)
- .setValue(200)
- .moveTo(g3)
- ;
-
- // create a new accordion
- // add g1, g2, and g3 to the accordion.
- accordion = cp5.addAccordion("acc")
- .setPosition(40,40)
- .setWidth(200)
- .addItem(g1)
- .addItem(g2)
- .addItem(g3)
- ;
-
- cp5.mapKeyFor(new ControlKey() {public void keyEvent() {accordion.open(0,1,2);}}, 'o');
- cp5.mapKeyFor(new ControlKey() {public void keyEvent() {accordion.close(0,1,2);}}, 'c');
- cp5.mapKeyFor(new ControlKey() {public void keyEvent() {accordion.setWidth(300);}}, '1');
- cp5.mapKeyFor(new ControlKey() {public void keyEvent() {accordion.setPosition(0,0);accordion.setItemHeight(190);}}, '2');
- cp5.mapKeyFor(new ControlKey() {public void keyEvent() {accordion.setCollapseMode(ControlP5.ALL);}}, '3');
- cp5.mapKeyFor(new ControlKey() {public void keyEvent() {accordion.setCollapseMode(ControlP5.SINGLE);}}, '4');
- cp5.mapKeyFor(new ControlKey() {public void keyEvent() {cp5.remove("myGroup1");}}, '0');
-
- accordion.open(0,1,2);
-
- // use Accordion.MULTI to allow multiple group
- // to be open at a time.
- accordion.setCollapseMode(Accordion.MULTI);
-
- // when in SINGLE mode, only 1 accordion
- // group can be open at a time.
- // accordion.setCollapseMode(Accordion.SINGLE);
-}
-
-
-void radio(int theC) {
- switch(theC) {
- case(0):c=color(0,200);break;
- case(1):c=color(255,0,0,200);break;
- case(2):c=color(0, 200, 140,200);break;
- case(3):c=color(0, 128, 255,200);break;
- case(4):c=color(50,128);break;
- }
-}
-
-
-void shuffle() {
- c = color(random(255),random(255),random(255),random(128,255));
-}
-
-
-void draw() {
- background(220);
-
- fill(c);
-
- float s1 = cp5.getController("hello").getValue();
- ellipse(200,400,s1,s1);
-
- float s2 = cp5.getController("world").getValue();
- ellipse(300,100,s2,s2);
-}
-
-
-
-
-
-/*
-a list of all methods available for the Accordion Controller
-use ControlP5.printPublicMethodsFor(Accordion.class);
-to print the following list into the console.
-
-You can find further details about class Accordion in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-
-controlP5.Accordion : Accordion addItem(ControlGroup)
-controlP5.Accordion : Accordion remove(ControllerInterface)
-controlP5.Accordion : Accordion removeItem(ControlGroup)
-controlP5.Accordion : Accordion setItemHeight(int)
-controlP5.Accordion : Accordion setMinItemHeight(int)
-controlP5.Accordion : Accordion setWidth(int)
-controlP5.Accordion : Accordion updateItems()
-controlP5.Accordion : int getItemHeight()
-controlP5.Accordion : int getMinItemHeight()
-controlP5.ControlGroup : Accordion activateEvent(boolean)
-controlP5.ControlGroup : Accordion addListener(ControlListener)
-controlP5.ControlGroup : Accordion hideBar()
-controlP5.ControlGroup : Accordion removeListener(ControlListener)
-controlP5.ControlGroup : Accordion setBackgroundColor(int)
-controlP5.ControlGroup : Accordion setBackgroundHeight(int)
-controlP5.ControlGroup : Accordion setBarHeight(int)
-controlP5.ControlGroup : Accordion showBar()
-controlP5.ControlGroup : Accordion updateInternalEvents(PApplet)
-controlP5.ControlGroup : String getInfo()
-controlP5.ControlGroup : String toString()
-controlP5.ControlGroup : boolean isBarVisible()
-controlP5.ControlGroup : int getBackgroundHeight()
-controlP5.ControlGroup : int getBarHeight()
-controlP5.ControlGroup : int listenerSize()
-controlP5.ControllerGroup : Accordion add(ControllerInterface)
-controlP5.ControllerGroup : Accordion bringToFront()
-controlP5.ControllerGroup : Accordion bringToFront(ControllerInterface)
-controlP5.ControllerGroup : Accordion close()
-controlP5.ControllerGroup : Accordion disableCollapse()
-controlP5.ControllerGroup : Accordion enableCollapse()
-controlP5.ControllerGroup : Accordion hide()
-controlP5.ControllerGroup : Accordion moveTo(ControlWindow)
-controlP5.ControllerGroup : Accordion moveTo(PApplet)
-controlP5.ControllerGroup : Accordion open()
-controlP5.ControllerGroup : Accordion registerProperty(String)
-controlP5.ControllerGroup : Accordion registerProperty(String, String)
-controlP5.ControllerGroup : Accordion remove(CDrawable)
-controlP5.ControllerGroup : Accordion remove(ControllerInterface)
-controlP5.ControllerGroup : Accordion removeCanvas(ControlWindowCanvas)
-controlP5.ControllerGroup : Accordion removeProperty(String)
-controlP5.ControllerGroup : Accordion removeProperty(String, String)
-controlP5.ControllerGroup : Accordion setAddress(String)
-controlP5.ControllerGroup : Accordion setArrayValue(float[])
-controlP5.ControllerGroup : Accordion setColor(CColor)
-controlP5.ControllerGroup : Accordion setColorActive(int)
-controlP5.ControllerGroup : Accordion setColorBackground(int)
-controlP5.ControllerGroup : Accordion setColorForeground(int)
-controlP5.ControllerGroup : Accordion setColorLabel(int)
-controlP5.ControllerGroup : Accordion setColorValue(int)
-controlP5.ControllerGroup : Accordion setHeight(int)
-controlP5.ControllerGroup : Accordion setId(int)
-controlP5.ControllerGroup : Accordion setLabel(String)
-controlP5.ControllerGroup : Accordion setMouseOver(boolean)
-controlP5.ControllerGroup : Accordion setMoveable(boolean)
-controlP5.ControllerGroup : Accordion setOpen(boolean)
-controlP5.ControllerGroup : Accordion setPosition(PVector)
-controlP5.ControllerGroup : Accordion setPosition(float, float)
-controlP5.ControllerGroup : Accordion setStringValue(String)
-controlP5.ControllerGroup : Accordion setUpdate(boolean)
-controlP5.ControllerGroup : Accordion setValue(float)
-controlP5.ControllerGroup : Accordion setVisible(boolean)
-controlP5.ControllerGroup : Accordion setWidth(int)
-controlP5.ControllerGroup : Accordion show()
-controlP5.ControllerGroup : Accordion update()
-controlP5.ControllerGroup : Accordion updateAbsolutePosition()
-controlP5.ControllerGroup : CColor getColor()
-controlP5.ControllerGroup : ControlWindow getWindow()
-controlP5.ControllerGroup : ControlWindowCanvas addCanvas(ControlWindowCanvas)
-controlP5.ControllerGroup : Controller getController(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String, String)
-controlP5.ControllerGroup : Label getCaptionLabel()
-controlP5.ControllerGroup : Label getValueLabel()
-controlP5.ControllerGroup : PVector getPosition()
-controlP5.ControllerGroup : String getAddress()
-controlP5.ControllerGroup : String getInfo()
-controlP5.ControllerGroup : String getName()
-controlP5.ControllerGroup : String getStringValue()
-controlP5.ControllerGroup : String toString()
-controlP5.ControllerGroup : Tab getTab()
-controlP5.ControllerGroup : boolean isCollapse()
-controlP5.ControllerGroup : boolean isMouseOver()
-controlP5.ControllerGroup : boolean isMoveable()
-controlP5.ControllerGroup : boolean isOpen()
-controlP5.ControllerGroup : boolean isUpdate()
-controlP5.ControllerGroup : boolean isVisible()
-controlP5.ControllerGroup : boolean setMousePressed(boolean)
-controlP5.ControllerGroup : float getValue()
-controlP5.ControllerGroup : float[] getArrayValue()
-controlP5.ControllerGroup : int getHeight()
-controlP5.ControllerGroup : int getId()
-controlP5.ControllerGroup : int getWidth()
-controlP5.ControllerGroup : void remove()
-java.lang.Object : String toString()
-java.lang.Object : boolean equals(Object)
-
-
-*/
-
-
-
-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Accordion(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend Accordion.
- |
-
Modifier and Type | -Method and Description | -
---|---|
Accordion |
-addItem(ControlGroup<?> theGroup)
-Adds items of type ControlGroup to the Accordion, only ControlGroups can be added.
- |
-
Accordion |
-close() |
-
Accordion |
-close(int... theId) |
-
void |
-controlEvent(ControlEvent theEvent)
-controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about
- value changes.
- |
-
int |
-getItemHeight() |
-
int |
-getMinItemHeight() |
-
Accordion |
-open() |
-
Accordion |
-open(int... theId) |
-
Accordion |
-remove(ControllerInterface<?> theGroup)
-Removes a ControlGroup from the accordion AND from controlP5 remove(ControllerInterface
- theGroup) overwrites it's super method.
- |
-
Accordion |
-removeItem(ControlGroup<?> theGroup)
-Removes a ControlGroup from the accordion and puts it back into the default tab of controlP5.
- |
-
Accordion |
-setCollapseMode(int theMode) |
-
Accordion |
-setItemHeight(int theHeight) |
-
Accordion |
-setMinItemHeight(int theHeight)
-Sets the minimum height of a collapsed item, default value is 100.
- |
-
Accordion |
-setWidth(int theWidth) |
-
Accordion |
-updateItems()
-UpdateItems is called when changes such as remove, change of height is performed on an
- accordion.
- |
-
activateEvent, addListener, getBackgroundHeight, getBarHeight, getInfo, listenerSize, mousePressed, removeListener, setBackgroundColor, setBackgroundHeight, setBarHeight, setSize, stringValue, toString, updateInternalEvents
absolutePosition, add, addCanvas, addCloseButton, addDrawable, arrayValue, bringToFront, bringToFront, color, continuousUpdateEvents, controller, disableCollapse, draw, enableCollapse, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getCaptionLabel, getColor, getController, getHeight, getId, getName, getParent, getPickingColor, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getWidth, getWindow, hide, hideArrow, hideBar, id, init, isBarVisible, isCollapse, isMouseOver, isMoveable, isOpen, isUpdate, isVisible, keyEvent, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, name, parent, position, registerProperty, registerProperty, remove, remove, removeCanvas, removeCloseButton, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorForeground, setColorLabel, setColorValue, setGroup, setGroup, setHeight, setId, setLabel, setMouseOver, setMousePressed, setMoveable, setOpen, setPosition, setPosition, setStringValue, setTab, setTab, setTab, setTitle, setUpdate, setValue, setVisible, show, showArrow, showBar, update, updateAbsolutePosition, updateEvents, value
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public Accordion(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public Accordion addItem(ControlGroup<?> theGroup)-
theGroup
- public Accordion close()-
close
in class ControllerGroup<Accordion>
public Accordion close(int... theId)-
public void controlEvent(ControlEvent theEvent)-
ControlListener
controlEvent
in interface ControlListener
controlEvent
in class ControlGroup<Accordion>
theEvent
- ControlEventCallbackListener
,
-CallbackEvent
public int getItemHeight()-
public int getMinItemHeight()-
public Accordion open()-
open
in class ControllerGroup<Accordion>
public Accordion open(int... theId)-
public Accordion remove(ControllerInterface<?> theGroup)-
remove
in interface ControllerInterface<Accordion>
remove
in class ControllerGroup<Accordion>
theGroup
- ControllerInterfaceremoveItem(ControlGroup)
public Accordion removeItem(ControlGroup<?> theGroup)-
public Accordion setCollapseMode(int theMode)-
public Accordion setItemHeight(int theHeight)-
public Accordion setMinItemHeight(int theHeight)-
theHeight
- public Accordion setWidth(int theWidth)-
setWidth
in class ControllerGroup<Accordion>
public Accordion updateItems()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Bang.html b/reference/controlP5/Bang.html deleted file mode 100644 index cf15b45..0000000 --- a/reference/controlP5/Bang.html +++ /dev/null @@ -1,817 +0,0 @@ - - - - - -public class Bang -extends Controller<Bang>-
- The Bang controller triggers an event when pressed. A bang can only be assigned to a function in
- your program but not to a field like other controllers. Bang extends superclass Controller, for a
- full documentation see the Controller
reference.
-
/**
- * ControlP5 Bang
- * A bang triggers an event that can be received by a function named after the bang.
- * By default a bang is triggered when pressed, this can be changed to 'release'
- * using theBang.setTriggerEvent(Bang.RELEASE).
- *
- * find a list of public methods available for the Bang 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);
-
-color[] col = new color[] {
- color(100), color(150), color(200), color(250)
-};
-
-
-void setup() {
- size(400, 600);
- noStroke();
- cp5 = new ControlP5(this);
- for (int i=0;i
autoHeight, autoSpacing, autoWidth
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Bang(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend Bang.
- |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getInfo() |
-
int |
-getTriggerEvent() |
-
Bang |
-setTriggerEvent(int theEventID)
-By default a bang is triggered when the mouse is pressed.
- |
-
Bang |
-setValue(float theValue)
-Sets the value of the bang controller.
- |
-
java.lang.String |
-toString() |
-
Bang |
-update()
-updates the value of the controller without having to set the value explicitly.
- |
-
Bang |
-updateDisplayMode(int theMode) |
-
Bang |
-updateViewMode(int theMode) |
-
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, draw, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setHeight, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, setWidth, show, unlock, unplugFrom, unplugFrom, unregisterTooltip, updateAbsolutePosition, updateEvents, updateInternalEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public Bang(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public java.lang.String getInfo()-
getInfo
in class Controller<Bang>
public int getTriggerEvent()-
public Bang setTriggerEvent(int theEventID)-
theEventID
- public Bang setValue(float theValue)-
setValue
in interface ControllerInterface<Bang>
setValue
in class Controller<Bang>
theValue
- floatpublic java.lang.String toString()-
toString
in class Controller<Bang>
public Bang update()-
Controller
update
in interface ControllerInterface<Bang>
update
in class Controller<Bang>
Controller.setUpdate(boolean)
,
-Controller.isUpdate()
public Bang updateDisplayMode(int theMode)-
public Bang updateViewMode(int theMode)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/BitFont.html b/reference/controlP5/BitFont.html deleted file mode 100644 index 8b7a7af..0000000 --- a/reference/controlP5/BitFont.html +++ /dev/null @@ -1,378 +0,0 @@ - - - - - -public class BitFont
-extends processing.core.PFont
-processing.core.PFont.Glyph
Modifier and Type | -Field and Description | -
---|---|
static int |
-defaultChar |
-
static java.lang.String |
-grixelbase64 |
-
static java.lang.String |
-standard56base64 |
-
static java.lang.String |
-standard58base64 |
-
CHARSET
ADD, ALPHA, ALT, AMBIENT, ARC, ARGB, ARROW, BACKSPACE, BASELINE, BEVEL, BEZIER_VERTEX, BLEND, BLUR, BOTTOM, BOX, BREAK, BURN, CENTER, CHATTER, CHORD, CLAMP, CLOSE, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CURVE_VERTEX, CUSTOM, DARKEST, DEG_TO_RAD, DELETE, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_DEPTH_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_ERRORS, DISABLE_OPTIMIZED_STROKE, DISABLE_RETINA_PIXELS, DISABLE_STROKE_PERSPECTIVE, DISABLE_STROKE_PURE, DISABLE_TEXTURE_MIPMAPS, DODGE, DOWN, DXF, ELLIPSE, ENABLE_DEPTH_MASK, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_ERRORS, ENABLE_OPTIMIZED_STROKE, ENABLE_RETINA_PIXELS, ENABLE_STROKE_PERSPECTIVE, ENABLE_STROKE_PURE, ENABLE_TEXTURE_MIPMAPS, ENTER, EPSILON, ERODE, ERROR_BACKGROUND_IMAGE_FORMAT, ERROR_BACKGROUND_IMAGE_SIZE, ERROR_PUSHMATRIX_OVERFLOW, ERROR_PUSHMATRIX_UNDERFLOW, ERROR_TEXTFONT_NULL_PFONT, ESC, EXCLUSION, GIF, GRAY, GROUP, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LANDSCAPE, LEFT, LIGHTEST, LINE, LINE_LOOP, LINE_STRIP, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MODELVIEW, MOVE, MULTIPLY, NORMAL, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, PIE, platformNames, POINT, POINTS, POLYGON, PORTRAIT, POSTERIZE, PROBLEM, PROJECT, PROJECTION, QUAD, QUAD_BEZIER_VERTEX, QUAD_STRIP, QUADS, QUARTER_PI, RAD_TO_DEG, RADIUS, RECT, REPEAT, REPLACE, RETURN, RGB, RIGHT, ROUND, SCREEN, SHAPE, SHIFT, SOFT_LIGHT, SPHERE, SPOT, SQUARE, SUBTRACT, TAB, TARGA, TAU, TEXT, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, UP, VERTEX, WAIT, WHITESPACE, WINDOWS, X, Y, Z
Constructor and Description | -
---|
BitFont(byte[] theBytes) |
-
Modifier and Type | -Method and Description | -
---|---|
processing.core.PFont.Glyph |
-getGlyph(char c) |
-
ascent, descent, findFont, findNative, getFont, getGlyph, getGlyphCount, getName, getNative, getPostScriptName, getSize, isStream, kern, list, loadFonts, save, setNative, setSubsetting, width
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static int defaultChar-
public static final java.lang.String grixelbase64-
public static final java.lang.String standard56base64-
public static final java.lang.String standard58base64-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/BoundingBox.html b/reference/controlP5/BoundingBox.html deleted file mode 100644 index 3a4a5c2..0000000 --- a/reference/controlP5/BoundingBox.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - -public class BoundingBox -extends Controller<BoundingBox>-
autoHeight, autoSpacing, autoWidth
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
BoundingBox(ControlP5 theControlP5,
- java.lang.String theName) |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-onDrag() |
-
void |
-onEndDrag() |
-
void |
-onStartDrag() |
-
BoundingBox |
-updateViewMode(int theMode) |
-
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, draw, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getInfo, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setHeight, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValue, setValueLabel, setValueSelf, setView, setView, setVisible, setWidth, show, toString, unlock, unplugFrom, unplugFrom, unregisterTooltip, update, updateAbsolutePosition, updateEvents, updateInternalEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Button.html b/reference/controlP5/Button.html deleted file mode 100644 index 1913fde..0000000 --- a/reference/controlP5/Button.html +++ /dev/null @@ -1,1026 +0,0 @@ - - - - - -public class Button -extends Controller<Button>-
- A button triggers an event after it has been release. Events can be linked to functions and
- fields inside your program/sketch. for a full documentation of this controller see the
- Controller
class.
-
/**
- * ControlP5 Button
- * this example shows how to create buttons with controlP5.
- *
- * find a list of public methods available for the Button Controller
- * at the bottom of this sketch's source code
- *
- * by Andreas Schlegel, 2012
- * www.sojamo.de/libraries/controlp5
- *
- */
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-int myColor = color(255);
-
-int c1,c2;
-
-float n,n1;
-
-
-void setup() {
- size(400,600);
- noStroke();
- cp5 = new ControlP5(this);
-
- // create a new button with name 'buttonA'
- cp5.addButton("colorA")
- .setValue(0)
- .setPosition(100,100)
- .setSize(200,19)
- ;
-
- // and add another 2 buttons
- cp5.addButton("colorB")
- .setValue(100)
- .setPosition(100,120)
- .setSize(200,19)
- ;
-
- cp5.addButton("colorC")
- .setPosition(100,140)
- .setSize(200,19)
- .setValue(0)
- ;
-
- PImage[] imgs = {loadImage("button_a.png"),loadImage("button_b.png"),loadImage("button_c.png")};
- cp5.addButton("play")
- .setValue(128)
- .setPosition(140,300)
- .setImages(imgs)
- .updateSize()
- ;
-
- cp5.addButton("playAgain")
- .setValue(128)
- .setPosition(210,300)
- .setImages(imgs)
- .updateSize()
- ;
-
-}
-
-void draw() {
- background(myColor);
- myColor = lerpColor(c1,c2,n);
- n += (1-n)* 0.1;
-}
-
-public void controlEvent(ControlEvent theEvent) {
- println(theEvent.getController().getName());
- n = 0;
-}
-
-// function colorA will receive changes from
-// controller with name colorA
-public void colorA(int theValue) {
- println("a button event from colorA: "+theValue);
- c1 = c2;
- c2 = color(0,160,100);
-}
-
-// function colorB will receive changes from
-// controller with name colorB
-public void colorB(int theValue) {
- println("a button event from colorB: "+theValue);
- c1 = c2;
- c2 = color(150,0,0);
-}
-
-// function colorC will receive changes from
-// controller with name colorC
-public void colorC(int theValue) {
- println("a button event from colorC: "+theValue);
- c1 = c2;
- c2 = color(255,255,0);
-}
-
-public void play(int theValue) {
- println("a button event from buttonB: "+theValue);
- c1 = c2;
- c2 = color(0,0,0);
-}
-
-
-/*
-a list of all methods available for the Button Controller
-use ControlP5.printPublicMethodsFor(Button.class);
-to print the following list into the console.
-
-You can find further details about class Button in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-
-controlP5.Button : Button activateBy(int)
-controlP5.Button : Button setOff()
-controlP5.Button : Button setOn()
-controlP5.Button : Button setSwitch(boolean)
-controlP5.Button : Button setValue(float)
-controlP5.Button : Button update()
-controlP5.Button : String getInfo()
-controlP5.Button : String toString()
-controlP5.Button : boolean getBooleanValue()
-controlP5.Button : boolean isOn()
-controlP5.Button : boolean isPressed()
-controlP5.Controller : Button addCallback(CallbackListener)
-controlP5.Controller : Button addListener(ControlListener)
-controlP5.Controller : Button bringToFront()
-controlP5.Controller : Button bringToFront(ControllerInterface)
-controlP5.Controller : Button hide()
-controlP5.Controller : Button linebreak()
-controlP5.Controller : Button listen(boolean)
-controlP5.Controller : Button lock()
-controlP5.Controller : Button plugTo(Object)
-controlP5.Controller : Button plugTo(Object, String)
-controlP5.Controller : Button plugTo(Object[])
-controlP5.Controller : Button plugTo(Object[], String)
-controlP5.Controller : Button registerProperty(String)
-controlP5.Controller : Button registerProperty(String, String)
-controlP5.Controller : Button registerTooltip(String)
-controlP5.Controller : Button removeBehavior()
-controlP5.Controller : Button removeCallback()
-controlP5.Controller : Button removeCallback(CallbackListener)
-controlP5.Controller : Button removeListener(ControlListener)
-controlP5.Controller : Button removeProperty(String)
-controlP5.Controller : Button removeProperty(String, String)
-controlP5.Controller : Button setArrayValue(float[])
-controlP5.Controller : Button setArrayValue(int, float)
-controlP5.Controller : Button setBehavior(ControlBehavior)
-controlP5.Controller : Button setBroadcast(boolean)
-controlP5.Controller : Button setCaptionLabel(String)
-controlP5.Controller : Button setColor(CColor)
-controlP5.Controller : Button setColorActive(int)
-controlP5.Controller : Button setColorBackground(int)
-controlP5.Controller : Button setColorCaptionLabel(int)
-controlP5.Controller : Button setColorForeground(int)
-controlP5.Controller : Button setColorValueLabel(int)
-controlP5.Controller : Button setDecimalPrecision(int)
-controlP5.Controller : Button setDefaultValue(float)
-controlP5.Controller : Button setHeight(int)
-controlP5.Controller : Button setId(int)
-controlP5.Controller : Button setImages(PImage, PImage, PImage)
-controlP5.Controller : Button setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Button setLabelVisible(boolean)
-controlP5.Controller : Button setLock(boolean)
-controlP5.Controller : Button setMax(float)
-controlP5.Controller : Button setMin(float)
-controlP5.Controller : Button setMouseOver(boolean)
-controlP5.Controller : Button setMoveable(boolean)
-controlP5.Controller : Button setPosition(PVector)
-controlP5.Controller : Button setPosition(float, float)
-controlP5.Controller : Button setSize(PImage)
-controlP5.Controller : Button setSize(int, int)
-controlP5.Controller : Button setStringValue(String)
-controlP5.Controller : Button setUpdate(boolean)
-controlP5.Controller : Button setValueLabel(String)
-controlP5.Controller : Button setView(ControllerView)
-controlP5.Controller : Button setVisible(boolean)
-controlP5.Controller : Button setWidth(int)
-controlP5.Controller : Button show()
-controlP5.Controller : Button unlock()
-controlP5.Controller : Button unplugFrom(Object)
-controlP5.Controller : Button unplugFrom(Object[])
-controlP5.Controller : Button unregisterTooltip()
-controlP5.Controller : Button update()
-controlP5.Controller : Button updateSize()
-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 : 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)
-
-
-*/
-
-
-
-
Modifier and Type | -Field and Description | -
---|---|
static int |
-autoHeight |
-
static int |
-autoWidth |
-
autoSpacing
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Button() |
-
Button(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend Button.
- |
-
Modifier and Type | -Method and Description | -
---|---|
Button |
-activateBy(int theValue)
-A button can be activated by a mouse PRESSED or mouse RELEASE.
- |
-
boolean |
-getBooleanValue()
-Returns true or false and indicates the switch state of the button.
- |
-
java.lang.String |
-getInfo() |
-
boolean |
-isOn() |
-
boolean |
-isPressed() |
-
void |
-mousePressed() |
-
void |
-mouseReleased() |
-
void |
-mouseReleasedOutside() |
-
Button |
-setOff()
-If the button acts as a switch, setOff will turn off the switch.
- |
-
Button |
-setOn()
-If the button acts as a switch, setOn will turn on the switch.
- |
-
Button |
-setSwitch(boolean theFlag)
-Turns a button into a switch, or use a Toggle instead.
- |
-
Button |
-setValue(float theValue) |
-
java.lang.String |
-toString() |
-
Button |
-update()
-updates the value of the controller without having to set the value explicitly.
- |
-
Button |
-updateDisplayMode(int theMode) |
-
Button |
-updateViewMode(int theMode) |
-
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, draw, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setHeight, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, setWidth, show, unlock, unplugFrom, unplugFrom, unregisterTooltip, updateAbsolutePosition, updateEvents, updateInternalEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public static int autoHeight-
public static int autoWidth-
public Button()-
public Button(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public Button activateBy(int theValue)-
theValue
- use ControlP5.PRESSED or ControlP5.RELEASE as parameterpublic boolean getBooleanValue()-
setSwitch
should have been set before.setSwitch(boolean)
public java.lang.String getInfo()-
getInfo
in class Controller<Button>
public boolean isOn()-
public boolean isPressed()-
public void mousePressed()-
public void mouseReleased()-
public void mouseReleasedOutside()-
public Button setOff()-
setSwitch
to turn a Button into a Switch.public Button setOn()-
setSwitch
to turn a Button into a Switch.public Button setSwitch(boolean theFlag)-
theFlag
- turns the button into a switch when trueToggle
public Button setValue(float theValue)-
setValue
in interface ControllerInterface<Button>
setValue
in class Controller<Button>
theValue
- floatpublic java.lang.String toString()-
toString
in class Controller<Button>
public Button update()-
update
in interface ControllerInterface<Button>
update
in class Controller<Button>
Controller.setUpdate(boolean)
,
-Controller.isUpdate()
public Button updateDisplayMode(int theMode)-
public Button updateViewMode(int theMode)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/CColor.html b/reference/controlP5/CColor.html deleted file mode 100644 index 78f6865..0000000 --- a/reference/controlP5/CColor.html +++ /dev/null @@ -1,486 +0,0 @@ - - - - - -public class CColor
-extends java.lang.Object
-implements java.io.Serializable
-Constructor and Description | -
---|
CColor() |
-
CColor(CColor theColor) |
-
CColor(int cfg,
- int cbg,
- int cactive,
- int ccl,
- int cvl) |
-
Modifier and Type | -Method and Description | -
---|---|
boolean |
-equals(java.lang.Object o) |
-
int |
-getActive() |
-
int |
-getAlpha() |
-
int |
-getBackground() |
-
int |
-getCaptionLabel() |
-
int |
-getForeground() |
-
int |
-getValueLabel() |
-
int |
-hashCode() |
-
CColor |
-setActive(int theColor) |
-
CColor |
-setAlpha(int theAlpha) |
-
CColor |
-setBackground(int theColor) |
-
CColor |
-setCaptionLabel(int theColor) |
-
CColor |
-setForeground(int theColor) |
-
CColor |
-setValueLabel(int theColor) |
-
java.lang.String |
-toString() |
-
getClass, notify, notifyAll, wait, wait, wait
public CColor()-
public CColor(CColor theColor)-
public CColor(int cfg, - int cbg, - int cactive, - int ccl, - int cvl)-
public boolean equals(java.lang.Object o)-
equals
in class java.lang.Object
public int getActive()-
public int getAlpha()-
public int getBackground()-
public int getCaptionLabel()-
public int getForeground()-
public int getValueLabel()-
public int hashCode()-
hashCode
in class java.lang.Object
public CColor setActive(int theColor)-
public CColor setAlpha(int theAlpha)-
theAlpha
- public CColor setBackground(int theColor)-
public CColor setCaptionLabel(int theColor)-
public CColor setForeground(int theColor)-
public CColor setValueLabel(int theColor)-
public java.lang.String toString()-
toString
in class java.lang.Object
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/CDrawable.html b/reference/controlP5/CDrawable.html deleted file mode 100644 index 0509071..0000000 --- a/reference/controlP5/CDrawable.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - -public interface CDrawable
-processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/CP.html b/reference/controlP5/CP.html deleted file mode 100644 index 78fecc3..0000000 --- a/reference/controlP5/CP.html +++ /dev/null @@ -1,481 +0,0 @@ - - - - - -public class CP
-extends java.lang.Object
-Modifier and Type | -Method and Description | -
---|---|
static java.lang.String |
-arrayToString(java.lang.Object aArray)
-* Convenience method for producing a simple textual representation of an array.
- |
-
static int |
-byteArrayToInt(byte[] b) |
-
static byte[] |
-decodeBase64(java.lang.String base64) |
-
static java.lang.String |
-encodeBase64(byte[] raw) |
-
static java.lang.String |
-forHTMLTag(java.lang.String aTagFragment)
-borrowed from http://www.javapractices.com/Topic96.cjp
- |
-
static java.lang.String |
-forURL(java.lang.String aURLFragment)
-borrowed from http://www.javapractices.com/Topic96.cjp
- |
-
static int |
-getBit(int theByte,
- int theIndex) |
-
static boolean |
-inside(int[] theRect,
- float theX,
- float theY) |
-
static boolean |
-inside(int[] theRect,
- processing.core.PVector theVector) |
-
static byte[] |
-intToByteArray(int a) |
-
static java.lang.String |
-intToString(int theInt) |
-
static int |
-parseHex(java.lang.String theHex)
-convert a hex number into an int
- |
-
static java.lang.String |
-replace(java.lang.String theSourceString,
- java.lang.String theSearchForString,
- java.lang.String theReplaceString) |
-
static byte |
-setHigh(byte theByte,
- int theIndex) |
-
static byte |
-setLow(byte theByte,
- int theIndex) |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static java.lang.String arrayToString(java.lang.Object aArray)-
- The format of the returned String
is the same as
- AbstractCollection.toString
:
-
aArray
is a possibly-null array whose elements are primitives or objects; arrays
- of arrays are also valid, in which case aArray
is rendered in a nested,
- recursive fashion.public static int byteArrayToInt(byte[] b)-
public static byte[] decodeBase64(java.lang.String base64)-
public static java.lang.String encodeBase64(byte[] raw)-
public static java.lang.String forHTMLTag(java.lang.String aTagFragment)-
aTagFragment
- Stringpublic static java.lang.String forURL(java.lang.String aURLFragment)-
aURLFragment
- Stringpublic static int getBit(int theByte, - int theIndex)-
public static boolean inside(int[] theRect, - float theX, - float theY)-
public static boolean inside(int[] theRect, - processing.core.PVector theVector)-
public static byte[] intToByteArray(int a)-
public static java.lang.String intToString(int theInt)-
public static int parseHex(java.lang.String theHex)-
theHex
- public static java.lang.String replace(java.lang.String theSourceString, - java.lang.String theSearchForString, - java.lang.String theReplaceString)-
public static byte setHigh(byte theByte, - int theIndex)-
public static byte setLow(byte theByte, - int theIndex)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/CallbackEvent.html b/reference/controlP5/CallbackEvent.html deleted file mode 100644 index e72680c..0000000 --- a/reference/controlP5/CallbackEvent.html +++ /dev/null @@ -1,438 +0,0 @@ - - - - - -public class CallbackEvent
-extends java.lang.Object
-- A CallbackEvent is send when a controller action such as enter, leave, press, etc has occurs. -
/**
- * ControlP5 Callback
- *
- * The following example demonstrates the CallbackListener and CallbackEvent.
- * Here additional information about each available slider will be show when
- * hovering the controller with the mouse. The info will fade out when leaving
- * the controller.
- *
- * When hovering a controller, the mouse pointer will change as well.
- *
- * find a list of public methods available for the CallbackEvent Controller
- * at the bottom of this sketch.
- *
- * by Andreas Schlegel, 2012
- * www.sojamo.de/libraries/controlp5
- *
- */
-
-import controlP5.*;
-
-ControlP5 cp5;
-Slider s1, s2;
-Info info;
-CallbackListener cb;
-
-void setup() {
- size(800, 400);
-
- cp5 = new ControlP5(this);
-
-
- // create a new instance of class Info
- // info will be used to display a controller's information and
- // will fade in when a CallbackEvent is invoked.
- info = new Info();
-
-
- // add 2 sliders
- s1 = cp5.addSlider("hello")
- .setRange(0, 100)
- .setValue(50)
- .setPosition(40, 40)
- .setSize(100, 20);
-
- s2 = cp5.addSlider("world")
- .setRange(0, 100)
- .setValue(10)
- .setPosition(40, 70)
- .setSize(100, 20);
-
-
- // the following CallbackListener will listen to any controlP5
- // action such as enter, leave, pressed, released, releasedoutside, broadcast
- // see static variables starting with ACTION_ inside class controlP5.ControlP5Constants
-
- cb = new CallbackListener() {
- public void controlEvent(CallbackEvent theEvent) {
- switch(theEvent.getAction()) {
- case(ControlP5.ACTION_ENTER):
- info.n = 1;
- info.label.setText(theEvent.getController().getInfo());
- cursor(HAND);
- break;
- case(ControlP5.ACTION_LEAVE):
- case(ControlP5.ACTION_RELEASEDOUTSIDE):
- info.n = 0;
- cursor(ARROW);
- break;
- }
- }
- };
-
- // add the above callback to controlP5
- cp5.addCallback(cb);
-
- // add another callback to slider s1, callback event will only be invoked for this
- // particular controller.
- s1.addCallback(new CallbackListener() {
- public void controlEvent(CallbackEvent theEvent) {
- if (theEvent.getAction()==ControlP5.ACTION_BROADCAST) {
- s2.setValue(s2.getMax() - s1.getValue());
- }
- }
- }
- );
-}
-
-void draw() {
- background(0);
- info.update();
-}
-
-
-void controlEvent(ControlEvent theEvent) {
- println("Got a ControlEvent for "+theEvent.name()+" = "+theEvent.value());
- info.label.setText(theEvent.getController().getInfo());
-}
-
-void keyPressed() {
- // uncomment the line below to remove callback cb from controlP5
- // when a key is pressed.
- //controlP5.removeCallback(cb);
-}
-
-// controlEvent(CallbackEvent) is called whenever a callback
-// has been triggered. controlEvent(CallbackEvent) is detected by
-// controlP5 automatically.
-void controlEvent(CallbackEvent theEvent) {
- if (theEvent.getController().equals(s2)) {
- switch(theEvent.getAction()) {
- case(ControlP5.ACTION_ENTER):
- println("Action:ENTER");
- break;
- case(ControlP5.ACTION_LEAVE):
- println("Action:LEAVE");
- break;
- case(ControlP5.ACTION_PRESSED):
- println("Action:PRESSED");
- break;
- case(ControlP5.ACTION_RELEASED):
- println("Action:RELEASED");
- break;
- case(ControlP5.ACTION_RELEASEDOUTSIDE):
- println("Action:RELEASED OUTSIDE");
- break;
- case(ControlP5.ACTION_BROADCAST):
- println("Action:BROADCAST");
- break;
- }
- }
-}
-
-
-
-class Info {
- float a;
- float n = 0;
- String txt = "";
- Textarea label;
-
- Info() {
- label = cp5.addTextarea("Hello\nWorld")
- .setSize(200,200)
- .setPosition(300,40)
- .setColor(color(255))
- .setColorBackground(color(100,0))
- .setLineHeight(12);
-
- }
-
- void update() {
- a += (n-a)*0.1;
- label.setColorBackground(color(100,255*a));
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/*
-a list of all methods available for the CallbackEvent Controller
- use ControlP5.printPublicMethodsFor(CallbackEvent.class);
- to print the following list into the console.
-
- You can find further details about class CallbackEvent in the javadoc.
-
- Format:
- ClassName : returnType methodName(parameter type)
-
-
- controlP5.CallbackEvent : Controller getController()
- controlP5.CallbackEvent : int getAction()
- java.lang.Object : String toString()
- java.lang.Object : boolean equals(Object)
-
-
- */
-
-
-
-
Modifier and Type | -Method and Description | -
---|---|
int |
-getAction() |
-
Controller<?> |
-getController()
-Returns the Controller that triggered the Callback Event.
- |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public int getAction()-
public Controller<?> getController()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/CallbackListener.html b/reference/controlP5/CallbackListener.html deleted file mode 100644 index 74c0a2b..0000000 --- a/reference/controlP5/CallbackListener.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - -public interface CallbackListener
-- Use a CallbackListener to listen for controller related actions such as pressed, released, etc. - Callbacks cn be added via the ControlP5.addCallback() methods. -
ControlP5.addCallback(CallbackListener)
/**
- * ControlP5 Callback
- *
- * The following example demonstrates the CallbackListener and CallbackEvent.
- * Here additional information about each available slider will be show when
- * hovering the controller with the mouse. The info will fade out when leaving
- * the controller.
- *
- * When hovering a controller, the mouse pointer will change as well.
- *
- * find a list of public methods available for the CallbackEvent Controller
- * at the bottom of this sketch.
- *
- * by Andreas Schlegel, 2012
- * www.sojamo.de/libraries/controlp5
- *
- */
-
-import controlP5.*;
-
-ControlP5 cp5;
-Slider s1, s2;
-Info info;
-CallbackListener cb;
-
-void setup() {
- size(800, 400);
-
- cp5 = new ControlP5(this);
-
-
- // create a new instance of class Info
- // info will be used to display a controller's information and
- // will fade in when a CallbackEvent is invoked.
- info = new Info();
-
-
- // add 2 sliders
- s1 = cp5.addSlider("hello")
- .setRange(0, 100)
- .setValue(50)
- .setPosition(40, 40)
- .setSize(100, 20);
-
- s2 = cp5.addSlider("world")
- .setRange(0, 100)
- .setValue(10)
- .setPosition(40, 70)
- .setSize(100, 20);
-
-
- // the following CallbackListener will listen to any controlP5
- // action such as enter, leave, pressed, released, releasedoutside, broadcast
- // see static variables starting with ACTION_ inside class controlP5.ControlP5Constants
-
- cb = new CallbackListener() {
- public void controlEvent(CallbackEvent theEvent) {
- switch(theEvent.getAction()) {
- case(ControlP5.ACTION_ENTER):
- info.n = 1;
- info.label.setText(theEvent.getController().getInfo());
- cursor(HAND);
- break;
- case(ControlP5.ACTION_LEAVE):
- case(ControlP5.ACTION_RELEASEDOUTSIDE):
- info.n = 0;
- cursor(ARROW);
- break;
- }
- }
- };
-
- // add the above callback to controlP5
- cp5.addCallback(cb);
-
- // add another callback to slider s1, callback event will only be invoked for this
- // particular controller.
- s1.addCallback(new CallbackListener() {
- public void controlEvent(CallbackEvent theEvent) {
- if (theEvent.getAction()==ControlP5.ACTION_BROADCAST) {
- s2.setValue(s2.getMax() - s1.getValue());
- }
- }
- }
- );
-}
-
-void draw() {
- background(0);
- info.update();
-}
-
-
-void controlEvent(ControlEvent theEvent) {
- println("Got a ControlEvent for "+theEvent.name()+" = "+theEvent.value());
- info.label.setText(theEvent.getController().getInfo());
-}
-
-void keyPressed() {
- // uncomment the line below to remove callback cb from controlP5
- // when a key is pressed.
- //controlP5.removeCallback(cb);
-}
-
-// controlEvent(CallbackEvent) is called whenever a callback
-// has been triggered. controlEvent(CallbackEvent) is detected by
-// controlP5 automatically.
-void controlEvent(CallbackEvent theEvent) {
- if (theEvent.getController().equals(s2)) {
- switch(theEvent.getAction()) {
- case(ControlP5.ACTION_ENTER):
- println("Action:ENTER");
- break;
- case(ControlP5.ACTION_LEAVE):
- println("Action:LEAVE");
- break;
- case(ControlP5.ACTION_PRESSED):
- println("Action:PRESSED");
- break;
- case(ControlP5.ACTION_RELEASED):
- println("Action:RELEASED");
- break;
- case(ControlP5.ACTION_RELEASEDOUTSIDE):
- println("Action:RELEASED OUTSIDE");
- break;
- case(ControlP5.ACTION_BROADCAST):
- println("Action:BROADCAST");
- break;
- }
- }
-}
-
-
-
-class Info {
- float a;
- float n = 0;
- String txt = "";
- Textarea label;
-
- Info() {
- label = cp5.addTextarea("Hello\nWorld")
- .setSize(200,200)
- .setPosition(300,40)
- .setColor(color(255))
- .setColorBackground(color(100,0))
- .setLineHeight(12);
-
- }
-
- void update() {
- a += (n-a)*0.1;
- label.setColorBackground(color(100,255*a));
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/*
-a list of all methods available for the CallbackEvent Controller
- use ControlP5.printPublicMethodsFor(CallbackEvent.class);
- to print the following list into the console.
-
- You can find further details about class CallbackEvent in the javadoc.
-
- Format:
- ClassName : returnType methodName(parameter type)
-
-
- controlP5.CallbackEvent : Controller getController()
- controlP5.CallbackEvent : int getAction()
- java.lang.Object : String toString()
- java.lang.Object : boolean equals(Object)
-
-
- */
-
-
-
-
Modifier and Type | -Method and Description | -
---|---|
void |
-controlEvent(CallbackEvent theEvent) |
-
void controlEvent(CallbackEvent theEvent)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Canvas.html b/reference/controlP5/Canvas.html deleted file mode 100644 index b9c192b..0000000 --- a/reference/controlP5/Canvas.html +++ /dev/null @@ -1,526 +0,0 @@ - - - - - -public abstract class Canvas
-extends java.lang.Object
-/**
- * ControlP5 Canvas
- * The ControlWindowCanvas allow you to add custom graphics to
- * the default controlP5 renderer or a controlWindow rednerer.
- *
- * find a list of public methods available for the Canvas Controller
- * at the bottom of this sketch's source code
- *
- * by Andreas Schlegel, 2011
- * www.sojamo.de/libraries/controlp5
- *
- */
-
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-ControlWindow controlWindow;
-
-Canvas cc;
-
-// MyCanvas, your Canvas render class
-class MyCanvas extends Canvas {
-
- int y;
- int mx = 0;
- int my = 0;
- public void setup(PGraphics pg) {
- y = 200;
- }
-
- public void update(PApplet p) {
- mx = p.mouseX;
- my = p.mouseY;
- }
-
- public void draw(PGraphics pg) {
- // renders a square with randomly changing colors
- // make changes here.
- pg.fill(100);
- pg.rect(mx-20, y-20, 240, 30);
- pg.fill(255);
- pg.text("This text is drawn by MyCanvas", mx,y);
- }
-}
-
-
-void setup() {
- size(400, 400);
- frameRate(30);
- cp5 = new ControlP5(this);
-
- // create a control window canvas and add it to
- // the previously created control window.
- cc = new MyCanvas();
- cc.pre(); // use cc.post(); to draw on top of existing controllers.
- cp5.addCanvas(cc); // add the canvas to cp5
-}
-
-void draw() {
- background(0);
- fill(60);
- rect(100, 100, 200, 200);
-}
-
-
-/*
- a list of all methods available for the ControlWindowCanvas Controller
- use ControlP5.printPublicMethodsFor(Canvas.class);
- to print the following list into the console.
-
- You can find further details about class Canvas in the javadoc.
-
- Format:
- ClassName : returnType methodName(parameter type)
-
- controlP5.Canvas : void moveTo(ControlWindow)
- controlP5.Canvas : void setup(PApplet)
- controlP5.Canvas : void draw(PApplet)
- java.lang.Object : String toString()
- java.lang.Object : boolean equals(Object)
- */
-
-
-
Modifier and Type | -Field and Description | -
---|---|
static int |
-POST |
-
static int |
-PRE |
-
Modifier and Type | -Method and Description | -
---|---|
abstract void |
-draw(processing.core.PGraphics theGraphics)
-controlWindowCanvas is an abstract class and
- therefore needs to be extended by your class.
- |
-
int |
-mode()
-get the drawing mode of a Canvas.
- |
-
void |
-moveTo(ControlWindow theControlWindow)
-move a canvas to another controlWindow
- |
-
void |
-post()
-set the drawing mode to POST.
- |
-
void |
-pre()
-set the drawing mode to PRE.
- |
-
void |
-setMode(int theMode) |
-
void |
-setup(processing.core.PGraphics theGraphics) |
-
void |
-update(processing.core.PApplet theApplet) |
-
ControlWindow |
-window() |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final int POST-
public static final int PRE-
public abstract void draw(processing.core.PGraphics theGraphics)-
public final int mode()-
public void moveTo(ControlWindow theControlWindow)-
theControlWindow
- public final void post()-
public final void pre()-
public final void setMode(int theMode)-
theMode
- public void setup(processing.core.PGraphics theGraphics)-
public void update(processing.core.PApplet theApplet)-
public final ControlWindow window()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Chart.ChartViewArea.html b/reference/controlP5/Chart.ChartViewArea.html deleted file mode 100644 index 3de7992..0000000 --- a/reference/controlP5/Chart.ChartViewArea.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - -public class Chart.ChartViewArea -extends java.lang.Object -implements ControllerView<Chart>-
Constructor and Description | -
---|
Chart.ChartViewArea() |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-display(processing.core.PGraphics theGraphics,
- Chart theController)
-draws your custom controllers.
- |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void display(processing.core.PGraphics theGraphics, - Chart theController)-
ControllerView
display
in interface ControllerView<Chart>
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Chart.ChartViewBar.html b/reference/controlP5/Chart.ChartViewBar.html deleted file mode 100644 index 26358b5..0000000 --- a/reference/controlP5/Chart.ChartViewBar.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - -public class Chart.ChartViewBar -extends java.lang.Object -implements ControllerView<Chart>-
Constructor and Description | -
---|
Chart.ChartViewBar() |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-display(processing.core.PGraphics theGraphics,
- Chart theController)
-draws your custom controllers.
- |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void display(processing.core.PGraphics theGraphics, - Chart theController)-
ControllerView
display
in interface ControllerView<Chart>
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Chart.ChartViewBarCentered.html b/reference/controlP5/Chart.ChartViewBarCentered.html deleted file mode 100644 index 430ff12..0000000 --- a/reference/controlP5/Chart.ChartViewBarCentered.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - -public class Chart.ChartViewBarCentered -extends java.lang.Object -implements ControllerView<Chart>-
Constructor and Description | -
---|
Chart.ChartViewBarCentered() |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-display(processing.core.PGraphics theGraphics,
- Chart theController)
-draws your custom controllers.
- |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Chart.ChartViewBarCentered()-
public void display(processing.core.PGraphics theGraphics, - Chart theController)-
ControllerView
display
in interface ControllerView<Chart>
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Chart.ChartViewLine.html b/reference/controlP5/Chart.ChartViewLine.html deleted file mode 100644 index b0aa2b0..0000000 --- a/reference/controlP5/Chart.ChartViewLine.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - -public class Chart.ChartViewLine -extends java.lang.Object -implements ControllerView<Chart>-
Constructor and Description | -
---|
Chart.ChartViewLine() |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-display(processing.core.PGraphics theGraphics,
- Chart theController)
-draws your custom controllers.
- |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void display(processing.core.PGraphics theGraphics, - Chart theController)-
ControllerView
display
in interface ControllerView<Chart>
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Chart.ChartViewPie.html b/reference/controlP5/Chart.ChartViewPie.html deleted file mode 100644 index 2c3f552..0000000 --- a/reference/controlP5/Chart.ChartViewPie.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - -public class Chart.ChartViewPie -extends java.lang.Object -implements ControllerView<Chart>-
Constructor and Description | -
---|
Chart.ChartViewPie() |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-display(processing.core.PGraphics theGraphics,
- Chart theController)
-draws your custom controllers.
- |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void display(processing.core.PGraphics theGraphics, - Chart theController)-
ControllerView
display
in interface ControllerView<Chart>
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Chart.html b/reference/controlP5/Chart.html deleted file mode 100644 index 855cae2..0000000 --- a/reference/controlP5/Chart.html +++ /dev/null @@ -1,1529 +0,0 @@ - - - - - -public class Chart -extends Controller<Chart>-
/**
-* ControlP5 Chart
-*
-* find a list of public methods available for the Chart Controller
-* at the bottom of this sketch.
-*
-* by Andreas Schlegel, 2012
-* www.sojamo.de/libraries/controlp5
-*
-*/
-
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-Chart myChart;
-
-void setup() {
- size(400, 700);
- smooth();
- cp5 = new ControlP5(this);
- cp5.printPublicMethodsFor(Chart.class);
- myChart = cp5.addChart("hello")
- .setPosition(50, 50)
- .setSize(200, 200)
- .setRange(-20, 20)
- .setView(Chart.BAR) // use Chart.LINE, Chart.PIE, Chart.AREA, Chart.BAR_CENTERED
- ;
-
- myChart.getColor().setBackground(color(255, 100));
-
-
- myChart.addDataSet("world");
- myChart.setColors("world", color(255,0,255),color(255,0,0));
- myChart.setData("world", new float[4]);
-
- myChart.setStrokeWeight(1.5);
-
- myChart.addDataSet("earth");
- myChart.setColors("earth", color(255), color(0, 255, 0));
- myChart.updateData("earth", 1, 2, 10, 3);
-
-}
-
-
-void draw() {
- background(0);
- // unshift: add data from left to right (first in)
- myChart.unshift("world", (sin(frameCount*0.01)*10));
-
- // push: add data from right to left (last in)
- myChart.push("earth", (sin(frameCount*0.1)*10));
-}
-
-
-
-
-
-
-
-/*
-a list of all methods available for the Chart Controller
-use ControlP5.printPublicMethodsFor(Chart.class);
-to print the following list into the console.
-
-You can find further details about class Chart in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-
-controlP5.Chart : Chart addData(ChartData)
-controlP5.Chart : Chart addData(ChartDataSet, float)
-controlP5.Chart : Chart addData(String, ChartData)
-controlP5.Chart : Chart addData(String, float)
-controlP5.Chart : Chart addData(float)
-controlP5.Chart : Chart addDataSet(String)
-controlP5.Chart : Chart addFirst(String, float)
-controlP5.Chart : Chart addFirst(float)
-controlP5.Chart : Chart removeData(ChartData)
-controlP5.Chart : Chart removeData(String, ChartData)
-controlP5.Chart : Chart removeData(String, int)
-controlP5.Chart : Chart removeData(int)
-controlP5.Chart : Chart removeDataSet(String)
-controlP5.Chart : Chart removeLast()
-controlP5.Chart : Chart removeLast(String)
-controlP5.Chart : Chart setData(String, int, ChartData)
-controlP5.Chart : Chart setData(int, ChartData)
-controlP5.Chart : Chart setDataSet(ChartDataSet)
-controlP5.Chart : Chart setDataSet(String, ChartDataSet)
-controlP5.Chart : Chart setRange(float, float)
-controlP5.Chart : Chart setResolution(int)
-controlP5.Chart : Chart setStrokeWeight(float)
-controlP5.Chart : Chart setValue(float)
-controlP5.Chart : Chart setView(int)
-controlP5.Chart : Chart unshift(String, float)
-controlP5.Chart : Chart unshift(float)
-controlP5.Chart : ChartData getData(String, int)
-controlP5.Chart : ChartDataSet getDataSet(String)
-controlP5.Chart : LinkedHashMap getDataSet()
-controlP5.Chart : String getInfo()
-controlP5.Chart : String toString()
-controlP5.Chart : float getStrokeWeight()
-controlP5.Chart : float[] getValuesFrom(String)
-controlP5.Chart : int getResolution()
-controlP5.Chart : int size()
-controlP5.Chart : void onEnter()
-controlP5.Chart : void onLeave()
-controlP5.Controller : CColor getColor()
-controlP5.Controller : Chart addCallback(CallbackListener)
-controlP5.Controller : Chart addListener(ControlListener)
-controlP5.Controller : Chart align(int, int, int, int)
-controlP5.Controller : Chart bringToFront()
-controlP5.Controller : Chart bringToFront(ControllerInterface)
-controlP5.Controller : Chart hide()
-controlP5.Controller : Chart linebreak()
-controlP5.Controller : Chart listen(boolean)
-controlP5.Controller : Chart lock()
-controlP5.Controller : Chart plugTo(Object)
-controlP5.Controller : Chart plugTo(Object, String)
-controlP5.Controller : Chart plugTo(Object[])
-controlP5.Controller : Chart plugTo(Object[], String)
-controlP5.Controller : Chart registerProperty(String)
-controlP5.Controller : Chart registerProperty(String, String)
-controlP5.Controller : Chart registerTooltip(String)
-controlP5.Controller : Chart removeBehavior()
-controlP5.Controller : Chart removeCallback()
-controlP5.Controller : Chart removeCallback(CallbackListener)
-controlP5.Controller : Chart removeListener(ControlListener)
-controlP5.Controller : Chart removeProperty(String)
-controlP5.Controller : Chart removeProperty(String, String)
-controlP5.Controller : Chart setArrayValue(float[])
-controlP5.Controller : Chart setArrayValue(int, float)
-controlP5.Controller : Chart setBehavior(ControlBehavior)
-controlP5.Controller : Chart setBroadcast(boolean)
-controlP5.Controller : Chart setCaptionLabel(String)
-controlP5.Controller : Chart setColor(CColor)
-controlP5.Controller : Chart setColorActive(int)
-controlP5.Controller : Chart setColorBackground(int)
-controlP5.Controller : Chart setColorCaptionLabel(int)
-controlP5.Controller : Chart setColorForeground(int)
-controlP5.Controller : Chart setColorValueLabel(int)
-controlP5.Controller : Chart setDecimalPrecision(int)
-controlP5.Controller : Chart setDefaultValue(float)
-controlP5.Controller : Chart setHeight(int)
-controlP5.Controller : Chart setId(int)
-controlP5.Controller : Chart setImages(PImage, PImage, PImage)
-controlP5.Controller : Chart setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Chart setLabelVisible(boolean)
-controlP5.Controller : Chart setLock(boolean)
-controlP5.Controller : Chart setMax(float)
-controlP5.Controller : Chart setMin(float)
-controlP5.Controller : Chart setMouseOver(boolean)
-controlP5.Controller : Chart setMoveable(boolean)
-controlP5.Controller : Chart setPosition(PVector)
-controlP5.Controller : Chart setPosition(float, float)
-controlP5.Controller : Chart setSize(PImage)
-controlP5.Controller : Chart setSize(int, int)
-controlP5.Controller : Chart setStringValue(String)
-controlP5.Controller : Chart setUpdate(boolean)
-controlP5.Controller : Chart setValueLabel(String)
-controlP5.Controller : Chart setView(ControllerView)
-controlP5.Controller : Chart setVisible(boolean)
-controlP5.Controller : Chart setWidth(int)
-controlP5.Controller : Chart show()
-controlP5.Controller : Chart unlock()
-controlP5.Controller : Chart unplugFrom(Object)
-controlP5.Controller : Chart unplugFrom(Object[])
-controlP5.Controller : Chart unregisterTooltip()
-controlP5.Controller : Chart update()
-controlP5.Controller : Chart updateSize()
-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 : 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)
-
-
-*/
-
-
-
-
Modifier and Type | -Class and Description | -
---|---|
class |
-Chart.ChartViewArea |
-
class |
-Chart.ChartViewBar |
-
class |
-Chart.ChartViewBarCentered |
-
class |
-Chart.ChartViewLine |
-
class |
-Chart.ChartViewPie |
-
Modifier and Type | -Field and Description | -
---|---|
static int |
-AREA |
-
static int |
-BAR |
-
static int |
-BAR_CENTERED |
-
static int |
-HISTOGRAM |
-
static int |
-LINE |
-
static int |
-PIE |
-
autoHeight, autoSpacing, autoWidth
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Chart(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend Chart.
- |
-
Modifier and Type | -Method and Description | -
---|---|
Chart |
-addData(ChartData theItem) |
-
Chart |
-addData(ChartDataSet theChartData,
- float theValue) |
-
Chart |
-addData(float theValue) |
-
Chart |
-addData(java.lang.String theSetIndex,
- ChartData theItem) |
-
Chart |
-addData(java.lang.String theSetIndex,
- float theValue) |
-
Chart |
-addDataSet(java.lang.String theName) |
-
Chart |
-addFirst(float theValue) |
-
Chart |
-addFirst(java.lang.String theSetIndex,
- float theValue) |
-
Chart |
-addLast(float theValue) |
-
Chart |
-addLast(java.lang.String theSetIndex,
- float theValue) |
-
ChartData |
-getData(java.lang.String theIndex,
- int theItemIndex) |
-
java.util.LinkedHashMap<java.lang.String,ChartDataSet> |
-getDataSet() |
-
ChartDataSet |
-getDataSet(java.lang.String theIndex) |
-
java.lang.String |
-getInfo() |
-
int |
-getResolution() |
-
float |
-getStrokeWeight() |
-
float[] |
-getValuesFrom(java.lang.String theIndex) |
-
void |
-onEnter() |
-
void |
-onLeave() |
-
Chart |
-push(float theValue) |
-
Chart |
-push(java.lang.String theSetIndex,
- float theValue) |
-
Chart |
-removeData(ChartData theItem) |
-
Chart |
-removeData(int theItemIndex) |
-
Chart |
-removeData(java.lang.String theSetIndex,
- ChartData theItem) |
-
Chart |
-removeData(java.lang.String theSetIndex,
- int theItemIndex) |
-
Chart |
-removeDataSet(java.lang.String theIndex) |
-
Chart |
-removeFirst() |
-
Chart |
-removeFirst(java.lang.String theSetIndex) |
-
Chart |
-removeLast() |
-
Chart |
-removeLast(java.lang.String theSetIndex) |
-
Chart |
-setColors(java.lang.String theSetIndex,
- int... theColors) |
-
Chart |
-setData(float... theValues) |
-
Chart |
-setData(int theItemIndex,
- ChartData theItem) |
-
Chart |
-setData(java.lang.String theSetIndex,
- float... theValues) |
-
Chart |
-setData(java.lang.String theSetItem,
- int theItemIndex,
- ChartData theItem) |
-
Chart |
-setDataSet(ChartDataSet theItems) |
-
Chart |
-setDataSet(java.lang.String theSetIndex,
- ChartDataSet theChartData) |
-
Chart |
-setRange(float theMin,
- float theMax) |
-
Chart |
-setResolution(int theValue)
-?
- |
-
Chart |
-setStrokeWeight(float theWeight) |
-
Chart |
-setValue(float theValue) |
-
Chart |
-setView(int theType) |
-
int |
-size() |
-
java.lang.String |
-toString() |
-
Chart |
-unshift(float theValue)
-adds a new float at the beginning of the data set.
- |
-
Chart |
-unshift(java.lang.String theSetIndex,
- float theValue) |
-
Chart |
-updateData(float... theValues) |
-
Chart |
-updateData(java.lang.String theSetIndex,
- float... theValues) |
-
Chart |
-updateDisplayMode(int theMode) |
-
Chart |
-updateViewMode(int theMode) |
-
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, draw, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setHeight, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, setWidth, show, unlock, unplugFrom, unplugFrom, unregisterTooltip, update, updateAbsolutePosition, updateEvents, updateInternalEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public static final int AREA-
public static final int BAR-
public static final int BAR_CENTERED-
public static final int HISTOGRAM-
public static final int LINE-
public static final int PIE-
public Chart(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public Chart addData(ChartDataSet theChartData, - float theValue)-
public Chart addData(float theValue)-
public Chart addData(java.lang.String theSetIndex, - float theValue)-
public Chart addDataSet(java.lang.String theName)-
public Chart addFirst(float theValue)-
public Chart addFirst(java.lang.String theSetIndex, - float theValue)-
public Chart addLast(float theValue)-
public Chart addLast(java.lang.String theSetIndex, - float theValue)-
public ChartData getData(java.lang.String theIndex, - int theItemIndex)-
public java.util.LinkedHashMap<java.lang.String,ChartDataSet> getDataSet()-
public ChartDataSet getDataSet(java.lang.String theIndex)-
public java.lang.String getInfo()-
getInfo
in class Controller<Chart>
public int getResolution()-
public float getStrokeWeight()-
public float[] getValuesFrom(java.lang.String theIndex)-
public void onEnter()-
public void onLeave()-
public Chart push(float theValue)-
public Chart push(java.lang.String theSetIndex, - float theValue)-
public Chart removeData(int theItemIndex)-
public Chart removeData(java.lang.String theSetIndex, - int theItemIndex)-
public Chart removeDataSet(java.lang.String theIndex)-
public Chart removeFirst()-
public Chart removeFirst(java.lang.String theSetIndex)-
public Chart removeLast()-
public Chart removeLast(java.lang.String theSetIndex)-
public Chart setColors(java.lang.String theSetIndex, - int... theColors)-
public Chart setData(float... theValues)-
public Chart setData(java.lang.String theSetIndex, - float... theValues)-
public Chart setData(java.lang.String theSetItem, - int theItemIndex, - ChartData theItem)-
public Chart setDataSet(ChartDataSet theItems)-
public Chart setDataSet(java.lang.String theSetIndex, - ChartDataSet theChartData)-
public Chart setRange(float theMin, - float theMax)-
public Chart setResolution(int theValue)-
theValue
- public Chart setStrokeWeight(float theWeight)-
public Chart setValue(float theValue)-
setValue
in interface ControllerInterface<Chart>
setValue
in class Controller<Chart>
theValue
- floatpublic Chart setView(int theType)-
public int size()-
public java.lang.String toString()-
toString
in class Controller<Chart>
public Chart unshift(float theValue)-
public Chart unshift(java.lang.String theSetIndex, - float theValue)-
public Chart updateData(float... theValues)-
public Chart updateData(java.lang.String theSetIndex, - float... theValues)-
public Chart updateDisplayMode(int theMode)-
public Chart updateViewMode(int theMode)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ChartData.html b/reference/controlP5/ChartData.html deleted file mode 100644 index 2a22bac..0000000 --- a/reference/controlP5/ChartData.html +++ /dev/null @@ -1,331 +0,0 @@ - - - - - -public class ChartData
-extends java.lang.Object
-Constructor and Description | -
---|
ChartData(float theValue) |
-
ChartData(float theValue,
- java.lang.String theText) |
-
Modifier and Type | -Method and Description | -
---|---|
int |
-getColor() |
-
java.lang.String |
-getText() |
-
float |
-getValue() |
-
void |
-setColor(int theColor) |
-
void |
-setText(java.lang.String theText) |
-
void |
-setValue(float theValue) |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ChartData(float theValue)-
public ChartData(float theValue, - java.lang.String theText)-
public int getColor()-
public java.lang.String getText()-
public float getValue()-
public void setColor(int theColor)-
public void setText(java.lang.String theText)-
public void setValue(float theValue)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ChartDataSet.html b/reference/controlP5/ChartDataSet.html deleted file mode 100644 index 491cf3a..0000000 --- a/reference/controlP5/ChartDataSet.html +++ /dev/null @@ -1,378 +0,0 @@ - - - - - -public class ChartDataSet -extends java.util.ArrayList<ChartData>-
Constructor and Description | -
---|
ChartDataSet(java.lang.String theName) |
-
Modifier and Type | -Method and Description | -
---|---|
CColor |
-getColor() |
-
int |
-getColor(int theIndex) |
-
int[] |
-getColors() |
-
float |
-getStrokeWeight() |
-
float[] |
-getValues() |
-
ChartDataSet |
-setColors(int... theColors) |
-
ChartDataSet |
-setStrokeWeight(float theStrokeWeight) |
-
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
public ChartDataSet(java.lang.String theName)-
public CColor getColor()-
public int getColor(int theIndex)-
public int[] getColors()-
public float getStrokeWeight()-
public float[] getValues()-
public ChartDataSet setColors(int... theColors)-
public ChartDataSet setStrokeWeight(float theStrokeWeight)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/CheckBox.html b/reference/controlP5/CheckBox.html deleted file mode 100644 index ba76473..0000000 --- a/reference/controlP5/CheckBox.html +++ /dev/null @@ -1,1321 +0,0 @@ - - - - - -public class CheckBox -extends ControlGroup<CheckBox>-
Toggle
/**
- * ControlP5 Checkbox
- * an example demonstrating the use of a checkbox in controlP5.
- * CheckBox extends the RadioButton class.
- * to control a checkbox use:
- * activate(), deactivate(), activateAll(), deactivateAll(), toggle(), getState()
- *
- * find a list of public methods available for the Checkbox Controller
- * at the bottom of this sketch's source code
- *
- * by Andreas Schlegel, 2012
- * www.sojamo.de/libraries/controlP5
- *
- */
-
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-CheckBox checkbox;
-
-int myColorBackground;
-
-void setup() {
- size(700, 400);
- smooth();
- cp5 = new ControlP5(this);
- checkbox = cp5.addCheckBox("checkBox")
- .setPosition(100, 200)
- .setSize(40, 40)
- .setItemsPerRow(3)
- .setSpacingColumn(30)
- .setSpacingRow(20)
- .addItem("0", 0)
- .addItem("50", 50)
- .addItem("100", 100)
- .addItem("150", 150)
- .addItem("200", 200)
- .addItem("255", 255)
- ;
-}
-
-void keyPressed() {
- if (key==' ') {
- checkbox.deactivateAll();
- }
- else {
- for (int i=0;i<6;i++) {
- // check if key 0-5 have been pressed and toggle
- // the checkbox item accordingly.
- if (keyCode==(48 + i)) {
- // the index of checkbox items start at 0
- checkbox.toggle(i);
- println("toggle "+checkbox.getItem(i).name());
- // also see
- // checkbox.activate(index);
- // checkbox.deactivate(index);
- }
- }
- }
-}
-
-void draw() {
- background(170);
- pushMatrix();
- translate(width/2 + 200, height/2);
- stroke(255);
- strokeWeight(2);
- fill(myColorBackground);
- ellipse(0,0,200,200);
- popMatrix();
-}
-
-void controlEvent(ControlEvent theEvent) {
- if (theEvent.isFrom(checkbox)) {
- myColorBackground = 0;
- print("got an event from "+checkbox.getName()+"\t\n");
- // checkbox uses arrayValue to store the state of
- // individual checkbox-items. usage:
- println(checkbox.getArrayValue());
- int col = 0;
- for (int i=0;i
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
CheckBox(ControlP5 theControlP5,
- ControllerGroup<?> theParent,
- java.lang.String theName,
- int theX,
- int theY)
-A CheckBox should only be added to controlP5 by using controlP5.addCheckBox()
- |
-
CheckBox(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend CheckBox.
- |
-
Modifier and Type | -Method and Description | -
---|---|
CheckBox |
-activate(int theIndex)
-Activates a single checkbox item by index
- |
-
CheckBox |
-activate(java.lang.String theName)
-Activates a single checkbox item by name
- |
-
CheckBox |
-activateAll() |
-
CheckBox |
-addItem(java.lang.String theName,
- float theValue) |
-
CheckBox |
-addItem(Toggle theToggle,
- float theValue) |
-
void |
-controlEvent(ControlEvent theEvent)
-controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about
- value changes.
- |
-
CheckBox |
-deactivate(int theIndex)
-deactivate a single checkbox item by index
- |
-
CheckBox |
-deactivate(java.lang.String theName)
-Deactivates a single checkbox item by name
- |
-
CheckBox |
-deactivateAll() |
-
java.lang.String |
-getInfo() |
-
Toggle |
-getItem(int theIndex)
-Gets a radio button item by index.
- |
-
java.util.List<Toggle> |
-getItems() |
-
boolean |
-getState(int theIndex)
-Gets the state of an item - this can be true (for on) or false (for off) - by index.
- |
-
boolean |
-getState(java.lang.String theName)
-Gets the state of an item - this can be true (for on) or false (for off) - by name.
- |
-
CheckBox |
-hideLabels() |
-
CheckBox |
-plugTo(java.lang.Object theObject) |
-
CheckBox |
-plugTo(java.lang.Object theObject,
- java.lang.String thePlugName) |
-
CheckBox |
-removeItem(java.lang.String theName) |
-
CheckBox |
-setArrayValue(float[] theArray)
-Sets the value for all CheckBox items according to the values of the array passed on.
- |
-
CheckBox |
-setColorLabels(int theColor) |
-
CheckBox |
-setImage(processing.core.PImage theImage) |
-
CheckBox |
-setImage(processing.core.PImage theImage,
- int theState) |
-
CheckBox |
-setImages(processing.core.PImage theDefaultImage,
- processing.core.PImage theOverImage,
- processing.core.PImage theActiveImage) |
-
CheckBox |
-setItemHeight(int theItemHeight)
-set the height of a radioButton/checkBox item.
- |
-
CheckBox |
-setItemsPerRow(int theValue)
-Items of a radioButton or a checkBox are organized in columns and rows.
- |
-
CheckBox |
-setItemWidth(int theItemWidth)
-set the width of a radioButton/checkBox item.
- |
-
CheckBox |
-setNoneSelectedAllowed(boolean theValue)
-In order to always have 1 item selected, use setNoneSelectedAllowed(false), by default this
- is true.
- |
-
CheckBox |
-setSize(int theWidth,
- int theHeight) |
-
CheckBox |
-setSize(processing.core.PImage theImage) |
-
CheckBox |
-setSpacingColumn(int theSpacing)
-Sets the spacing in pixels between columns.
- |
-
CheckBox |
-setSpacingRow(int theSpacing)
-Sets the spacing in pixels between rows.
- |
-
CheckBox |
-showLabels() |
-
CheckBox |
-toggle(int theIndex)
-toggle a single checkbox item by index
- |
-
void |
-toggle(java.lang.String theName)
-deactivate a single checkbox item by name
- |
-
java.lang.String |
-toString() |
-
CheckBox |
-toUpperCase(boolean theValue) |
-
void |
-updateLayout() |
-
activateEvent, addListener, getBackgroundHeight, getBarHeight, listenerSize, mousePressed, removeListener, setBackgroundColor, setBackgroundHeight, setBarHeight, stringValue, updateInternalEvents
absolutePosition, add, addCanvas, addCloseButton, addDrawable, arrayValue, bringToFront, bringToFront, close, color, continuousUpdateEvents, controller, disableCollapse, draw, enableCollapse, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getCaptionLabel, getColor, getController, getHeight, getId, getName, getParent, getPickingColor, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getWidth, getWindow, hide, hideArrow, hideBar, id, init, isBarVisible, isCollapse, isMouseOver, isMoveable, isOpen, isUpdate, isVisible, keyEvent, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, name, open, parent, position, registerProperty, registerProperty, remove, remove, remove, removeCanvas, removeCloseButton, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorForeground, setColorLabel, setColorValue, setGroup, setGroup, setHeight, setId, setLabel, setMouseOver, setMousePressed, setMoveable, setOpen, setPosition, setPosition, setStringValue, setTab, setTab, setTab, setTitle, setUpdate, setValue, setVisible, setWidth, show, showArrow, showBar, update, updateAbsolutePosition, updateEvents, value
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public CheckBox(ControlP5 theControlP5, - ControllerGroup<?> theParent, - java.lang.String theName, - int theX, - int theY)-
theControlP5
- theParent
- theName
- theX
- theY
- public CheckBox(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public final CheckBox activate(int theIndex)-
public final CheckBox activate(java.lang.String theName)-
public final CheckBox activateAll()-
public CheckBox addItem(java.lang.String theName, - float theValue)-
theName
- theValue
- public CheckBox addItem(Toggle theToggle, - float theValue)-
theToggle
- theValue
- public void controlEvent(ControlEvent theEvent)-
controlEvent
in interface ControlListener
controlEvent
in class ControlGroup<CheckBox>
theEvent
- ControlEventCallbackListener
,
-CallbackEvent
public final CheckBox deactivate(int theIndex)-
public final CheckBox deactivate(java.lang.String theName)-
public CheckBox deactivateAll()-
public java.lang.String getInfo()-
ControlGroup
getInfo
in class ControlGroup<CheckBox>
public Toggle getItem(int theIndex)-
theIndex
- public java.util.List<Toggle> getItems()-
public boolean getState(int theIndex)-
theIndex
- public boolean getState(java.lang.String theName)-
theName
- public CheckBox hideLabels()-
public CheckBox plugTo(java.lang.Object theObject)-
public CheckBox plugTo(java.lang.Object theObject, - java.lang.String thePlugName)-
public CheckBox removeItem(java.lang.String theName)-
theName
- public CheckBox setArrayValue(float[] theArray)-
setArrayValue
in interface ControllerInterface<CheckBox>
setArrayValue
in class ControllerGroup<CheckBox>
public CheckBox setColorLabels(int theColor)-
public CheckBox setImage(processing.core.PImage theImage)-
theImage
- public CheckBox setImage(processing.core.PImage theImage, - int theState)-
theImage
- theState
- use Controller.DEFAULT (background), or Controller.OVER (foreground), or
- Controller.ACTIVE (active)public CheckBox setImages(processing.core.PImage theDefaultImage, - processing.core.PImage theOverImage, - processing.core.PImage theActiveImage)-
theDefaultImage
- theOverImage
- theActiveImage
- public CheckBox setItemHeight(int theItemHeight)-
theItemHeight
- public CheckBox setItemsPerRow(int theValue)-
theValue
- public CheckBox setItemWidth(int theItemWidth)-
theItemWidth
- public CheckBox setNoneSelectedAllowed(boolean theValue)-
theValue
- public CheckBox setSize(int theWidth, - int theHeight)-
setSize
in class ControlGroup<CheckBox>
public CheckBox setSize(processing.core.PImage theImage)-
public CheckBox setSpacingColumn(int theSpacing)-
theSpacing
- public CheckBox setSpacingRow(int theSpacing)-
theSpacing
- public CheckBox showLabels()-
public final CheckBox toggle(int theIndex)-
public final void toggle(java.lang.String theName)-
public java.lang.String toString()-
ControlGroup
toString
in class ControlGroup<CheckBox>
public CheckBox toUpperCase(boolean theValue)-
public void updateLayout()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ColorPicker.html b/reference/controlP5/ColorPicker.html deleted file mode 100644 index b5cabed..0000000 --- a/reference/controlP5/ColorPicker.html +++ /dev/null @@ -1,764 +0,0 @@ - - - - - -public class ColorPicker -extends ControlGroup<ColorPicker>-
/**
- * ControlP5 Color picker. a simple color picker,
- * 4 horizontal sliders controlling the RGBA channels of a color.
- * to grab the current color value, use function getColorValue() of
- * the color picker.
- *
- * find a list of public methods available for the ColorPicker Controller
- * at the bottom of this sketch's source code
- *
- * by Andreas Schlegel, 2012
- * www.sojamo.de/libraries/controlP5
- *
- */
-import controlP5.*;
-
-ControlP5 cp5;
-
-ColorPicker cp;
-
-void setup() {
- size(400, 600);
- noStroke();
- cp5 = new ControlP5(this);
- cp = cp5.addColorPicker("picker")
- .setPosition(60, 100)
- .setColorValue(color(255, 128, 0, 128))
- ;
-}
-
-void draw() {
- background(cp.getColorValue());
- fill(0, 80);
- rect(50, 90, 275, 80);
-}
-
-public void controlEvent(ControlEvent c) {
- // when a value change from a ColorPicker is received, extract the ARGB values
- // from the controller's array value
- if(c.isFrom(cp)) {
- int r = int(c.getArrayValue(0));
- int g = int(c.getArrayValue(1));
- int b = int(c.getArrayValue(2));
- int a = int(c.getArrayValue(3));
- color col = color(r,g,b,a);
- println("event\talpha:"+a+"\tred:"+r+"\tgreen:"+g+"\tblue:"+b+"\tcol"+col);
- }
-}
-
-// color information from ColorPicker 'picker' are forwarded to the picker(int) function
-void picker(int col) {
- println("picker\talpha:"+alpha(col)+"\tred:"+red(col)+"\tgreen:"+green(col)+"\tblue:"+blue(col)+"\tcol"+col);
-}
-
-
-void keyPressed() {
- switch(key) {
- case('1'):
- // method A to change color
- cp.setArrayValue(new float[] {120, 0, 120, 255});
- break;
- case('2'):
- // method B to change color
- cp.setColorValue(color(255, 0, 0, 255));
- break;
- }
-}
-
-
-
-
-/*
- a list of all methods available for the ColorPicker Controller
- use ControlP5.printPublicMethodsFor(ColorPicker.class);
- to print the following list into the console.
-
- You can find further details about class ColorPicker in the javadoc.
-
- Format:
- ClassName : returnType methodName(parameter type)
-
-
- controlP5.ColorPicker : ColorPicker setArrayValue(float[])
- controlP5.ColorPicker : ColorPicker setColorValue(int)
- controlP5.ColorPicker : String getInfo()
- controlP5.ColorPicker : int getColorValue()
- controlP5.ControlGroup : ColorPicker activateEvent(boolean)
- controlP5.ControlGroup : ColorPicker addListener(ControlListener)
- controlP5.ControlGroup : ColorPicker hideBar()
- controlP5.ControlGroup : ColorPicker removeListener(ControlListener)
- controlP5.ControlGroup : ColorPicker setBackgroundColor(int)
- controlP5.ControlGroup : ColorPicker setBackgroundHeight(int)
- controlP5.ControlGroup : ColorPicker setBarHeight(int)
- controlP5.ControlGroup : ColorPicker showBar()
- controlP5.ControlGroup : ColorPicker updateInternalEvents(PApplet)
- controlP5.ControlGroup : String getInfo()
- controlP5.ControlGroup : String toString()
- controlP5.ControlGroup : boolean isBarVisible()
- controlP5.ControlGroup : int getBackgroundHeight()
- controlP5.ControlGroup : int getBarHeight()
- controlP5.ControlGroup : int listenerSize()
- controlP5.ControllerGroup : CColor getColor()
- controlP5.ControllerGroup : ColorPicker add(ControllerInterface)
- controlP5.ControllerGroup : ColorPicker bringToFront()
- controlP5.ControllerGroup : ColorPicker bringToFront(ControllerInterface)
- controlP5.ControllerGroup : ColorPicker close()
- controlP5.ControllerGroup : ColorPicker disableCollapse()
- controlP5.ControllerGroup : ColorPicker enableCollapse()
- controlP5.ControllerGroup : ColorPicker hide()
- controlP5.ControllerGroup : ColorPicker moveTo(ControlWindow)
- controlP5.ControllerGroup : ColorPicker moveTo(PApplet)
- controlP5.ControllerGroup : ColorPicker open()
- controlP5.ControllerGroup : ColorPicker registerProperty(String)
- controlP5.ControllerGroup : ColorPicker registerProperty(String, String)
- controlP5.ControllerGroup : ColorPicker remove(CDrawable)
- controlP5.ControllerGroup : ColorPicker remove(ControllerInterface)
- controlP5.ControllerGroup : ColorPicker removeCanvas(ControlWindowCanvas)
- controlP5.ControllerGroup : ColorPicker removeProperty(String)
- controlP5.ControllerGroup : ColorPicker removeProperty(String, String)
- controlP5.ControllerGroup : ColorPicker setAddress(String)
- controlP5.ControllerGroup : ColorPicker setArrayValue(float[])
- controlP5.ControllerGroup : ColorPicker setColor(CColor)
- controlP5.ControllerGroup : ColorPicker setColorActive(int)
- controlP5.ControllerGroup : ColorPicker setColorBackground(int)
- controlP5.ControllerGroup : ColorPicker setColorForeground(int)
- controlP5.ControllerGroup : ColorPicker setColorLabel(int)
- controlP5.ControllerGroup : ColorPicker setColorValue(int)
- controlP5.ControllerGroup : ColorPicker setHeight(int)
- controlP5.ControllerGroup : ColorPicker setId(int)
- controlP5.ControllerGroup : ColorPicker setLabel(String)
- controlP5.ControllerGroup : ColorPicker setMouseOver(boolean)
- controlP5.ControllerGroup : ColorPicker setMoveable(boolean)
- controlP5.ControllerGroup : ColorPicker setOpen(boolean)
- controlP5.ControllerGroup : ColorPicker setPosition(PVector)
- controlP5.ControllerGroup : ColorPicker setPosition(float, float)
- controlP5.ControllerGroup : ColorPicker setStringValue(String)
- controlP5.ControllerGroup : ColorPicker setUpdate(boolean)
- controlP5.ControllerGroup : ColorPicker setValue(float)
- controlP5.ControllerGroup : ColorPicker setVisible(boolean)
- controlP5.ControllerGroup : ColorPicker setWidth(int)
- controlP5.ControllerGroup : ColorPicker show()
- controlP5.ControllerGroup : ColorPicker update()
- controlP5.ControllerGroup : ColorPicker updateAbsolutePosition()
- controlP5.ControllerGroup : ControlWindow getWindow()
- controlP5.ControllerGroup : ControlWindowCanvas addCanvas(ControlWindowCanvas)
- controlP5.ControllerGroup : Controller getController(String)
- controlP5.ControllerGroup : ControllerProperty getProperty(String)
- controlP5.ControllerGroup : ControllerProperty getProperty(String, String)
- controlP5.ControllerGroup : Label getCaptionLabel()
- controlP5.ControllerGroup : Label getValueLabel()
- controlP5.ControllerGroup : PVector getPosition()
- controlP5.ControllerGroup : String getAddress()
- controlP5.ControllerGroup : String getInfo()
- controlP5.ControllerGroup : String getName()
- controlP5.ControllerGroup : String getStringValue()
- controlP5.ControllerGroup : String toString()
- controlP5.ControllerGroup : Tab getTab()
- controlP5.ControllerGroup : boolean isCollapse()
- controlP5.ControllerGroup : boolean isMouseOver()
- controlP5.ControllerGroup : boolean isMoveable()
- controlP5.ControllerGroup : boolean isOpen()
- controlP5.ControllerGroup : boolean isUpdate()
- controlP5.ControllerGroup : boolean isVisible()
- controlP5.ControllerGroup : boolean setMousePressed(boolean)
- controlP5.ControllerGroup : float getValue()
- controlP5.ControllerGroup : float[] getArrayValue()
- controlP5.ControllerGroup : int getHeight()
- controlP5.ControllerGroup : int getId()
- controlP5.ControllerGroup : int getWidth()
- controlP5.ControllerGroup : void remove()
- java.lang.Object : String toString()
- java.lang.Object : boolean equals(Object)
-
-
-
- */
-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
ColorPicker(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend ColorPicker.
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-controlEvent(ControlEvent theEvent)
-controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about
- value changes.
- |
-
int |
-getColorValue() |
-
java.lang.String |
-getInfo() |
-
ColorPicker |
-plugTo(java.lang.Object theObject) |
-
ColorPicker |
-plugTo(java.lang.Object theObject,
- java.lang.String thePlugName) |
-
ColorPicker |
-setArrayValue(float[] theArray)
-Requires an array of size 4 for RGBA
- |
-
ColorPicker |
-setColorValue(int theColor) |
-
activateEvent, addListener, getBackgroundHeight, getBarHeight, listenerSize, mousePressed, removeListener, setBackgroundColor, setBackgroundHeight, setBarHeight, setSize, stringValue, toString, updateInternalEvents
absolutePosition, add, addCanvas, addCloseButton, addDrawable, arrayValue, bringToFront, bringToFront, close, color, continuousUpdateEvents, controller, disableCollapse, draw, enableCollapse, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getCaptionLabel, getColor, getController, getHeight, getId, getName, getParent, getPickingColor, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getWidth, getWindow, hide, hideArrow, hideBar, id, init, isBarVisible, isCollapse, isMouseOver, isMoveable, isOpen, isUpdate, isVisible, keyEvent, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, name, open, parent, position, registerProperty, registerProperty, remove, remove, remove, removeCanvas, removeCloseButton, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorForeground, setColorLabel, setGroup, setGroup, setHeight, setId, setLabel, setMouseOver, setMousePressed, setMoveable, setOpen, setPosition, setPosition, setStringValue, setTab, setTab, setTab, setTitle, setUpdate, setValue, setVisible, setWidth, show, showArrow, showBar, update, updateAbsolutePosition, updateEvents, value
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public ColorPicker(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public void controlEvent(ControlEvent theEvent)-
ControlListener
controlEvent
in interface ControlListener
controlEvent
in class ControlGroup<ColorPicker>
theEvent
- ControlEventCallbackListener
,
-CallbackEvent
public int getColorValue()-
public java.lang.String getInfo()-
ControlGroup
getInfo
in class ControlGroup<ColorPicker>
public ColorPicker plugTo(java.lang.Object theObject)-
public ColorPicker plugTo(java.lang.Object theObject, - java.lang.String thePlugName)-
public ColorPicker setArrayValue(float[] theArray)-
setArrayValue
in interface ControllerInterface<ColorPicker>
setArrayValue
in class ControllerGroup<ColorPicker>
public ColorPicker setColorValue(int theColor)-
setColorValue
in interface ControllerInterface<ColorPicker>
setColorValue
in class ControllerGroup<ColorPicker>
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ColorWheel.html b/reference/controlP5/ColorWheel.html deleted file mode 100644 index 97406b4..0000000 --- a/reference/controlP5/ColorWheel.html +++ /dev/null @@ -1,688 +0,0 @@ - - - - - -public class ColorWheel -extends Controller<ColorWheel>-
autoHeight, autoSpacing, autoWidth
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
ColorWheel(ControlP5 theControlP5,
- ControllerGroup<?> theParent,
- java.lang.String theName,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
ColorWheel(ControlP5 theControlP5,
- java.lang.String theName) |
-
Modifier and Type | -Method and Description | -
---|---|
int |
-a() |
-
int |
-b() |
-
int |
-g() |
-
int |
-getRGB() |
-
int |
-HSLtoRGB(double[] theHSL) |
-
int |
-HSLtoRGB(double h,
- double s,
- double l) |
-
int |
-HSVtoRGB(double[] hsv) |
-
int |
-HSVtoRGB(double H,
- double S,
- double V) |
-
void |
-onDrag() |
-
void |
-onEndDrag() |
-
void |
-onPress() |
-
void |
-onRelease() |
-
void |
-onStartDrag() |
-
int |
-r() |
-
double[] |
-RGBtoHSL(int theRGB) |
-
double[] |
-RGBtoHSL(int theR,
- int theG,
- int theB) |
-
double[] |
-RGBtoHSV(int c) |
-
double[] |
-RGBtoHSV(int theR,
- int theG,
- double theB) |
-
ColorWheel |
-scrolled(int theRotationValue) |
-
ColorWheel |
-setAlpha(int theAlpha) |
-
ColorWheel |
-setHSL(double theH,
- double theS,
- double theL) |
-
void |
-setHue(double theH) |
-
void |
-setLightness(double theL) |
-
ColorWheel |
-setRGB(int theColor) |
-
void |
-setSaturation(double theS) |
-
ColorWheel |
-updateDisplayMode(int theMode) |
-
ColorWheel |
-updateViewMode(int theMode) |
-
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, draw, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getInfo, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setHeight, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValue, setValueLabel, setValueSelf, setView, setView, setVisible, setWidth, show, toString, unlock, unplugFrom, unplugFrom, unregisterTooltip, update, updateAbsolutePosition, updateEvents, updateInternalEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public ColorWheel(ControlP5 theControlP5, - ControllerGroup<?> theParent, - java.lang.String theName, - int theX, - int theY, - int theWidth, - int theHeight)-
public ColorWheel(ControlP5 theControlP5, - java.lang.String theName)-
public int a()-
public int b()-
public int g()-
public int getRGB()-
public int HSLtoRGB(double[] theHSL)-
public int HSLtoRGB(double h, - double s, - double l)-
h
- value between 0 and 360s
- value between 0 and 100l)
- value between 0 and 100alpha
- value between 0 and 1public int HSVtoRGB(double[] hsv)-
public int HSVtoRGB(double H, - double S, - double V)-
H
- value between 0-1S
- value between 0-1V
- value between 0-1public void onDrag()-
public void onEndDrag()-
public void onPress()-
public void onRelease()-
public void onStartDrag()-
public int r()-
public double[] RGBtoHSL(int theRGB)-
public double[] RGBtoHSL(int theR, - int theG, - int theB)-
theR
- value between 0 and 255theG
- value between 0 and 255theB
- value between 0 and 255public final double[] RGBtoHSV(int c)-
public final double[] RGBtoHSV(int theR, - int theG, - double theB)-
theR
- value between 0 and 255theG
- value between 0 and 255theB
- value between 0 and 255public ColorWheel scrolled(int theRotationValue)-
public ColorWheel setAlpha(int theAlpha)-
public ColorWheel setHSL(double theH, - double theS, - double theL)-
public void setHue(double theH)-
public void setLightness(double theL)-
public ColorWheel setRGB(int theColor)-
public void setSaturation(double theS)-
public ColorWheel updateDisplayMode(int theMode)-
public ColorWheel updateViewMode(int theMode)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControlBehavior.html b/reference/controlP5/ControlBehavior.html deleted file mode 100644 index fcc4c73..0000000 --- a/reference/controlP5/ControlBehavior.html +++ /dev/null @@ -1,501 +0,0 @@ - - - - - -public abstract class ControlBehavior
-extends java.lang.Object
-/**
- * ControlP5 Behavior
- * ControlBehavior is an abstract class that can be extended using your
- * custom control behaviors. What is a control behavior? Control Behaviors
- * allow you to automate and dynamically change the state or value of a
- * controller. One behavior per controller is currently supported. i case you
- * need to use more that one bahavior, the implementation has to happen
- * on your side - inside your control behavior.
- *
- * find a list of public methods available for the ControlBehavior 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);
-
-public int sliderValue = 100;
-
-void setup() {
- size(400, 400);
- noStroke();
-
- cp5 = new ControlP5(this);
- cp5.addSlider("sliderValue")
- .setRange(0,255)
- .setValue(128)
- .setPosition(100, 50 + height/2)
- .setSize(40, 100);
-
- cp5.addSlider("slider")
- .setRange(100, 255)
- .setValue(128)
- .setPosition(100, 50)
- .setSize(100, 40);
-
-
- cp5.addBang("bang")
- .setPosition(40, 50 + height/2)
- .setSize(40, 40);
-
- // add a custom ControlBehavior to controller bang,
- // class TimerEvent is included in this sketch at the bottom
- // and extends abstract class ControlBehavior.
- cp5.getController("bang").setBehavior(new TimedEvent());
-
- // use an anonymous class of type ControlBehavior.
- cp5.getController("slider").setBehavior(new ControlBehavior() {
- float a = 0;
- public void update() {
- setValue(sin(a += 0.1) * 50 + 150);
- }
- }
- );
-}
-
-void draw() {
- background(myColorBackground);
- fill(sliderValue);
- rect(0, 0, width, height/2);
-}
-
-void slider(float theColor) {
- myColorBackground = color(theColor);
- println("# a slider event. setting background to "+theColor);
-}
-
-public void bang() {
- println("# an event received from controller bang.");
- // a bang will set the value of controller sliderValue
- // to a random number between 0 and 255.
- cp5.getController("sliderValue").setValue(random(0, 255));
-}
-
-// custom ControlBehavior
-class TimedEvent extends ControlBehavior {
- long myTime;
- int interval = 200;
-
- public TimedEvent() {
- reset();
- }
- void reset() {
- myTime = millis() + interval;
- }
-
- public void update() {
- if (millis()>myTime) {
- setValue(1);
- reset();
- }
- }
-}
-
-
-
-
-/*
-a list of all methods available for the ControlBehavior Controller
-use ControlP5.printPublicMethodsFor(ControlBehavior.class);
-to print the following list into the console.
-
-You can find further details about class ControlBehavior in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-
-controlP5.ControlBehavior : Controller controller()
-controlP5.ControlBehavior : boolean isActive()
-controlP5.ControlBehavior : void setActive(boolean)
-controlP5.ControlBehavior : void setValue(float)
-java.lang.Object : String toString()
-java.lang.Object : boolean equals(Object)
-
-
-*/
-
-
Constructor and Description | -
---|
ControlBehavior() |
-
Modifier and Type | -Method and Description | -
---|---|
Controller<?> |
-controller()
-Deprecated.
- |
-
Controller<?> |
-getController()
-Returns the controller this behavior is connected to.
- |
-
float |
-getValue() |
-
boolean |
-isActive()
-check if the behavior is active or not.
- |
-
void |
-setActive(boolean theFlag)
-(de)activate the behavior.
- |
-
void |
-setValue(float theValue) |
-
abstract void |
-update()
-When extending ControlBehavior, update() has to be overridden.
- |
-
float |
-value()
-Deprecated.
- |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
@Deprecated -public Controller<?> controller()-
public Controller<?> getController()-
public float getValue()-
public boolean isActive()-
public void setActive(boolean theFlag)-
theFlag
- booleanpublic void setValue(float theValue)-
public abstract void update()-
@Deprecated -public float value()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControlBroadcaster.html b/reference/controlP5/ControlBroadcaster.html deleted file mode 100644 index 931e455..0000000 --- a/reference/controlP5/ControlBroadcaster.html +++ /dev/null @@ -1,452 +0,0 @@ - - - - - -public class ControlBroadcaster
-extends java.lang.Object
-ControlP5.getControlBroadcaster()
Modifier and Type | -Method and Description | -
---|---|
ControlBroadcaster |
-addCallback(CallbackListener... theListeners) |
-
ControlBroadcaster |
-addCallback(CallbackListener theListener) |
-
void |
-addCallback(CallbackListener theListener,
- Controller<?>... theController)
-Adds a CallbackListener for a list of controllers.
- |
-
ControlBroadcaster |
-addListener(ControlListener... theListeners) |
-
ControlBroadcaster |
-broadcast(ControlEvent theControlEvent,
- int theType) |
-
ControlListener |
-getListener(int theIndex)
-Returns a ControlListener by index
- |
-
static void |
-ignoreErrorMessage(boolean theFlag) |
-
int |
-listenerSize()
-Returns the size of the ControlListener list
- |
-
ControlBroadcaster |
-plug(java.lang.Object theObject,
- Controller<?> theController,
- java.lang.String theTargetMethod) |
-
ControlBroadcaster |
-plug(java.lang.Object theObject,
- java.lang.String theControllerName,
- java.lang.String theTargetMethod) |
-
void |
-plug(java.lang.String theControllerName,
- java.lang.String theTargetMethod)
-Deprecated.
- |
-
ControlBroadcaster |
-removeCallback(CallbackListener... theListeners) |
-
ControlBroadcaster |
-removeCallback(CallbackListener theListener) |
-
ControlBroadcaster |
-removeCallback(Controller<?>... theControllers)
-Removes a CallbackListener for a particular controller
- |
-
ControlBroadcaster |
-removeListener(ControlListener... theListeners) |
-
static void |
-setPrintStackTrace(boolean theFlag) |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ControlBroadcaster addCallback(CallbackListener... theListeners)-
public ControlBroadcaster addCallback(CallbackListener theListener)-
public void addCallback(CallbackListener theListener, - Controller<?>... theController)-
theListener
- theController
- public ControlBroadcaster addListener(ControlListener... theListeners)-
public ControlBroadcaster broadcast(ControlEvent theControlEvent, - int theType)-
public ControlListener getListener(int theIndex)-
theIndex
- public static void ignoreErrorMessage(boolean theFlag)-
public int listenerSize()-
public ControlBroadcaster plug(java.lang.Object theObject, - Controller<?> theController, - java.lang.String theTargetMethod)-
public ControlBroadcaster plug(java.lang.Object theObject, - java.lang.String theControllerName, - java.lang.String theTargetMethod)-
@Deprecated -public void plug(java.lang.String theControllerName, - java.lang.String theTargetMethod)-
public ControlBroadcaster removeCallback(CallbackListener... theListeners)-
public ControlBroadcaster removeCallback(CallbackListener theListener)-
public ControlBroadcaster removeCallback(Controller<?>... theControllers)-
theController
- public ControlBroadcaster removeListener(ControlListener... theListeners)-
public static void setPrintStackTrace(boolean theFlag)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControlElement.html b/reference/controlP5/ControlElement.html deleted file mode 100644 index 0bd5250..0000000 --- a/reference/controlP5/ControlElement.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - - -@Retention(value=RUNTIME)
-public @interface ControlElement
-/**
- * ControlP5 Annotation
- *
- * Lately annotation support has been added to processing.
- * Making use of annotations to create controllers is a great strategy i learned
- * from Karsten Schmidt's (toxi) cp5magic library.
- * Loving the simplicity of annotations and how it is aplied with cp5magic,
- * i had to include it into controlp5 and the following example
- * shows how to use annotations with controlp5.
- *
- * Annotations can be applied to variables and functions of the main program
- * as well as individual classes. More details are included in the comments below.
- *
- * by Andreas Schlegel, 2012
- * www.sojamo.de/libraries/controlp5
- *
- */
-import controlP5.*;
-
-ControlP5 cp5;
-
-TestControl tc1, tc2;
-
-Tab extraTab;
-
-// create controllers using the ControlElement annotation
-// by default a slider is created for int and float
-// values will range from 0-100 by default
-// default attributes are x,y and label
-@ControlElement (x=10, y=80)
-int n = 20;
-
-// to customize a controller with a CoontrolElement use the
-// properties attribute. values passed using properties have a key and a value
-// here the key corresponds with a function found within a controller which
-// starts with set followed by the name of the key. the value is then applied accordingly.
-// e.g. min=10 will translate to controller.setMin(10)
-@ControlElement (properties = { "min=0", "max=255", "type=numberbox", "height=10", "width=50"} , x=10, y=40, label="Change Background")
-float m = 40;
-
-
-void setup() {
- size(600, 400);
- noStroke();
-
- cp5 = new ControlP5(this);
-
- // Annotations:
- // addControllersFor(PApplet) checks the main sketch for
- // annotations and adds controllers accordingly.
- cp5.addControllersFor(this);
-
-
-
-
- extraTab = cp5.addTab("extra");
-
- // create an instance of class testControl
- tc1 = new TestControl();
-
- // addControllersFor cycles throught object tc1
- // and assigns controllers according to available annotations.
- // an address will be assigned to these controllers, in the example
- // below the address is /world and the individual controllers can be
- // accessed adding a / and the controller's name
- // e.g. variable x
- // /world/x
- cp5.addControllersFor("world", tc1);
-
- // set the Position of controllers contained within object tc1
- cp5.setPosition(10, 150, tc1);
-
-
- // a more advanced example of using functions with ControllerObjects
- tc2 = new TestControl();
- CColor col = new CColor();
- col.setActive(color(0, 200, 100));
-
- cp5.addControllersFor("hello", tc2)
- .setPosition(200, 150, tc2)
- .moveTo(extraTab, tc2)
- .setColor(col, tc2);
-
- cp5.getController("s", tc2)
- .setStringValue("Second Control");
-
- // with listening turned on, a controller can listen to changes made to its connected variable
- // here the controller will listen to variable x of object tc2
- cp5.getController("x", tc2).listen(true);
-
-
- // (uncomment line below) print the a map of all available controller addresses
- // cp5.printControllerMap();
-
- // (uncomment line below) access a controller via its address:
- // println(cp5.getController("/world/x").getInfo());
-}
-
-
-
-void draw() {
- background(m);
-
- pushMatrix();
- if (tc1.b) {
- fill(tc1.x);
- translate(10, tc1.y);
- rect(0, 300, 100, 20);
- }
- popMatrix();
- fill(255);
- text(tc1.in,400,100,150,300);
-
-
- pushMatrix();
- if (tc2.b) {
- fill(tc2.x);
- translate(200, tc2.y);
- for (int i=0;i<1;i++) {
- rect(0, 300, 100, 20);
- }
- }
- popMatrix();
- fill(255);
- text(tc2.in,400,300,150,300);
-
- // the variable x of object tt is controlled by the main program,
- // the matching controller will update accordingly since it is
- // listening for changes.
- tc2.x = (int)random(100);
-
-
-}
-
-
-public class TestControl {
-
- @ControlElement (properties = { "min=0", "max=255" }, x=0, y=0, label="Brightness")
- public int x = 100;
-
- @ControlElement (x=0, y=14, label="Y-Position")
- public float y = 0;
-
- @ControlElement (x=0, y=40, label="show")
- public boolean b = true;
-
- @ControlElement (x=50, y=40)
- public void toggle(boolean b) {
- println("hello world");
- }
-
- @ControlElement (x=0, y=-20, label="Control", properties = { "type=textlabel"})
- String s;
-
- @ControlElement (x=0, y=100, label="Type here")
- String in = "";
-
- @ControlElement (x=200, y=25, properties = {"type=list", "items=hello, world, how are you"}, label="Sample-list")
- public void a(int val) {
- println(val);
- }
-}
-
-
-
-
-
Modifier and Type | -Optional Element and Description | -
---|---|
java.lang.String |
-label |
-
java.lang.String[] |
-properties |
-
int |
-x |
-
int |
-y |
-
public abstract java.lang.String label-
public abstract java.lang.String[] properties-
public abstract int x-
public abstract int y-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControlEvent.html b/reference/controlP5/ControlEvent.html deleted file mode 100644 index 58ae5ef..0000000 --- a/reference/controlP5/ControlEvent.html +++ /dev/null @@ -1,749 +0,0 @@ - - - - - -public class ControlEvent
-extends java.lang.Object
-Tab
Tab.activateEvent(). for detailed information see the tab
- documentation./**
- * ControlP5 ControlEvent.
- * every control event is automatically forwarded to the function controlEvent(ControlEvent)
- * inside a sketch if such function is available. For further details about the API of
- * the ControlEvent class, please refer to the documentation.
- *
- *
- * find a list of public methods available for ControlEvent
- * at the bottom of this sketch's source code
- *
- * by Andreas Schlegel, 2012
- * www.sojamo.de/libraries/controlP5
- *
- */
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-public int myColorRect1 = 200;
-
-public int myColorRect2 = 100;
-
-
-void setup() {
- size(400, 400);
- noStroke();
-
- cp5 = new ControlP5(this);
- cp5.addNumberbox("n1")
- .setValue(myColorRect1)
- .setPosition(20, 20)
- .setSize(100, 20)
- .setMin(0)
- .setMax(255)
- .setId(1);
-
- cp5.addNumberbox("n2")
- .setValue(myColorRect2)
- .setPosition(20, 60)
- .setSize(100, 20)
- .setMin(0)
- .setMax(255)
- .setId(2);
-
- cp5.addTextfield("n3")
- .setPosition(20, 100)
- .setSize(100, 20)
- .setId(3);
-
-}
-
-void draw() {
- background(ControlP5.MAROON);
- fill(ControlP5.RED, myColorRect1);
- rect(140, 20, 240, 170);
- fill(ControlP5.FUCHSIA, myColorRect2);
- rect(140, 210, 240, 170);
-}
-
-
-void controlEvent(ControlEvent theEvent) {
- println("got a control event from controller with id "+theEvent.getController().getId());
-
- if (theEvent.isFrom(cp5.getController("n1"))) {
- println("this event was triggered by Controller n1");
- }
-
- switch(theEvent.getController().getId()) {
- case(1):
- myColorRect1 = (int)(theEvent.getController().getValue());
- break;
- case(2):
- myColorRect2 = (int)(theEvent.getController().getValue());
- break;
- case(3):
- println(theEvent.getController().getStringValue());
- break;
- }
-}
-
-
-/*
- a list of all methods available for ControlEvent
- use ControlP5.printPublicMethodsFor(ControlEvent.class);
- to print the following list into the console.
-
- You can find further details about class ControlEvent in the javadoc.
-
- Format:
- ClassName : returnType methodName(parameter type)
-
- controlP5.ControlEvent : ControlGroup getGroup()
- controlP5.ControlEvent : Controller getController()
- controlP5.ControlEvent : String getLabel()
- controlP5.ControlEvent : String getName()
- controlP5.ControlEvent : String getStringValue()
- controlP5.ControlEvent : Tab getTab()
- controlP5.ControlEvent : boolean isController()
- controlP5.ControlEvent : boolean isFrom(ControllerInterface)
- controlP5.ControlEvent : boolean isFrom(String)
- controlP5.ControlEvent : boolean isGroup()
- controlP5.ControlEvent : boolean isTab()
- controlP5.ControlEvent : float getValue()
- controlP5.ControlEvent : float[] getArrayValue()
- controlP5.ControlEvent : int getId()
- controlP5.ControlEvent : int getType()
- java.lang.Object : String toString()
- java.lang.Object : boolean equals(Object)
- */
-
-
-
Modifier and Type | -Field and Description | -
---|---|
static int |
-CONTROLLER |
-
static int |
-GROUP |
-
static int |
-TAB |
-
static int |
-UNDEFINDED |
-
Constructor and Description | -
---|
ControlEvent(ControllerGroup<?> theController) |
-
ControlEvent(Tab theController) |
-
Modifier and Type | -Method and Description | -
---|---|
float[] |
-getArrayValue()
-Returns a float array, applies to e.g.
- |
-
float |
-getArrayValue(int theIndex)
-Returns a float value at a particular index from a controller's array value.
- |
-
Controller<?> |
-getController()
-Returns the instance of the controller sending the ControlEvent.
- |
-
ControlGroup<?> |
-getGroup()
-Returns the group that evoked the ControlEvent
- |
-
int |
-getId()
-Returns the controller's id, if an id has not been set before the default value -1 will be
- returned.
- |
-
java.lang.String |
-getLabel()
-Gets the text of the controller's label that has evoked the event.
- |
-
java.lang.String |
-getName()
-returns the controller's name
- |
-
java.lang.String |
-getStringValue() |
-
Tab |
-getTab()
-Returns the tab that triggered the ControlEvent
- |
-
int |
-getType() |
-
float |
-getValue() |
-
boolean |
-isAssignableFrom(java.lang.Class<?> c) |
-
boolean |
-isController()
-Checks if the ControlEvent was triggered by a controller
- |
-
boolean |
-isFrom(ControllerInterface<?> theController)
-Checks if the ControlEvent originates from a specific Controller or ControllerGroup.
- |
-
boolean |
-isFrom(java.lang.String theControllerName)
-checks if the ControlEvent originates from a specific Controller or ControllerGroup
- identifiable by name.
- |
-
boolean |
-isGroup()
-Checks if the ControlEvent was triggered by a ControlGroup
- |
-
boolean |
-isTab()
-Checks if the ControlEvent was triggered by a tab
- |
-
java.lang.String |
-toString() |
-
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static int CONTROLLER-
public static int GROUP-
public static int TAB-
public static int UNDEFINDED-
public ControlEvent(ControllerGroup<?> theController)-
theController
- Controllerpublic ControlEvent(Tab theController)-
theController
- Controllerpublic float[] getArrayValue()-
public float getArrayValue(int theIndex)-
theIndex
- public Controller<?> getController()-
public ControlGroup<?> getGroup()-
public int getId()-
public java.lang.String getLabel()-
public java.lang.String getName()-
public java.lang.String getStringValue()-
public Tab getTab()-
public int getType()-
public float getValue()-
public boolean isAssignableFrom(java.lang.Class<?> c)-
public boolean isController()-
Controller
public boolean isFrom(ControllerInterface<?> theController)-
theController
- public boolean isFrom(java.lang.String theControllerName)-
theController
- public boolean isGroup()-
ControllerGroup
public boolean isTab()-
Tab
public java.lang.String toString()-
toString
in class java.lang.Object
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControlFont.html b/reference/controlP5/ControlFont.html deleted file mode 100644 index aad9e96..0000000 --- a/reference/controlP5/ControlFont.html +++ /dev/null @@ -1,590 +0,0 @@ - - - - - -public class ControlFont
-extends java.lang.Object
-Modifier and Type | -Field and Description | -
---|---|
static boolean |
-DEBUG |
-
static boolean |
-RENDER_2X
-set the RENDER_2X variable to true to double render text, this makes the font look bolder
- especially in OpenGL mode.
- |
-
Constructor and Description | -
---|
ControlFont(processing.core.PFont theFont) |
-
ControlFont(processing.core.PFont theFont,
- int theFontSize) |
-
ControlFont(processing.core.PFont theFont,
- int theFontSize,
- int theLineHeight) |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-adjust(processing.core.PGraphics theGraphics,
- Label theLabel) |
-
void |
-draw(ControlP5 c,
- Label theLabel) |
-
void |
-draw(processing.core.PGraphics theGraphics,
- Label theLabel) |
-
int |
-getBaseline() |
-
int |
-getBottom() |
-
int |
-getCenter() |
-
processing.core.PFont |
-getFont() |
-
int |
-getHeight() |
-
int |
-getOffset(int theIndex) |
-
int |
-getOverflow() |
-
int |
-getSize() |
-
int |
-getTextHeight() |
-
int |
-getTop() |
-
int |
-getWidth() |
-
static int |
-getWidthFor(java.lang.String theText,
- Label theLabel,
- processing.core.PGraphics theGraphics) |
-
void |
-init(Label theLabel) |
-
static void |
-normal()
-sets the rendering of a PFont back to normal and single rendering.
- |
-
void |
-setSize(int theSize) |
-
static void |
-sharp()
-renders a PFont twice for better and sharper readability
- |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static boolean DEBUG-
public static boolean RENDER_2X-
public ControlFont(processing.core.PFont theFont)-
public ControlFont(processing.core.PFont theFont, - int theFontSize)-
public ControlFont(processing.core.PFont theFont, - int theFontSize, - int theLineHeight)-
public void adjust(processing.core.PGraphics theGraphics, - Label theLabel)-
public void draw(processing.core.PGraphics theGraphics, - Label theLabel)-
public int getBaseline()-
public int getBottom()-
public int getCenter()-
public processing.core.PFont getFont()-
public int getHeight()-
public int getOffset(int theIndex)-
public int getOverflow()-
public int getSize()-
public int getTextHeight()-
public int getTop()-
public int getWidth()-
public static int getWidthFor(java.lang.String theText, - Label theLabel, - processing.core.PGraphics theGraphics)-
public void init(Label theLabel)-
public static void normal()-
public void setSize(int theSize)-
public static void sharp()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControlGroup.html b/reference/controlP5/ControlGroup.html deleted file mode 100644 index 5950ca9..0000000 --- a/reference/controlP5/ControlGroup.html +++ /dev/null @@ -1,997 +0,0 @@ - - - - - -public class ControlGroup<T> -extends ControllerGroup<T> -implements ControlListener-
- In previous versions you would use the ControlGroup class to bundle controllers in a group. Now - please use the Group class to do so. -
-
- ControlGroup extends ControllerGroup, for a list and documentation of available methods see the
- ControllerGroup
documentation.
-
Group
/**
-* ControlP5 Group
-*
-*
-* find a list of public methods available for the Group Controller
-* at the bottom of this sketch.
-*
-* by Andreas Schlegel, 2012
-* www.sojamo.de/libraries/controlp5
-*
-*/
-
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-void setup() {
- size(700,400);
-
- cp5 = new ControlP5(this);
-
- Group g1 = cp5.addGroup("g1")
- .setPosition(100,100)
- .setBackgroundHeight(100)
- .setBackgroundColor(color(255,50))
- ;
-
- cp5.addBang("A-1")
- .setPosition(10,20)
- .setSize(80,20)
- .setGroup(g1)
- ;
-
- cp5.addBang("A-2")
- .setPosition(10,60)
- .setSize(80,20)
- .setGroup(g1)
- ;
-
-
- Group g2 = cp5.addGroup("g2")
- .setPosition(300,100)
- .setWidth(300)
- .activateEvent(true)
- .setBackgroundColor(color(255,80))
- .setBackgroundHeight(100)
- .setLabel("Hello World.")
- ;
-
- cp5.addSlider("S-1")
- .setPosition(80,10)
- .setSize(180,9)
- .setGroup(g2)
- ;
-
- cp5.addSlider("S-2")
- .setPosition(80,20)
- .setSize(180,9)
- .setGroup(g2)
- ;
-
- cp5.addRadioButton("radio")
- .setPosition(10,10)
- .setSize(20,9)
- .addItem("black",0)
- .addItem("red",1)
- .addItem("green",2)
- .addItem("blue",3)
- .addItem("grey",4)
- .setGroup(g2)
- ;
-}
-
-
-void draw() {
- background(0);
-}
-
-
-void controlEvent(ControlEvent theEvent) {
- if(theEvent.isGroup()) {
- println("got an event from group "
- +theEvent.getGroup().getName()
- +", isOpen? "+theEvent.getGroup().isOpen()
- );
-
- } else if (theEvent.isController()){
- println("got something from a controller "
- +theEvent.getController().getName()
- );
- }
-}
-
-
-void keyPressed() {
- if(key==' ') {
- if(cp5.getGroup("g1")!=null) {
- cp5.getGroup("g1").remove();
- }
- }
-}
-
-
-
-
-/*
-a list of all methods available for the Group Controller
-use ControlP5.printPublicMethodsFor(Group.class);
-to print the following list into the console.
-
-You can find further details about class Group in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-
-controlP5.ControlGroup : Group activateEvent(boolean)
-controlP5.ControlGroup : Group addListener(ControlListener)
-controlP5.ControlGroup : Group hideBar()
-controlP5.ControlGroup : Group removeListener(ControlListener)
-controlP5.ControlGroup : Group setBackgroundColor(int)
-controlP5.ControlGroup : Group setBackgroundHeight(int)
-controlP5.ControlGroup : Group setBarHeight(int)
-controlP5.ControlGroup : Group showBar()
-controlP5.ControlGroup : Group updateInternalEvents(PApplet)
-controlP5.ControlGroup : String getInfo()
-controlP5.ControlGroup : String toString()
-controlP5.ControlGroup : boolean isBarVisible()
-controlP5.ControlGroup : int getBackgroundHeight()
-controlP5.ControlGroup : int getBarHeight()
-controlP5.ControlGroup : int listenerSize()
-controlP5.ControllerGroup : CColor getColor()
-controlP5.ControllerGroup : ControlWindow getWindow()
-controlP5.ControllerGroup : ControlWindowCanvas addCanvas(ControlWindowCanvas)
-controlP5.ControllerGroup : Controller getController(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String, String)
-controlP5.ControllerGroup : Group add(ControllerInterface)
-controlP5.ControllerGroup : Group bringToFront()
-controlP5.ControllerGroup : Group bringToFront(ControllerInterface)
-controlP5.ControllerGroup : Group close()
-controlP5.ControllerGroup : Group disableCollapse()
-controlP5.ControllerGroup : Group enableCollapse()
-controlP5.ControllerGroup : Group hide()
-controlP5.ControllerGroup : Group moveTo(ControlWindow)
-controlP5.ControllerGroup : Group moveTo(PApplet)
-controlP5.ControllerGroup : Group open()
-controlP5.ControllerGroup : Group registerProperty(String)
-controlP5.ControllerGroup : Group registerProperty(String, String)
-controlP5.ControllerGroup : Group remove(CDrawable)
-controlP5.ControllerGroup : Group remove(ControllerInterface)
-controlP5.ControllerGroup : Group removeCanvas(ControlWindowCanvas)
-controlP5.ControllerGroup : Group removeProperty(String)
-controlP5.ControllerGroup : Group removeProperty(String, String)
-controlP5.ControllerGroup : Group setAddress(String)
-controlP5.ControllerGroup : Group setArrayValue(float[])
-controlP5.ControllerGroup : Group setColor(CColor)
-controlP5.ControllerGroup : Group setColorActive(int)
-controlP5.ControllerGroup : Group setColorBackground(int)
-controlP5.ControllerGroup : Group setColorForeground(int)
-controlP5.ControllerGroup : Group setColorLabel(int)
-controlP5.ControllerGroup : Group setColorValue(int)
-controlP5.ControllerGroup : Group setHeight(int)
-controlP5.ControllerGroup : Group setId(int)
-controlP5.ControllerGroup : Group setLabel(String)
-controlP5.ControllerGroup : Group setMouseOver(boolean)
-controlP5.ControllerGroup : Group setMoveable(boolean)
-controlP5.ControllerGroup : Group setOpen(boolean)
-controlP5.ControllerGroup : Group setPosition(PVector)
-controlP5.ControllerGroup : Group setPosition(float, float)
-controlP5.ControllerGroup : Group setStringValue(String)
-controlP5.ControllerGroup : Group setUpdate(boolean)
-controlP5.ControllerGroup : Group setValue(float)
-controlP5.ControllerGroup : Group setVisible(boolean)
-controlP5.ControllerGroup : Group setWidth(int)
-controlP5.ControllerGroup : Group show()
-controlP5.ControllerGroup : Group update()
-controlP5.ControllerGroup : Group updateAbsolutePosition()
-controlP5.ControllerGroup : Label getCaptionLabel()
-controlP5.ControllerGroup : Label getValueLabel()
-controlP5.ControllerGroup : PVector getPosition()
-controlP5.ControllerGroup : String getAddress()
-controlP5.ControllerGroup : String getInfo()
-controlP5.ControllerGroup : String getName()
-controlP5.ControllerGroup : String getStringValue()
-controlP5.ControllerGroup : String toString()
-controlP5.ControllerGroup : Tab getTab()
-controlP5.ControllerGroup : boolean isCollapse()
-controlP5.ControllerGroup : boolean isMouseOver()
-controlP5.ControllerGroup : boolean isMoveable()
-controlP5.ControllerGroup : boolean isOpen()
-controlP5.ControllerGroup : boolean isUpdate()
-controlP5.ControllerGroup : boolean isVisible()
-controlP5.ControllerGroup : boolean setMousePressed(boolean)
-controlP5.ControllerGroup : float getValue()
-controlP5.ControllerGroup : float[] getArrayValue()
-controlP5.ControllerGroup : int getHeight()
-controlP5.ControllerGroup : int getId()
-controlP5.ControllerGroup : int getWidth()
-controlP5.ControllerGroup : void remove()
-java.lang.Object : String toString()
-java.lang.Object : boolean equals(Object)
-
-
-*/
-
-
-
-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
ControlGroup(ControlP5 theControlP5,
- ControllerGroup<?> theParent,
- java.lang.String theName,
- int theX,
- int theY,
- int theW,
- int theH) |
-
ControlGroup(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend ControlGroup.
- |
-
Modifier and Type | -Method and Description | -
---|---|
T |
-activateEvent(boolean theFlag)
-activates or deactivates the Event status of a ControlGroup.
- |
-
T |
-addListener(ControlListener theListener)
-adds a listener to the controller.
- |
-
void |
-controlEvent(ControlEvent theEvent)
-controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about
- value changes.
- |
-
int |
-getBackgroundHeight()
-get the height of the controlGroup's background.
- |
-
int |
-getBarHeight() |
-
java.lang.String |
-getInfo() |
-
int |
-listenerSize() |
-
void |
-mousePressed() |
-
T |
-removeListener(ControlListener theListener)
-remove a listener from the controller.
- |
-
T |
-setBackgroundColor(int theColor)
-set the background color of a controlGroup.
- |
-
T |
-setBackgroundHeight(int theHeight)
-set the height of the controlGroup's background.
- |
-
T |
-setBarHeight(int theHeight)
-set the height of the top bar (used to open/close and move a controlGroup).
- |
-
T |
-setSize(int theWidth,
- int theHeight) |
-
java.lang.String |
-stringValue()
-!!! experimental, see ControllerGroup.value()
- |
-
java.lang.String |
-toString() |
-
T |
-updateInternalEvents(processing.core.PApplet theApplet)
-a method for putting input events like e.g.
- |
-
absolutePosition, add, addCanvas, addCloseButton, addDrawable, arrayValue, bringToFront, bringToFront, close, color, continuousUpdateEvents, controller, disableCollapse, draw, enableCollapse, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getCaptionLabel, getColor, getController, getHeight, getId, getName, getParent, getPickingColor, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getWidth, getWindow, hide, hideArrow, hideBar, id, init, isBarVisible, isCollapse, isMouseOver, isMoveable, isOpen, isUpdate, isVisible, keyEvent, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, name, open, parent, position, registerProperty, registerProperty, remove, remove, remove, removeCanvas, removeCloseButton, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorForeground, setColorLabel, setColorValue, setGroup, setGroup, setHeight, setId, setLabel, setMouseOver, setMousePressed, setMoveable, setOpen, setPosition, setPosition, setStringValue, setTab, setTab, setTab, setTitle, setUpdate, setValue, setVisible, setWidth, show, showArrow, showBar, update, updateAbsolutePosition, updateEvents, value
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public ControlGroup(ControlP5 theControlP5, - ControllerGroup<?> theParent, - java.lang.String theName, - int theX, - int theY, - int theW, - int theH)-
public ControlGroup(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public T activateEvent(boolean theFlag)-
theFlag
- booleanTab
public T addListener(ControlListener theListener)-
addListener
in interface ControllerInterface<T>
addListener
in class ControllerGroup<T>
theListener
- ControlListenerControlListener
public void controlEvent(ControlEvent theEvent)-
ControlListener
controlEvent
in interface ControlListener
controlEvent
in class ControllerGroup<T>
theEvent
- ControlEventCallbackListener
,
-CallbackEvent
public int getBackgroundHeight()-
public int getBarHeight()-
public java.lang.String getInfo()-
getInfo
in class ControllerGroup<T>
public int listenerSize()-
listenerSize
in class ControllerGroup<T>
public void mousePressed()-
public T removeListener(ControlListener theListener)-
removeListener
in class ControllerGroup<T>
theListener
- ControlListenerControlListener
public T setBackgroundColor(int theColor)-
theColor
- public T setBackgroundHeight(int theHeight)-
theHeight
- public T setBarHeight(int theHeight)-
theHeight
- public T setSize(int theWidth, - int theHeight)-
setSize
in class ControllerGroup<T>
public java.lang.String stringValue()-
stringValue
in interface ControllerInterface<T>
stringValue
in class ControllerGroup<T>
public java.lang.String toString()-
toString
in class ControllerGroup<T>
public T updateInternalEvents(processing.core.PApplet theApplet)-
ControllerInterface
updateInternalEvents
in interface ControllerInterface<T>
updateInternalEvents
in class ControllerGroup<T>
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControlKey.html b/reference/controlP5/ControlKey.html deleted file mode 100644 index 20438cd..0000000 --- a/reference/controlP5/ControlKey.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - -public interface ControlKey
-processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControlListener.html b/reference/controlP5/ControlListener.html deleted file mode 100644 index c21195c..0000000 --- a/reference/controlP5/ControlListener.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - - -public interface ControlListener
-Controller.addListener(ControlListener)
,
-CallbackListener
/**
- * ControlP5 Listener.
- * the ControlListener interface can be used to implement a custom
- * ControlListener which listens for incoming ControlEvent from specific
- * controller(s). MyControlListener in the example below listens to
- * ControlEvents coming in from controller 'mySlider'.
- *
- * by andreas schlegel, 2012
- */
-import controlP5.*;
-
-ControlP5 cp5;
-MyControlListener myListener;
-
-void setup() {
- size(700,400);
-
-
- cp5 = new ControlP5(this);
- cp5.setColor(ControlP5.THEME_RED);
-
- cp5.addSlider("mySlider")
- .setRange(100,200)
- .setValue(140)
- .setPosition(200,200)
- .setSize(200,20);
-
- myListener = new MyControlListener();
-
- cp5.getController("mySlider").addListener(myListener);
-}
-
-void draw() {
- background(myListener.col);
-}
-
-
-class MyControlListener implements ControlListener {
- int col;
- public void controlEvent(ControlEvent theEvent) {
- println("i got an event from mySlider, " +
- "changing background color to "+
- theEvent.getController().getValue());
- col = (int)theEvent.getController().getValue();
- }
-
-}
-
Modifier and Type | -Method and Description | -
---|---|
void |
-controlEvent(ControlEvent theEvent)
-controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about
- value changes.
- |
-
void controlEvent(ControlEvent theEvent)-
theEvent
- ControlEventCallbackListener
,
-CallbackEvent
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControlP5.html b/reference/controlP5/ControlP5.html deleted file mode 100644 index d936c08..0000000 --- a/reference/controlP5/ControlP5.html +++ /dev/null @@ -1,2326 +0,0 @@ - - - - - -public class ControlP5 -extends ControlP5Base-
- controlP5 is a processing and java library for creating - simple control GUIs. The ControlP5 class, the core of - controlP5. -
-- All addController-Methods are located inside the - ControlP5Base class. -
ControlP5Base
/**
- * ControlP5 Basics
- *
- * The following example demonstrates the basic use of controlP5.
- * After initializing controlP5 you can add controllers to controlP5.
- * Here we use three numberboxes, one slider and one textfield.
- * The numberbox with name numberboxC will trigger function numberboxC()
- * in the example below. Whenever controlP5 detects a function in your
- * sketch that corresponds to the name of a controller, it will forward
- * an event to that function. Any event triggered by a controller
- * will be forwarded to function controlEvent in your sketch.
- * related examples ControlP5numberbox, ControlP5slider, ControlP5textfield
- *
- * by Andreas Schlegel, 2011
- * www.sojamo.de/libraries/controlp5
- *
- */
-
-
-import controlP5.*;
-
-ControlP5 cp5;
-public int myColorRect = 200;
-public int myColorBackground = 100;
-
-void setup() {
- size(400, 400);
- noStroke();
-
- cp5 = new ControlP5(this);
-
- // create a slider
- // parameters:
- // name, minValue, maxValue, defaultValue, x, y, width, height
- cp5.addSlider("sliderA", 100, 200, 100, 100, 260, 100, 14);
-
-
- // create 3 numberboxes and assign an id for each
- cp5.addNumberbox("numberboxA", myColorRect, 100, 140, 100, 14).setId(1);
- cp5.addNumberbox("numberboxB", myColorBackground, 100, 180, 100, 14).setId(2);
- cp5.addNumberbox("numberboxC", 0, 100, 220, 100, 14).setId(3);
-
-
- // create a texfield
- cp5.addTextfield("textA", 100, 290, 100, 20);
-
- // change individual settings for a controller
- cp5.getController("numberboxA").setMax(255);
- cp5.getController("numberboxA").setMin(0);
-}
-
-void draw() {
- background(myColorBackground);
- fill(myColorRect);
- rect(0, 0, width, 100);
-}
-
-
-// events from controller numberboxC are received here
-public void numberboxC(int theValue) {
- println("### got an event from numberboxC : "+theValue);
-}
-
-
-// an event from slider sliderA will change the value of textfield textA here
-public void sliderA(int theValue) {
- Textfield txt = ((Textfield)cp5.getController("textA"));
- txt.setValue(""+theValue);
-}
-
-
-// for every change (a textfield event confirmed with a return) in textfield textA,
-// function textA will be invoked
-public void textA(String theValue) {
- println("### got an event from textA : "+theValue);
-}
-
-
-// function controlEvent will be invoked with every value change
-// in any registered controller
-public void controlEvent(ControlEvent theEvent) {
- println("got a control event from controller with id "+theEvent.getId());
- switch(theEvent.getId()) {
- case(1): // numberboxA is registered with id 1
- myColorRect = (int)(theEvent.getController().getValue());
- break;
- case(2): // numberboxB is registered with id 2
- myColorBackground = (int)(theEvent.getController().getValue());
- break;
- }
-}
-
-
Modifier and Type | -Field and Description | -
---|---|
boolean |
-blockDraw
-Deprecated.
- |
-
ControlWindow |
-controlWindow |
-
static boolean |
-DEBUG
-use this static variable to turn DEBUG on or off.
- |
-
static boolean |
-isApplet |
-
static java.util.logging.Logger |
-logger |
-
processing.core.PApplet |
-papplet |
-
static java.lang.String |
-VERSION |
-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
ControlP5(processing.core.PApplet theParent)
-Create a new instance of controlP5.
- |
-
ControlP5(processing.core.PApplet theParent,
- ControlFont theControlFont) |
-
ControlP5(processing.core.PApplet theParent,
- processing.core.PFont thePFont) |
-
Modifier and Type | -Method and Description | -
---|---|
ControlP5 |
-addCallback(CallbackListener... theListeners) |
-
ControlP5 |
-addCallback(CallbackListener theListener) |
-
ControlP5 |
-addCallback(CallbackListener theListener,
- Controller<?>... theControllers) |
-
ControlP5 |
-addCanvas(Canvas theCanvas)
-adds a Canvas to the default sketch window.
- |
-
void |
-addControlsFor(java.lang.Object theObject)
-TODO
- |
-
ControlP5 |
-addListener(ControlListener... theListeners) |
-
void |
-addPositionTo(int theX,
- int theY,
- ControllerInterface<?>... theControllers) |
-
void |
-addPositionTo(int theX,
- int theY,
- java.util.List<ControllerInterface<?>> theControllers) |
-
static boolean |
-b(java.lang.Object o) |
-
ControllerGroup<?> |
-begin()
-cp5.begin() and cp5.end() are mechanisms to
- auto-layout controllers, see the ControlP5beginEnd
- example.
- |
-
ControllerGroup<?> |
-begin(ControllerGroup<?> theGroup) |
-
ControllerGroup<?> |
-begin(ControllerGroup<?> theGroup,
- int theX,
- int theY) |
-
ControllerGroup<?> |
-begin(ControlWindow theWindow) |
-
ControllerGroup<?> |
-begin(ControlWindow theWindow,
- int theX,
- int theY) |
-
ControllerGroup<?> |
-begin(int theX,
- int theY) |
-
static double |
-d(java.lang.Object o) |
-
void |
-disableShortcuts()
-disables shortcuts such as alt-h for hiding/showing
- controllers
- |
-
void |
-dispose()
-disposes and clears all controlP5 elements.
- |
-
void |
-draw()
-call draw() from your program when autoDraw is
- disabled.
- |
-
void |
-enableShortcuts()
-enables shortcuts.
- |
-
ControllerGroup<?> |
-end()
-cp5.begin() and cp5.end() are mechanisms to
- auto-layout controllers, see the ControlP5beginEnd
- example.
- |
-
ControllerGroup<?> |
-end(ControllerGroup<?> theGroup) |
-
static float |
-f(java.lang.Object o) |
-
<C> C |
-get(java.lang.Class<C> theClass,
- java.lang.String theName) |
-
ControllerInterface<?> |
-get(java.lang.Object theObject,
- java.lang.String theName) |
-
ControllerInterface<?> |
-get(java.lang.String theName) |
-
java.util.List<ControllerInterface<?>> |
-getAll()
-Returns a List of all controllers currently
- registered.
- |
-
<T> java.util.List<T> |
-getAll(java.lang.Class<T> theClass)
-Returns a list of controllers or groups of a
- particular type.
- |
-
static CColor |
-getColor() |
-
ControlBroadcaster |
-getControlBroadcaster() |
-
Controller<?> |
-getController(java.lang.String theName) |
-
ControllerInterface<?>[] |
-getControllerList()
-Deprecated.
- |
-
ControlFont |
-getFont() |
-
ControllerGroup<?> |
-getGroup(java.lang.String theGroupName) |
-
java.util.List<ControllerInterface<?>> |
-getList() |
-
ControlListener |
-getListener(int theIndex) |
-
java.util.List<ControllerInterface<?>> |
-getMouseOverList()
-convenience method to check if the mouse (or pointer)
- is hovering over a specific controller.
- |
-
ControlWindow.Pointer |
-getPointer()
-convenience method to access the pointer of the main
- control window.
- |
-
Tab |
-getTab(ControlWindow theWindow,
- java.lang.String theName) |
-
Tab |
-getTab(java.lang.String theName) |
-
Tooltip |
-getTooltip() |
-
float |
-getValue(java.lang.String theIndex) |
-
ControlWindow |
-getWindow()
-convenience method to access the main window
- (ControlWindow class).
- |
-
ControlWindow |
-getWindow(processing.core.PApplet theApplet) |
-
void |
-hide()
-hide all controllers and tabs inside your sketch
- window.
- |
-
static int |
-i(java.lang.Object o) |
-
static int |
-i(java.lang.String o) |
-
static java.lang.Object |
-invoke(java.lang.Object theObject,
- java.lang.String theMember,
- java.lang.Object... theParams) |
-
boolean |
-isAutoDraw()
-check if the autoDraw function for the main window is
- enabled(true) or disabled(false).
- |
-
boolean |
-isMouseOver()
-convenience method to check if the mouse (or pointer)
- is hovering over any controller.
- |
-
boolean |
-isMouseOver(ControllerInterface<?> theController)
-convenience method to check if the mouse (or pointer)
- is hovering over a specific controller.
- |
-
boolean |
-isMoveable()
-Checks if controllers are generally moveable
- |
-
static boolean |
-isNumeric(java.lang.Object o) |
-
static boolean |
-isNumeric(java.lang.String str) |
-
boolean |
-isShortcuts() |
-
boolean |
-isUpdate()
-checks if automatic updates are enabled.
- |
-
boolean |
-isVisible()
-returns true or false according to the current
- visibility flag.
- |
-
void |
-keyEvent(processing.event.KeyEvent theKeyEvent) |
-
static long |
-l(java.lang.Object o) |
-
boolean |
-loadLayout(java.lang.String theFilePath) |
-
boolean |
-loadProperties()
-Loads properties from a default properties file and
- changes values of controllers accordingly.
- |
-
boolean |
-loadProperties(java.lang.String theFilePath)
-Loads properties from a properties file and changes
- the values of controllers accordingly, the filepath
- is given by parameter theFilePath.
- |
-
static java.util.logging.Logger |
-logger() |
-
void |
-mouseEvent(processing.event.MouseEvent theMouseEvent) |
-
void |
-move(java.lang.Object theObject,
- ControllerGroup<?> theGroup) |
-
void |
-moveControllersForObject(java.lang.Object theObject,
- ControllerGroup<?> theGroup) |
-
void |
-pre() |
-
void |
-printControllerMap() |
-
ControlP5 |
-register(ControllerInterface<?> theController) |
-
ControlP5 |
-register(java.lang.Object theObject,
- java.lang.String theIndex,
- ControllerInterface<?> theController)
-registers a Controller with ControlP5, a Controller
- should/must be registered with a unique name.
- |
-
void |
-remove(java.lang.String theName)
-removes a controlP5 element such as a controller,
- group, or tab by name.
- |
-
ControlP5 |
-removeCallback(CallbackListener... theListeners) |
-
ControlP5 |
-removeCallback(Controller<?>... theControllers) |
-
ControlP5 |
-removeCallback(Controller<?> theController) |
-
ControlP5 |
-removeCanvas(Canvas theCanvas) |
-
ControlP5 |
-removeListener(ControlListener... theListeners) |
-
ControlP5 |
-removeListener(ControlListener theListener) |
-
static java.lang.String |
-s(java.lang.Object o) |
-
static java.lang.String |
-s(java.lang.Object o,
- java.lang.String theDefault) |
-
static java.lang.String |
-s(java.lang.String o) |
-
void |
-saveLayout(java.lang.String theFilePath) |
-
boolean |
-saveProperties()
-Saves the current values of controllers into a
- default properties file
- |
-
boolean |
-saveProperties(java.lang.String theFilePath)
-Saves the current values of controllers into a file,
- the filepath is given by parameter theFilePath.
- |
-
boolean |
-saveProperties(java.lang.String theFilePath,
- java.lang.String... theSets) |
-
void |
-setAutoDraw(boolean theFlag)
-by default controlP5 draws any controller on top of
- any drawing done in the draw() function (this doesnt
- apply to P3D where controlP5.draw() has to be called
- manually in the sketch's draw() function ).
- |
-
void |
-setAutoInitialization(boolean theFlag)
-autoInitialization can be very handy when it comes to
- initializing values, e.g.
- |
-
ControlP5 |
-setBackground(int theColor) |
-
ControlP5 |
-setBroadcast(boolean theValue) |
-
ControlP5 |
-setColor(CColor theColor) |
-
ControlP5 |
-setColorActive(int theColor)
-sets the active state color of tabs and controllers,
- this cascades down to all known controllers.
- |
-
ControlP5 |
-setColorBackground(int theColor)
-sets the background color of tabs and controllers,
- this cascades down to all known controllers.
- |
-
ControlP5 |
-setColorCaptionLabel(int theColor)
-sets the label color of tabs and controllers, this
- cascades down to all known controllers.
- |
-
ControlP5 |
-setColorForeground(int theColor)
-sets the foreground color of tabs and controllers,
- this cascades down to all known controllers.
- |
-
ControlP5 |
-setColorValueLabel(int theColor)
-sets the value color of controllers, this cascades
- down to all known controllers.
- |
-
boolean |
-setFont(ControlFont theControlFont) |
-
boolean |
-setFont(int theBitFontIndex)
-Deprecated.
- |
-
boolean |
-setFont(processing.core.PFont thePFont) |
-
boolean |
-setFont(processing.core.PFont thePFont,
- int theFontSize) |
-
ControlP5 |
-setGraphics(processing.core.PApplet theApplet,
- int theX,
- int theY) |
-
ControlP5 |
-setGraphics(processing.core.PGraphics theGraphics,
- int theX,
- int theY) |
-
void |
-setMouseWheelRotation(int theRotation) |
-
ControlP5 |
-setMoveable(boolean theFlag)
-Enables/disables Controllers to be moved around when
- ALT-key is down and mouse is dragged.
- |
-
void |
-setTabEventsActive(boolean theFlag)
-By default event originating from tabs are disabled,
- use setTabEventsActive(true) to receive controlEvents
- when tabs are clicked.
- |
-
void |
-setTooltip(Tooltip theTooltip) |
-
void |
-setUpdate(boolean theFlag)
-changes the update behavior according to parameter
- theFlag
- |
-
ControlP5 |
-setVisible(boolean b) |
-
void |
-show()
-shows all controllers and tabs in your sketch.
- |
-
static java.util.List |
-toList(java.lang.Object o) |
-
static java.util.Map |
-toMap(java.lang.Object o) |
-
void |
-update()
-forces all controllers to update.
- |
-
java.lang.String |
-version()
-Returns the current version of controlP5
- |
-
addAccordion, addAccordion, addBang, addBang, addButton, addButton, addChart, addCheckBox, addCheckBox, addColorPicker, addColorPicker, addColorWheel, addColorWheel, addConsole, addControllersFor, addControllersFor, addFrameRate, addGroup, addGroup, addKnob, addKnob, addMatrix, addMatrix, addMultiList, addMultiList, addNumberbox, addNumberbox, addRadioButton, addRadioButton, addRange, addRange, addScrollableList, addScrollableList, addSlider, addSlider, addSlider2D, addSlider2D, addTab, addTextarea, addTextfield, addTextfield, addTextlabel, addToggle, addToggle, getDefaultTab, getKey, getKeyCode, getLayout, getObjectForController, getProperties, getPublicMethodsFor, getPublicMethodsFor, getPublicMethodsFor, getPublicMethodsFor, hide, isAltDown, isControlDown, isMetaDown, isShiftDown, listenTo, mapKeyFor, moveTo, printPublicMethodsFor, printPublicMethodsFor, remove, removeKeyFor, removeKeyFor, removeKeysFor, removeKeysFor, removeProperty, setAutoAddDirection, setAutoSpacing, setAutoSpacing, setAutoSpacing, setAutoSpacing, setColor, setPosition, show, stopListeningTo
addAccordion, addAccordion, addBang, addBang, addBang, addBang, addBoundingBox, addBoundingBox, addButton, addButton, addButton, addButton, addButton, addChart, addCheckBox, addCheckBox, addColorPicker, addColorPicker, addColorWheel, addColorWheel, addController, addController, addControlWindow, addControlWindow, addControlWindow, addControlWindow, addControlWindow, addDropdownList, addDropdownList, addDropdownList, addGroup, addGroup, addGroup, addGroup, addGroup, addGroup, addKnob, addKnob, addKnob, addKnob, addKnob, addKnob, addKnob, addListBox, addListBox, addListBox, addMatrix, addMatrix, addMultiList, addMultiList, addNumberbox, addNumberbox, addNumberbox, addNumberbox, addNumberbox, addRadio, addRadio, addRadioButton, addRadioButton, addRange, addRange, addRange, addRange, addScrollableList, addScrollableList, addScrollableList, addSlider, addSlider, addSlider, addSlider, addSlider, addSlider, addSlider, addSlider2D, addSlider2D, addSlider2D, addSlider2D, addTab, addTab, addTextarea, addTextfield, addTextfield, addTextfield, addTextlabel, addTextlabel, addTextlabel, addTextlabel, addToggle, addToggle, addToggle, addToggle, addToggle, addToggle, addToggle, addTooltip, getController, getTextlabel, getTextlabel
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
@Deprecated -public boolean blockDraw-
public ControlWindow controlWindow-
public static boolean DEBUG-
public static boolean isApplet-
public static final java.util.logging.Logger logger-
public processing.core.PApplet papplet-
public static final java.lang.String VERSION-
public ControlP5(processing.core.PApplet theParent)-
theParent
- PAppletpublic ControlP5(processing.core.PApplet theParent, - ControlFont theControlFont)-
public ControlP5(processing.core.PApplet theParent, - processing.core.PFont thePFont)-
public ControlP5 addCallback(CallbackListener... theListeners)-
CallbackEvent
,
-CallbackListener
public ControlP5 addCallback(CallbackListener theListener)-
CallbackEvent
,
-CallbackListener
public ControlP5 addCallback(CallbackListener theListener, - Controller<?>... theControllers)-
CallbackEvent
,
-CallbackListener
public ControlP5 addCanvas(Canvas theCanvas)-
Canvas
public void addControlsFor(java.lang.Object theObject)-
public ControlP5 addListener(ControlListener... theListeners)-
ControlListener
public void addPositionTo(int theX, - int theY, - ControllerInterface<?>... theControllers)-
public void addPositionTo(int theX, - int theY, - java.util.List<ControllerInterface<?>> theControllers)-
public static boolean b(java.lang.Object o)-
public ControllerGroup<?> begin()-
public ControllerGroup<?> begin(ControllerGroup<?> theGroup)-
public ControllerGroup<?> begin(ControllerGroup<?> theGroup, - int theX, - int theY)-
public ControllerGroup<?> begin(ControlWindow theWindow)-
public ControllerGroup<?> begin(ControlWindow theWindow, - int theX, - int theY)-
public ControllerGroup<?> begin(int theX, - int theY)-
public static double d(java.lang.Object o)-
public void disableShortcuts()-
public void dispose()-
public void draw()-
public void enableShortcuts()-
public ControllerGroup<?> end()-
public ControllerGroup<?> end(ControllerGroup<?> theGroup)-
public static float f(java.lang.Object o)-
public <C> C get(java.lang.Class<C> theClass, - java.lang.String theName)-
public ControllerInterface<?> get(java.lang.Object theObject, - java.lang.String theName)-
public ControllerInterface<?> get(java.lang.String theName)-
public java.util.List<ControllerInterface<?>> getAll()-
public <T> java.util.List<T> getAll(java.lang.Class<T> theClass)-
- List list = controlP5.getAll(Bang.class);
- println(list);
- for(Bang b:list) {
- b.setColorForeground(color(255,255,0));
- }
-
Here the foreground color of all Bangs
- is changed to yellow.T
- theClass
- A class that extends
- ControllerInterface, which applies to all
- Controllers and ControllerGroupspublic static CColor getColor()-
public ControlBroadcaster getControlBroadcaster()-
ControlBroadcaster
public Controller<?> getController(java.lang.String theName)-
@Deprecated -public ControllerInterface<?>[] getControllerList()-
getAll()
,
-getAll(Class)
public ControlFont getFont()-
public ControllerGroup<?> getGroup(java.lang.String theGroupName)-
public java.util.List<ControllerInterface<?>> getList()-
getAll(Class)
public ControlListener getListener(int theIndex)-
ControlListener
public java.util.List<ControllerInterface<?>> getMouseOverList()-
public ControlWindow.Pointer getPointer()-
public Tab getTab(ControlWindow theWindow, - java.lang.String theName)-
public Tab getTab(java.lang.String theName)-
public Tooltip getTooltip()-
public float getValue(java.lang.String theIndex)-
public ControlWindow getWindow()-
public ControlWindow getWindow(processing.core.PApplet theApplet)-
public void hide()-
show()
,
-isVisible()
public static int i(java.lang.Object o)-
public static int i(java.lang.String o)-
public static java.lang.Object invoke(java.lang.Object theObject, - java.lang.String theMember, - java.lang.Object... theParams)-
public boolean isAutoDraw()-
public boolean isMouseOver()-
public boolean isMouseOver(ControllerInterface<?> theController)-
public boolean isMoveable()-
public static boolean isNumeric(java.lang.Object o)-
public static boolean isNumeric(java.lang.String str)-
public boolean isShortcuts()-
public boolean isUpdate()-
update()
,
-setUpdate(boolean)
public boolean isVisible()-
public void keyEvent(processing.event.KeyEvent theKeyEvent)-
public static long l(java.lang.Object o)-
public boolean loadLayout(java.lang.String theFilePath)-
theFilePath
- public boolean loadProperties()-
ControllerProperties
public boolean loadProperties(java.lang.String theFilePath)-
theFilePath
- public static java.util.logging.Logger logger()-
public void mouseEvent(processing.event.MouseEvent theMouseEvent)-
public void move(java.lang.Object theObject, - ControllerGroup<?> theGroup)-
public void moveControllersForObject(java.lang.Object theObject, - ControllerGroup<?> theGroup)-
public void pre()-
public void printControllerMap()-
public ControlP5 register(ControllerInterface<?> theController)-
public ControlP5 register(java.lang.Object theObject, - java.lang.String theIndex, - ControllerInterface<?> theController)-
theController
- ControllerInterfacepublic void remove(java.lang.String theName)-
theString
- Stringpublic ControlP5 removeCallback(CallbackListener... theListeners)-
CallbackEvent
,
-CallbackListener
public ControlP5 removeCallback(Controller<?>... theControllers)-
CallbackEvent
,
-CallbackListener
public ControlP5 removeCallback(Controller<?> theController)-
CallbackEvent
,
-CallbackListener
public ControlP5 removeListener(ControlListener... theListeners)-
ControlListener
public ControlP5 removeListener(ControlListener theListener)-
ControlListener
public static java.lang.String s(java.lang.Object o)-
public static java.lang.String s(java.lang.Object o, - java.lang.String theDefault)-
public static java.lang.String s(java.lang.String o)-
public void saveLayout(java.lang.String theFilePath)-
theFilePath
- public boolean saveProperties()-
ControllerProperties
public boolean saveProperties(java.lang.String theFilePath)-
ControllerProperties
public boolean saveProperties(java.lang.String theFilePath, - java.lang.String... theSets)-
public void setAutoDraw(boolean theFlag)-
theFlag
- booleanpublic void setAutoInitialization(boolean theFlag)-
theFlag
- booleanpublic ControlP5 setBackground(int theColor)-
public ControlP5 setBroadcast(boolean theValue)-
public ControlP5 setColorActive(int theColor)-
public ControlP5 setColorBackground(int theColor)-
public ControlP5 setColorCaptionLabel(int theColor)-
public ControlP5 setColorForeground(int theColor)-
public ControlP5 setColorValueLabel(int theColor)-
public boolean setFont(ControlFont theControlFont)-
@Deprecated -public boolean setFont(int theBitFontIndex)-
public boolean setFont(processing.core.PFont thePFont)-
public boolean setFont(processing.core.PFont thePFont, - int theFontSize)-
public ControlP5 setGraphics(processing.core.PApplet theApplet, - int theX, - int theY)-
public ControlP5 setGraphics(processing.core.PGraphics theGraphics, - int theX, - int theY)-
public void setMouseWheelRotation(int theRotation)-
public ControlP5 setMoveable(boolean theFlag)-
public void setTabEventsActive(boolean theFlag)-
theFlag
- public void setTooltip(Tooltip theTooltip)-
public void setUpdate(boolean theFlag)-
theFlag
- update()
,
-isUpdate()
public ControlP5 setVisible(boolean b)-
public void show()-
isVisible()
,
-hide()
public static java.util.List toList(java.lang.Object o)-
public static java.util.Map toMap(java.lang.Object o)-
public void update()-
isUpdate()
,
-controlP5.ControlP5#setUpdate()
public java.lang.String version()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControlP5Base.html b/reference/controlP5/ControlP5Base.html deleted file mode 100644 index 3c8a79f..0000000 --- a/reference/controlP5/ControlP5Base.html +++ /dev/null @@ -1,1502 +0,0 @@ - - - - - -public class ControlP5Base -extends ControlP5Legacy -implements ControlP5Constants-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
ControlP5Base() |
-
Modifier and Type | -Method and Description | -
---|---|
Accordion |
-addAccordion(java.lang.Object theObject,
- java.lang.String theName) |
-
Accordion |
-addAccordion(java.lang.String theName) |
-
Bang |
-addBang(java.lang.Object theObject,
- java.lang.String theName) |
-
Bang |
-addBang(java.lang.String theName)
-Triggers an event without passing a value.
- |
-
Button |
-addButton(java.lang.Object theObject,
- java.lang.String theName) |
-
Button |
-addButton(java.lang.String theName)
-Triggers an event and passing a value.
- |
-
Chart |
-addChart(java.lang.String theName)
-adds chart support to display float array based data.
- |
-
CheckBox |
-addCheckBox(java.lang.Object theObject,
- java.lang.String theName) |
-
CheckBox |
-addCheckBox(java.lang.String theName)
-Use a checkbox for single choice options.
- |
-
ColorPicker |
-addColorPicker(java.lang.Object theObject,
- java.lang.String theName) |
-
ColorPicker |
-addColorPicker(java.lang.String theName)
-adds a simple RGBA colorpicker.
- |
-
ColorWheel |
-addColorWheel(java.lang.Object theObject,
- java.lang.String theName) |
-
ColorWheel |
-addColorWheel(java.lang.String theName) |
-
Println |
-addConsole(Textarea theTextarea) |
-
ControlP5Base |
-addControllersFor(processing.core.PApplet theApplet) |
-
ControlP5Base |
-addControllersFor(java.lang.String theAddressSpace,
- java.lang.Object t)
-Adds controllers for a specific object using
- annotations.
- |
-
FrameRate |
-addFrameRate()
-returns the current framerate of the running sketch.
- |
-
Group |
-addGroup(java.lang.Object theObject,
- java.lang.String theName) |
-
Group |
-addGroup(java.lang.String theName)
-A controller group can be used to group controllers
- for a better organization of single controllers.
- |
-
Knob |
-addKnob(java.lang.Object theObject,
- java.lang.String theName) |
-
Knob |
-addKnob(java.lang.String theName)
-Knobs can use limited and endless revolutions, custom
- angles and starting points.
- |
-
Matrix |
-addMatrix(java.lang.Object theObject,
- java.lang.String theName) |
-
Matrix |
-addMatrix(java.lang.String theName)
-Matrix is a 2-D matrix controller using toggle
- controllers in a rows and a columns setup.
- |
-
MultiList |
-addMultiList(java.lang.Object theObject,
- java.lang.String theName) |
-
MultiList |
-addMultiList(java.lang.String theName)
-Multilist is a tree like menu.
- |
-
Numberbox |
-addNumberbox(java.lang.Object theObject,
- java.lang.String theName) |
-
Numberbox |
-addNumberbox(java.lang.String theName) |
-
RadioButton |
-addRadioButton(java.lang.Object theObject,
- java.lang.String theName) |
-
RadioButton |
-addRadioButton(java.lang.String theName)
-Use radio buttons for multiple choice options.
- |
-
Range |
-addRange(java.lang.Object theObject,
- java.lang.String theName) |
-
Range |
-addRange(java.lang.String theName)
-A range controller, a slider that allows control on
- both ends of the slider.
- |
-
ScrollableList |
-addScrollableList(java.lang.Object theObject,
- java.lang.String theName) |
-
ScrollableList |
-addScrollableList(java.lang.String theName)
-the ScrollableList replaces the DropwdownList and
- ListBox, the type for a ScrollableList can be set
- with setType(ControlP5.DROPDOWN | ControlP5.LIST).
- |
-
Slider |
-addSlider(java.lang.Object theObject,
- java.lang.String theName) |
-
Slider |
-addSlider(java.lang.String theName)
-Adds a default slider with a default width of 100 and
- height of 10.
- |
-
Slider2D |
-addSlider2D(java.lang.Object theObject,
- java.lang.String theName) |
-
Slider2D |
-addSlider2D(java.lang.String theName)
-Adds a 2D slider to controlP5.
- |
-
Tab |
-addTab(java.lang.String theName) |
-
Textarea |
-addTextarea(java.lang.String theName)
-A Textarea is a label without any controller
- functionality and can be used to leave notes,
- headlines, etc when extending the dedicated area of
- the Textrea, a scrollbar is added on the right.
- |
-
Textfield |
-addTextfield(java.lang.Object theObject,
- java.lang.String theIndex) |
-
Textfield |
-addTextfield(java.lang.String theIndex)
-A Textfield allows single line text input.
- |
-
Textlabel |
-addTextlabel(java.lang.String theName) |
-
Toggle |
-addToggle(java.lang.Object theObject,
- java.lang.String theName)
-Toggles a boolean field or passes a value when
- triggered.
- |
-
Toggle |
-addToggle(java.lang.String theName) |
-
Tab |
-getDefaultTab() |
-
char |
-getKey() |
-
int |
-getKeyCode() |
-
controlP5.ControllerLayout |
-getLayout() |
-
java.lang.Object |
-getObjectForController(ControllerInterface theController) |
-
ControllerProperties |
-getProperties() |
-
static java.util.Set<java.lang.String> |
-getPublicMethodsFor(java.lang.Class<?> theClass) |
-
static java.util.Set<java.lang.String> |
-getPublicMethodsFor(java.lang.Class<?> theClass,
- boolean theFlag) |
-
static java.util.Set<java.lang.String> |
-getPublicMethodsFor(java.lang.Class<?> theClass,
- boolean isSuperclass,
- java.lang.String... thePattern) |
-
static java.util.Set<java.lang.String> |
-getPublicMethodsFor(java.lang.Class<?> theClass,
- java.lang.String... thePattern) |
-
ControlP5Base |
-hide(java.lang.Object theObject) |
-
boolean |
-isAltDown() |
-
boolean |
-isControlDown() |
-
boolean |
-isMetaDown() |
-
boolean |
-isShiftDown() |
-
ControlP5Base |
-listenTo(java.lang.String theFieldName,
- java.lang.Object theObject) |
-
ControlP5 |
-mapKeyFor(ControlKey theKey,
- java.lang.Object... os) |
-
ControlP5Base |
-moveTo(ControllerGroup<?> theController,
- java.lang.Object theObject) |
-
static void |
-printPublicMethodsFor(java.lang.Class<?> theClass) |
-
static void |
-printPublicMethodsFor(java.lang.Class<?> theClass,
- java.lang.String... thePattern)
-prints a list of public methods of requested class
- into the console.
- |
-
ControlP5Base |
-remove(java.lang.Object theObject)
-for internal use only.
- |
-
ControlP5 |
-removeKeyFor(ControlKey theKey,
- char... theChar) |
-
ControlP5 |
-removeKeyFor(ControlKey theKey,
- int... theChar) |
-
ControlP5 |
-removeKeysFor(char... theChar) |
-
ControlP5 |
-removeKeysFor(int... theChar) |
-
void |
-removeProperty(ControllerInterface<?> theController) |
-
void |
-setAutoAddDirection(int theDirection) |
-
void |
-setAutoSpacing() |
-
void |
-setAutoSpacing(float theX) |
-
void |
-setAutoSpacing(float theX,
- float theY) |
-
void |
-setAutoSpacing(float theX,
- float theY,
- float theZ) |
-
ControlP5Base |
-setColor(CColor theColor,
- java.lang.Object theObject) |
-
ControlP5Base |
-setPosition(int theX,
- int theY,
- java.lang.Object o) |
-
ControlP5Base |
-show(java.lang.Object theObject) |
-
ControlP5Base |
-stopListeningTo(java.lang.String theFieldName,
- java.lang.Object theObject) |
-
addAccordion, addAccordion, addBang, addBang, addBang, addBang, addBoundingBox, addBoundingBox, addButton, addButton, addButton, addButton, addButton, addChart, addCheckBox, addCheckBox, addColorPicker, addColorPicker, addColorWheel, addColorWheel, addController, addController, addControlWindow, addControlWindow, addControlWindow, addControlWindow, addControlWindow, addDropdownList, addDropdownList, addDropdownList, addGroup, addGroup, addGroup, addGroup, addGroup, addGroup, addKnob, addKnob, addKnob, addKnob, addKnob, addKnob, addKnob, addListBox, addListBox, addListBox, addMatrix, addMatrix, addMultiList, addMultiList, addNumberbox, addNumberbox, addNumberbox, addNumberbox, addNumberbox, addRadio, addRadio, addRadioButton, addRadioButton, addRange, addRange, addRange, addRange, addScrollableList, addScrollableList, addScrollableList, addSlider, addSlider, addSlider, addSlider, addSlider, addSlider, addSlider, addSlider2D, addSlider2D, addSlider2D, addSlider2D, addTab, addTab, addTextarea, addTextfield, addTextfield, addTextfield, addTextlabel, addTextlabel, addTextlabel, addTextlabel, addToggle, addToggle, addToggle, addToggle, addToggle, addToggle, addToggle, addTooltip, getController, getTextlabel, getTextlabel
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Accordion addAccordion(java.lang.Object theObject, - java.lang.String theName)-
public Accordion addAccordion(java.lang.String theName)-
public Bang addBang(java.lang.Object theObject, - java.lang.String theName)-
public Bang addBang(java.lang.String theName)-
public Button addButton(java.lang.Object theObject, - java.lang.String theName)-
public Button addButton(java.lang.String theName)-
public Chart addChart(java.lang.String theName)-
public CheckBox addCheckBox(java.lang.Object theObject, - java.lang.String theName)-
public CheckBox addCheckBox(java.lang.String theName)-
public ColorPicker addColorPicker(java.lang.Object theObject, - java.lang.String theName)-
public ColorPicker addColorPicker(java.lang.String theName)-
public ColorWheel addColorWheel(java.lang.Object theObject, - java.lang.String theName)-
public ColorWheel addColorWheel(java.lang.String theName)-
public ControlP5Base addControllersFor(processing.core.PApplet theApplet)-
public ControlP5Base addControllersFor(java.lang.String theAddressSpace, - java.lang.Object t)-
- Uses a forward slash delimited address, for example: -
-- lets say the theAddressSpace parameter is set to - "hello", and the Object (second parameter) contains - an annotated field "x", addControllersFor("hello", - o); will add a controller for field x with address - /hello/x This address can be used with - getController("/hello/x") to access the controller of - that particular Object and field. -
public FrameRate addFrameRate()-
public Group addGroup(java.lang.Object theObject, - java.lang.String theName)-
public Group addGroup(java.lang.String theName)-
public Knob addKnob(java.lang.Object theObject, - java.lang.String theName)-
public Knob addKnob(java.lang.String theName)-
public Matrix addMatrix(java.lang.Object theObject, - java.lang.String theName)-
public Matrix addMatrix(java.lang.String theName)-
public MultiList addMultiList(java.lang.Object theObject, - java.lang.String theName)-
public MultiList addMultiList(java.lang.String theName)-
public Numberbox addNumberbox(java.lang.Object theObject, - java.lang.String theName)-
public Numberbox addNumberbox(java.lang.String theName)-
public RadioButton addRadioButton(java.lang.Object theObject, - java.lang.String theName)-
public RadioButton addRadioButton(java.lang.String theName)-
public Range addRange(java.lang.Object theObject, - java.lang.String theName)-
public Range addRange(java.lang.String theName)-
public ScrollableList addScrollableList(java.lang.Object theObject, - java.lang.String theName)-
public ScrollableList addScrollableList(java.lang.String theName)-
public Slider addSlider(java.lang.Object theObject, - java.lang.String theName)-
public Slider addSlider(java.lang.String theName)-
public Slider2D addSlider2D(java.lang.Object theObject, - java.lang.String theName)-
public Slider2D addSlider2D(java.lang.String theName)-
public Tab addTab(java.lang.String theName)-
public Textarea addTextarea(java.lang.String theName)-
public Textfield addTextfield(java.lang.Object theObject, - java.lang.String theIndex)-
public Textfield addTextfield(java.lang.String theIndex)-
public Textlabel addTextlabel(java.lang.String theName)-
public Toggle addToggle(java.lang.Object theObject, - java.lang.String theName)-
public Toggle addToggle(java.lang.String theName)-
public Tab getDefaultTab()-
public char getKey()-
public int getKeyCode()-
public controlP5.ControllerLayout getLayout()-
public java.lang.Object getObjectForController(ControllerInterface theController)-
public ControllerProperties getProperties()-
public static java.util.Set<java.lang.String> getPublicMethodsFor(java.lang.Class<?> theClass)-
public static java.util.Set<java.lang.String> getPublicMethodsFor(java.lang.Class<?> theClass, - boolean theFlag)-
public static java.util.Set<java.lang.String> getPublicMethodsFor(java.lang.Class<?> theClass, - boolean isSuperclass, - java.lang.String... thePattern)-
public static java.util.Set<java.lang.String> getPublicMethodsFor(java.lang.Class<?> theClass, - java.lang.String... thePattern)-
public ControlP5Base hide(java.lang.Object theObject)-
public boolean isAltDown()-
public boolean isControlDown()-
public boolean isMetaDown()-
public boolean isShiftDown()-
public ControlP5Base listenTo(java.lang.String theFieldName, - java.lang.Object theObject)-
public ControlP5 mapKeyFor(ControlKey theKey, - java.lang.Object... os)-
public ControlP5Base moveTo(ControllerGroup<?> theController, - java.lang.Object theObject)-
public static void printPublicMethodsFor(java.lang.Class<?> theClass)-
public static void printPublicMethodsFor(java.lang.Class<?> theClass, - java.lang.String... thePattern)-
- printed Format: returnType methodName(parameter type)
public ControlP5Base remove(java.lang.Object theObject)-
theObject
- public ControlP5 removeKeyFor(ControlKey theKey, - char... theChar)-
public ControlP5 removeKeyFor(ControlKey theKey, - int... theChar)-
public ControlP5 removeKeysFor(char... theChar)-
public ControlP5 removeKeysFor(int... theChar)-
public void removeProperty(ControllerInterface<?> theController)-
public void setAutoAddDirection(int theDirection)-
public void setAutoSpacing()-
public void setAutoSpacing(float theX)-
public void setAutoSpacing(float theX, - float theY)-
public void setAutoSpacing(float theX, - float theY, - float theZ)-
public ControlP5Base setColor(CColor theColor, - java.lang.Object theObject)-
public ControlP5Base setPosition(int theX, - int theY, - java.lang.Object o)-
public ControlP5Base show(java.lang.Object theObject)-
public ControlP5Base stopListeningTo(java.lang.String theFieldName, - java.lang.Object theObject)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControlP5Constants.html b/reference/controlP5/ControlP5Constants.html deleted file mode 100644 index 7a3f47e..0000000 --- a/reference/controlP5/ControlP5Constants.html +++ /dev/null @@ -1,1975 +0,0 @@ - - - - - -public interface ControlP5Constants
-Modifier and Type | -Field and Description | -
---|---|
static java.lang.Class<?>[] |
-acceptClassList |
-
static int |
-ACTION_BROADCAST |
-
static int |
-ACTION_CLICK |
-
static int |
-ACTION_DRAG |
-
static int |
-ACTION_ENTER |
-
static int |
-ACTION_EXIT |
-
static int |
-ACTION_LEAVE |
-
static int |
-ACTION_MOVE |
-
static int |
-ACTION_PRESS |
-
static int |
-ACTION_PRESSED
-Deprecated.
- |
-
static int |
-ACTION_RELEASE |
-
static int |
-ACTION_RELEASED
-Deprecated.
- |
-
static int |
-ACTION_RELEASEDOUTSIDE |
-
static int |
-ACTION_WHEEL |
-
static int |
-ACTIVE |
-
static int |
-ALL
-Deprecated.
- |
-
static int |
-ALT |
-
static int |
-AQUA |
-
static int |
-ARC |
-
static int |
-ARRAY |
-
static int |
-BACKSPACE |
-
static int |
-BASELINE |
-
static int |
-BITFONT |
-
static int |
-BLACK |
-
static int |
-BLUE |
-
static int |
-BOOLEAN |
-
static int |
-BOTTOM |
-
static int |
-BOTTOM_OUTSIDE |
-
static int |
-CAPTIONLABEL |
-
static int |
-CENTER |
-
static int |
-CHECKBOX |
-
static int |
-COMMANDKEY |
-
static int |
-CONTROL |
-
static java.lang.Class<?> |
-controlEventClass |
-
static int |
-CUSTOM |
-
static char |
-DECREASE |
-
static int |
-DEFAULT |
-
static int |
-DELETE |
-
static int |
-DONE |
-
static int |
-DOWN |
-
static int |
-DROPDOWN |
-
static int |
-ELLIPSE |
-
static int |
-ENTER |
-
static int |
-ESCAPE |
-
static int |
-EVENT |
-
static java.lang.String |
-eventMethod |
-
static int |
-FADEIN |
-
static int |
-FADEOUT |
-
static int |
-FIELD |
-
static int |
-FLOAT |
-
static int |
-FUCHSIA |
-
static int |
-GRAY |
-
static int |
-GREEN |
-
static int |
-grixel |
-
static float |
-HALF_PI |
-
static char |
-HIDE |
-
static int |
-HIGHLIGHT |
-
static int |
-HORIZONTAL |
-
static int |
-IDLE |
-
static int |
-IMAGE |
-
static int |
-INACTIVE |
-
static char |
-INCREASE |
-
static int |
-INTEGER |
-
static int |
-INVALID |
-
static int |
-J2D |
-
static char |
-KEYCONTROL |
-
static int |
-LEFT |
-
static int |
-LEFT_OUTSIDE |
-
static int |
-LIME |
-
static int |
-LINE |
-
static int |
-LIST |
-
static char |
-LOAD |
-
static int |
-MAROON |
-
static char |
-MENU |
-
static int |
-METHOD |
-
static int |
-MOVE |
-
static int |
-MULTI |
-
static int |
-MULTIPLES |
-
static int |
-NAVY |
-
static int |
-OLIVE |
-
static int |
-ORANGE |
-
static int |
-OVER |
-
static int |
-P2D |
-
static int |
-P3D |
-
static float |
-PI |
-
static int |
-PRESSED |
-
static char |
-PRINT |
-
static int |
-PURPLE |
-
static int |
-RED |
-
static int |
-RELEASE |
-
static char |
-RESET |
-
static int |
-RIGHT |
-
static int |
-RIGHT_OUTSIDE |
-
static char |
-SAVE |
-
static int |
-SHIFT |
-
static int |
-SILVER |
-
static int |
-SINGLE |
-
static int |
-SINGLE_COLUMN |
-
static int |
-SINGLE_ROW |
-
static int |
-SPRITE |
-
static int |
-standard56 |
-
static int |
-standard58 |
-
static int |
-STRING |
-
static int |
-SWITCH |
-
static char |
-SWITCH_BACK |
-
static char |
-SWITCH_FORE |
-
static int |
-synt24 |
-
static int |
-TAB |
-
static int |
-TEAL |
-
static CColor |
-THEME_A |
-
static CColor |
-THEME_CP52014 |
-
static CColor |
-THEME_CP5BLUE |
-
static CColor |
-THEME_RED |
-
static CColor |
-THEME_RETRO |
-
static CColor |
-THEME_WHITE |
-
static int |
-TOP |
-
static int |
-TOP_OUTSIDE |
-
static int |
-TRANSITION_WAIT_FADEIN |
-
static int |
-TREE |
-
static float |
-TWO_PI |
-
static int |
-UP |
-
static int |
-VALUELABEL |
-
static boolean |
-VERBOSE |
-
static int |
-VERTICAL |
-
static int |
-WAIT |
-
static int |
-WHITE |
-
static int |
-YELLOW |
-
static final java.lang.Class<?>[] acceptClassList-
static final int ACTION_BROADCAST-
static final int ACTION_CLICK-
static final int ACTION_DRAG-
static final int ACTION_ENTER-
static final int ACTION_EXIT-
static final int ACTION_LEAVE-
static final int ACTION_MOVE-
static final int ACTION_PRESS-
@Deprecated -static final int ACTION_PRESSED-
static final int ACTION_RELEASE-
@Deprecated -static final int ACTION_RELEASED-
static final int ACTION_RELEASEDOUTSIDE-
static final int ACTION_WHEEL-
static final int ACTIVE-
@Deprecated -static final int ALL-
static final int ALT-
static final int AQUA-
static final int ARC-
static final int ARRAY-
static final int BACKSPACE-
static final int BASELINE-
static final int BITFONT-
static final int BLACK-
static final int BLUE-
static final int BOOLEAN-
static final int BOTTOM-
static final int BOTTOM_OUTSIDE-
static final int CAPTIONLABEL-
static final int CENTER-
static final int CHECKBOX-
static final int COMMANDKEY-
static final int CONTROL-
static final java.lang.Class<?> controlEventClass-
static final int CUSTOM-
static final char DECREASE-
static final int DEFAULT-
static final int DELETE-
static final int DONE-
static final int DOWN-
static final int DROPDOWN-
static final int ELLIPSE-
static final int ENTER-
static final int ESCAPE-
static final int EVENT-
static final java.lang.String eventMethod-
static final int FADEIN-
static final int FADEOUT-
static final int FIELD-
static final int FLOAT-
static final int FUCHSIA-
static final int GRAY-
static final int GREEN-
static final int grixel-
static final float HALF_PI-
static final char HIDE-
static final int HIGHLIGHT-
static final int HORIZONTAL-
static final int IDLE-
static final int IMAGE-
static final int INACTIVE-
static final char INCREASE-
static final int INTEGER-
static final int INVALID-
static final int J2D-
static final char KEYCONTROL-
static final int LEFT-
static final int LEFT_OUTSIDE-
static final int LIME-
static final int LINE-
static final int LIST-
static final char LOAD-
static final int MAROON-
static final char MENU-
static final int METHOD-
static final int MOVE-
static final int MULTI-
static final int MULTIPLES-
static final int NAVY-
static final int OLIVE-
static final int ORANGE-
static final int OVER-
static final int P2D-
static final int P3D-
static final float PI-
static final int PRESSED-
static final char PRINT-
static final int PURPLE-
static final int RED-
static final int RELEASE-
static final char RESET-
static final int RIGHT-
static final int RIGHT_OUTSIDE-
static final char SAVE-
static final int SHIFT-
static final int SILVER-
static final int SINGLE-
static final int SINGLE_COLUMN-
static final int SINGLE_ROW-
static final int SPRITE-
static final int standard56-
static final int standard58-
static final int STRING-
static final int SWITCH-
static final char SWITCH_BACK-
static final char SWITCH_FORE-
static final int synt24-
static final int TAB-
static final int TEAL-
static final CColor THEME_A-
static final CColor THEME_CP52014-
static final CColor THEME_CP5BLUE-
static final CColor THEME_RED-
static final CColor THEME_RETRO-
static final CColor THEME_WHITE-
static final int TOP-
static final int TOP_OUTSIDE-
static final int TRANSITION_WAIT_FADEIN-
static final int TREE-
static final float TWO_PI-
static final int UP-
static final int VALUELABEL-
static final boolean VERBOSE-
static final int VERTICAL-
static final int WAIT-
static final int WHITE-
static final int YELLOW-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControlP5Legacy.html b/reference/controlP5/ControlP5Legacy.html deleted file mode 100644 index a587257..0000000 --- a/reference/controlP5/ControlP5Legacy.html +++ /dev/null @@ -1,2411 +0,0 @@ - - - - - -public class ControlP5Legacy
-extends java.lang.Object
-Constructor and Description | -
---|
ControlP5Legacy() |
-
Modifier and Type | -Method and Description | -
---|---|
Accordion |
-addAccordion(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName) |
-
Accordion |
-addAccordion(java.lang.String theName,
- int theX,
- int theY,
- int theWidth) |
-
Bang |
-addBang(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName) |
-
Bang |
-addBang(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
Bang |
-addBang(java.lang.String theName,
- int theX,
- int theY)
-Deprecated.
- |
-
Bang |
-addBang(java.lang.String theName,
- int theX,
- int theY,
- int theWidth,
- int theHeight)
-Deprecated.
- |
-
BoundingBox |
-addBoundingBox(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theX,
- int theY,
- int theW,
- int theH) |
-
BoundingBox |
-addBoundingBox(java.lang.String theName) |
-
Button |
-addButton(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName) |
-
Button |
-addButton(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- float theValue) |
-
Button |
-addButton(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- float theValue,
- int theX,
- int theY,
- int theW,
- int theH) |
-
Button |
-addButton(java.lang.String theName,
- float theValue) |
-
Button |
-addButton(java.lang.String theName,
- float theValue,
- int theX,
- int theY,
- int theW,
- int theH)
-Deprecated.
- |
-
Chart |
-addChart(java.lang.String theName,
- int theX,
- int theY,
- int theW,
- int theH) |
-
CheckBox |
-addCheckBox(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theX,
- int theY) |
-
CheckBox |
-addCheckBox(java.lang.String theName,
- int theX,
- int theY) |
-
ColorPicker |
-addColorPicker(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theX,
- int theY,
- int theW,
- int theH) |
-
ColorPicker |
-addColorPicker(java.lang.String theName,
- int theX,
- int theY,
- int theW,
- int theH) |
-
ColorWheel |
-addColorWheel(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theX,
- int theY,
- int theW) |
-
ColorWheel |
-addColorWheel(java.lang.String theName,
- int theX,
- int theY,
- int theW) |
-
<C> C |
-addController(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- java.lang.Class<C> theClass,
- int theX,
- int theY)
-Adds Controllers by Object reference, currently
- supports Slider, Bang, Button, Knob, Numberbox,
- Toggle, Textlabel, Textfield, Range, Slider2D.
- |
-
<C> C |
-addController(java.lang.String theName,
- java.lang.Class<C> theClass,
- int theX,
- int theY) |
-
ControlWindow |
-addControlWindow(java.lang.String theName) |
-
ControlWindow |
-addControlWindow(java.lang.String theWindowName,
- int theWidth,
- int theHeight)
-Deprecated.
- |
-
ControlWindow |
-addControlWindow(java.lang.String theWindowName,
- int theX,
- int theY,
- int theWidth,
- int theHeight)
-Deprecated.
- |
-
ControlWindow |
-addControlWindow(java.lang.String theWindowName,
- int theX,
- int theY,
- int theWidth,
- int theHeight,
- int theFrameRate)
-Deprecated.
- |
-
ControlWindow |
-addControlWindow(java.lang.String theName,
- int theX,
- int theY,
- int theWidth,
- int theHeight,
- java.lang.String theRenderer,
- int theFrameRate)
-Deprecated.
- |
-
DropdownList |
-addDropdownList(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theX,
- int theY,
- int theW,
- int theH) |
-
DropdownList |
-addDropdownList(java.lang.String theName) |
-
DropdownList |
-addDropdownList(java.lang.String theName,
- int theX,
- int theY,
- int theW,
- int theH) |
-
Group |
-addGroup(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName) |
-
<C> C |
-addGroup(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- java.lang.Class<C> theClass,
- int theX,
- int theY,
- int theW,
- int theH)
-Use with caution, only for internal use.
- |
-
Group |
-addGroup(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theX,
- int theY) |
-
Group |
-addGroup(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theX,
- int theY,
- int theW) |
-
Group |
-addGroup(java.lang.String theName,
- int theX,
- int theY) |
-
Group |
-addGroup(java.lang.String theName,
- int theX,
- int theY,
- int theW) |
-
Knob |
-addKnob(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName) |
-
Knob |
-addKnob(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- float theMin,
- float theMax,
- float theDefaultValue,
- int theX,
- int theY,
- int theDiameter) |
-
Knob |
-addKnob(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- float theMin,
- float theMax,
- int theX,
- int theY,
- int theDiameter) |
-
Knob |
-addKnob(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theMin,
- int theMax) |
-
Knob |
-addKnob(java.lang.String theName,
- float theMin,
- float theMax,
- float theDefaultValue,
- int theX,
- int theY,
- int theDiameter) |
-
Knob |
-addKnob(java.lang.String theName,
- float theMin,
- float theMax,
- int theX,
- int theY,
- int theDiameter) |
-
Knob |
-addKnob(java.lang.String theName,
- int theMin,
- int theMax) |
-
ListBox |
-addListBox(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theX,
- int theY,
- int theW,
- int theH) |
-
ListBox |
-addListBox(java.lang.String theName)
-A list box is a list of items a user can choose from.
- |
-
ListBox |
-addListBox(java.lang.String theName,
- int theX,
- int theY,
- int theW,
- int theH) |
-
Matrix |
-addMatrix(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theCellX,
- int theCellY,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
Matrix |
-addMatrix(java.lang.String theName,
- int theCellX,
- int theCellY,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
MultiList |
-addMultiList(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
MultiList |
-addMultiList(java.lang.String theName,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
Numberbox |
-addNumberbox(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName) |
-
Numberbox |
-addNumberbox(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- float theDefaultValue,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
Numberbox |
-addNumberbox(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
Numberbox |
-addNumberbox(java.lang.String theName,
- float theDefaultValue,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
Numberbox |
-addNumberbox(java.lang.String theName,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
RadioButton |
-addRadio(java.lang.String theName)
-Use radio buttons for multiple choice options.
- |
-
RadioButton |
-addRadio(java.lang.String theName,
- int theX,
- int theY) |
-
RadioButton |
-addRadioButton(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theX,
- int theY) |
-
RadioButton |
-addRadioButton(java.lang.String theName,
- int theX,
- int theY) |
-
Range |
-addRange(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- float theMin,
- float theMax,
- float theDefaultMinValue,
- float theDefaultMaxValue,
- int theX,
- int theY,
- int theW,
- int theH) |
-
Range |
-addRange(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- float theMin,
- float theMax,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
Range |
-addRange(java.lang.String theName,
- float theMin,
- float theMax,
- float theDefaultMinValue,
- float theDefaultMaxValue,
- int theX,
- int theY,
- int theW,
- int theH) |
-
Range |
-addRange(java.lang.String theName,
- float theMin,
- float theMax,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
ScrollableList |
-addScrollableList(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName) |
-
ScrollableList |
-addScrollableList(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theX,
- int theY,
- int theW,
- int theH) |
-
ScrollableList |
-addScrollableList(java.lang.String theName,
- int theX,
- int theY,
- int theW,
- int theH) |
-
Slider |
-addSlider(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName) |
-
Slider |
-addSlider(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- float theMin,
- float theMax) |
-
Slider |
-addSlider(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- float theMin,
- float theMax,
- float theDefaultValue,
- int theX,
- int theY,
- int theW,
- int theH) |
-
Slider |
-addSlider(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- float theMin,
- float theMax,
- int theX,
- int theY,
- int theW,
- int theH) |
-
Slider |
-addSlider(java.lang.String theName,
- float theMin,
- float theMax) |
-
Slider |
-addSlider(java.lang.String theName,
- float theMin,
- float theMax,
- float theDefaultValue,
- int theX,
- int theY,
- int theW,
- int theH) |
-
Slider |
-addSlider(java.lang.String theName,
- float theMin,
- float theMax,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
Slider2D |
-addSlider2D(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- float theMinX,
- float theMaxX,
- float theMinY,
- float theMaxY,
- float theDefaultValueX,
- float theDefaultValueY,
- int theX,
- int theY,
- int theW,
- int theH) |
-
Slider2D |
-addSlider2D(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theX,
- int theY,
- int theW,
- int theH)
-Deprecated.
- |
-
Slider2D |
-addSlider2D(java.lang.String theName,
- float theMinX,
- float theMaxX,
- float theMinY,
- float theMaxY,
- float theDefaultValueX,
- float theDefaultValueY,
- int theX,
- int theY,
- int theW,
- int theH)
-Deprecated.
- |
-
Slider2D |
-addSlider2D(java.lang.String theName,
- int theX,
- int theY,
- int theW,
- int theH)
-Deprecated.
- |
-
Tab |
-addTab(ControlWindow theWindow,
- java.lang.String theName)
-Deprecated.
- |
-
Tab |
-addTab(processing.core.PApplet theWindow,
- java.lang.String theName)
-Deprecated.
- |
-
Textarea |
-addTextarea(java.lang.String theName,
- java.lang.String theText,
- int theX,
- int theY,
- int theW,
- int theH) |
-
Textfield |
-addTextfield(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName) |
-
Textfield |
-addTextfield(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- int theX,
- int theY,
- int theW,
- int theH) |
-
Textfield |
-addTextfield(java.lang.String theName,
- int theX,
- int theY,
- int theW,
- int theH) |
-
Textlabel |
-addTextlabel(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- java.lang.String theText) |
-
Textlabel |
-addTextlabel(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- java.lang.String theText,
- int theX,
- int theY) |
-
Textlabel |
-addTextlabel(java.lang.String theName,
- java.lang.String theText) |
-
Textlabel |
-addTextlabel(java.lang.String theName,
- java.lang.String theText,
- int theX,
- int theY) |
-
Toggle |
-addToggle(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName) |
-
Toggle |
-addToggle(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- boolean theValue) |
-
Toggle |
-addToggle(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- boolean theDefaultValue,
- float theX,
- float theY,
- int theWidth,
- int theHeight) |
-
Toggle |
-addToggle(java.lang.Object theObject,
- java.lang.String theIndex,
- java.lang.String theName,
- float theX,
- float theY,
- int theWidth,
- int theHeight)
-Deprecated.
- |
-
Toggle |
-addToggle(java.lang.String theName,
- boolean theValue) |
-
Toggle |
-addToggle(java.lang.String theName,
- boolean theDefaultValue,
- float theX,
- float theY,
- int theWidth,
- int theHeight)
-Deprecated.
- |
-
Toggle |
-addToggle(java.lang.String theName,
- float theX,
- float theY,
- int theWidth,
- int theHeight)
-Deprecated.
- |
-
Tooltip |
-addTooltip() |
-
Controller<?> |
-getController(java.lang.String theName,
- java.lang.Object theObject)
-Deprecated.
- |
-
Textlabel |
-getTextlabel() |
-
Textlabel |
-getTextlabel(java.lang.String theText,
- int theX,
- int theY) |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Accordion addAccordion(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName)-
public Accordion addAccordion(java.lang.String theName, - int theX, - int theY, - int theWidth)-
public Bang addBang(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName)-
public Bang addBang(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theX, - int theY, - int theWidth, - int theHeight)-
@Deprecated -public Bang addBang(java.lang.String theName, - int theX, - int theY)-
@Deprecated -public Bang addBang(java.lang.String theName, - int theX, - int theY, - int theWidth, - int theHeight)-
public BoundingBox addBoundingBox(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theX, - int theY, - int theW, - int theH)-
public BoundingBox addBoundingBox(java.lang.String theName)-
public Button addButton(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName)-
public Button addButton(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - float theValue)-
public Button addButton(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - float theValue, - int theX, - int theY, - int theW, - int theH)-
public Button addButton(java.lang.String theName, - float theValue)-
@Deprecated -public Button addButton(java.lang.String theName, - float theValue, - int theX, - int theY, - int theW, - int theH)-
public Chart addChart(java.lang.String theName, - int theX, - int theY, - int theW, - int theH)-
public CheckBox addCheckBox(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theX, - int theY)-
public CheckBox addCheckBox(java.lang.String theName, - int theX, - int theY)-
public ColorPicker addColorPicker(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theX, - int theY, - int theW, - int theH)-
public ColorPicker addColorPicker(java.lang.String theName, - int theX, - int theY, - int theW, - int theH)-
public ColorWheel addColorWheel(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theX, - int theY, - int theW)-
public ColorWheel addColorWheel(java.lang.String theName, - int theX, - int theY, - int theW)-
public <C> C addController(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - java.lang.Class<C> theClass, - int theX, - int theY)-
public <C> C addController(java.lang.String theName, - java.lang.Class<C> theClass, - int theX, - int theY)-
public ControlWindow addControlWindow(java.lang.String theName)-
@Deprecated -public ControlWindow addControlWindow(java.lang.String theWindowName, - int theWidth, - int theHeight)-
@Deprecated -public ControlWindow addControlWindow(java.lang.String theWindowName, - int theX, - int theY, - int theWidth, - int theHeight)-
@Deprecated -public ControlWindow addControlWindow(java.lang.String theWindowName, - int theX, - int theY, - int theWidth, - int theHeight, - int theFrameRate)-
@Deprecated -public ControlWindow addControlWindow(java.lang.String theName, - int theX, - int theY, - int theWidth, - int theHeight, - java.lang.String theRenderer, - int theFrameRate)-
public DropdownList addDropdownList(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theX, - int theY, - int theW, - int theH)-
public DropdownList addDropdownList(java.lang.String theName)-
public DropdownList addDropdownList(java.lang.String theName, - int theX, - int theY, - int theW, - int theH)-
public Group addGroup(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName)-
public <C> C addGroup(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - java.lang.Class<C> theClass, - int theX, - int theY, - int theW, - int theH)-
public Group addGroup(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theX, - int theY)-
public Group addGroup(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theX, - int theY, - int theW)-
public Group addGroup(java.lang.String theName, - int theX, - int theY)-
public Group addGroup(java.lang.String theName, - int theX, - int theY, - int theW)-
public Knob addKnob(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName)-
public Knob addKnob(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - float theMin, - float theMax, - float theDefaultValue, - int theX, - int theY, - int theDiameter)-
public Knob addKnob(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - float theMin, - float theMax, - int theX, - int theY, - int theDiameter)-
public Knob addKnob(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theMin, - int theMax)-
public Knob addKnob(java.lang.String theName, - float theMin, - float theMax, - float theDefaultValue, - int theX, - int theY, - int theDiameter)-
public Knob addKnob(java.lang.String theName, - float theMin, - float theMax, - int theX, - int theY, - int theDiameter)-
public Knob addKnob(java.lang.String theName, - int theMin, - int theMax)-
public ListBox addListBox(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theX, - int theY, - int theW, - int theH)-
public ListBox addListBox(java.lang.String theName)-
public ListBox addListBox(java.lang.String theName, - int theX, - int theY, - int theW, - int theH)-
public Matrix addMatrix(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theCellX, - int theCellY, - int theX, - int theY, - int theWidth, - int theHeight)-
public Matrix addMatrix(java.lang.String theName, - int theCellX, - int theCellY, - int theX, - int theY, - int theWidth, - int theHeight)-
public MultiList addMultiList(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theX, - int theY, - int theWidth, - int theHeight)-
public MultiList addMultiList(java.lang.String theName, - int theX, - int theY, - int theWidth, - int theHeight)-
public Numberbox addNumberbox(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName)-
public Numberbox addNumberbox(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - float theDefaultValue, - int theX, - int theY, - int theWidth, - int theHeight)-
public Numberbox addNumberbox(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theX, - int theY, - int theWidth, - int theHeight)-
public Numberbox addNumberbox(java.lang.String theName, - float theDefaultValue, - int theX, - int theY, - int theWidth, - int theHeight)-
public Numberbox addNumberbox(java.lang.String theName, - int theX, - int theY, - int theWidth, - int theHeight)-
public RadioButton addRadio(java.lang.String theName)-
public RadioButton addRadio(java.lang.String theName, - int theX, - int theY)-
public RadioButton addRadioButton(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theX, - int theY)-
public RadioButton addRadioButton(java.lang.String theName, - int theX, - int theY)-
public Range addRange(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - float theMin, - float theMax, - float theDefaultMinValue, - float theDefaultMaxValue, - int theX, - int theY, - int theW, - int theH)-
public Range addRange(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - float theMin, - float theMax, - int theX, - int theY, - int theWidth, - int theHeight)-
public Range addRange(java.lang.String theName, - float theMin, - float theMax, - float theDefaultMinValue, - float theDefaultMaxValue, - int theX, - int theY, - int theW, - int theH)-
public Range addRange(java.lang.String theName, - float theMin, - float theMax, - int theX, - int theY, - int theWidth, - int theHeight)-
public ScrollableList addScrollableList(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName)-
public ScrollableList addScrollableList(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theX, - int theY, - int theW, - int theH)-
public ScrollableList addScrollableList(java.lang.String theName, - int theX, - int theY, - int theW, - int theH)-
public Slider addSlider(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName)-
public Slider addSlider(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - float theMin, - float theMax)-
public Slider addSlider(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - float theMin, - float theMax, - float theDefaultValue, - int theX, - int theY, - int theW, - int theH)-
public Slider addSlider(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - float theMin, - float theMax, - int theX, - int theY, - int theW, - int theH)-
public Slider addSlider(java.lang.String theName, - float theMin, - float theMax)-
public Slider addSlider(java.lang.String theName, - float theMin, - float theMax, - float theDefaultValue, - int theX, - int theY, - int theW, - int theH)-
public Slider addSlider(java.lang.String theName, - float theMin, - float theMax, - int theX, - int theY, - int theWidth, - int theHeight)-
public Slider2D addSlider2D(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - float theMinX, - float theMaxX, - float theMinY, - float theMaxY, - float theDefaultValueX, - float theDefaultValueY, - int theX, - int theY, - int theW, - int theH)-
@Deprecated -public Slider2D addSlider2D(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theX, - int theY, - int theW, - int theH)-
@Deprecated -public Slider2D addSlider2D(java.lang.String theName, - float theMinX, - float theMaxX, - float theMinY, - float theMaxY, - float theDefaultValueX, - float theDefaultValueY, - int theX, - int theY, - int theW, - int theH)-
@Deprecated -public Slider2D addSlider2D(java.lang.String theName, - int theX, - int theY, - int theW, - int theH)-
@Deprecated -public Tab addTab(ControlWindow theWindow, - java.lang.String theName)-
@Deprecated -public Tab addTab(processing.core.PApplet theWindow, - java.lang.String theName)-
public Textarea addTextarea(java.lang.String theName, - java.lang.String theText, - int theX, - int theY, - int theW, - int theH)-
public Textfield addTextfield(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName)-
public Textfield addTextfield(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - int theX, - int theY, - int theW, - int theH)-
public Textfield addTextfield(java.lang.String theName, - int theX, - int theY, - int theW, - int theH)-
public Textlabel addTextlabel(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - java.lang.String theText)-
public Textlabel addTextlabel(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - java.lang.String theText, - int theX, - int theY)-
public Textlabel addTextlabel(java.lang.String theName, - java.lang.String theText)-
public Textlabel addTextlabel(java.lang.String theName, - java.lang.String theText, - int theX, - int theY)-
public Toggle addToggle(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName)-
public Toggle addToggle(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - boolean theValue)-
public Toggle addToggle(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - boolean theDefaultValue, - float theX, - float theY, - int theWidth, - int theHeight)-
@Deprecated -public Toggle addToggle(java.lang.Object theObject, - java.lang.String theIndex, - java.lang.String theName, - float theX, - float theY, - int theWidth, - int theHeight)-
public Toggle addToggle(java.lang.String theName, - boolean theValue)-
@Deprecated -public Toggle addToggle(java.lang.String theName, - boolean theDefaultValue, - float theX, - float theY, - int theWidth, - int theHeight)-
@Deprecated -public Toggle addToggle(java.lang.String theName, - float theX, - float theY, - int theWidth, - int theHeight)-
public Tooltip addTooltip()-
@Deprecated -public Controller<?> getController(java.lang.String theName, - java.lang.Object theObject)-
public Textlabel getTextlabel()-
public Textlabel getTextlabel(java.lang.String theText, - int theX, - int theY)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControlTimer.html b/reference/controlP5/ControlTimer.html deleted file mode 100644 index fb66048..0000000 --- a/reference/controlP5/ControlTimer.html +++ /dev/null @@ -1,446 +0,0 @@ - - - - - -public class ControlTimer
-extends java.lang.Object
-/**
- * ControlP5 Timer
- * by andreas schlegel, 2009
- */
-
-import controlP5.*;
-
-ControlP5 cp5;
-ControlTimer c;
-Textlabel t;
-
-void setup() {
- size(400,400);
- frameRate(30);
- cp5 = new ControlP5(this);
- c = new ControlTimer();
- t = new Textlabel(cp5,"--",100,100);
- c.setSpeedOfTime(1);
-}
-
-
-void draw() {
- background(0);
- t.setValue(c.toString());
- t.draw(this);
- t.setPosition(mouseX, mouseY);
-}
-
-
-void mousePressed() {
- c.reset();
-}
-
Constructor and Description | -
---|
ControlTimer()
-create a new control timer, a timer that counts up in time.
- |
-
Modifier and Type | -Method and Description | -
---|---|
int |
-day()
-day position of the timer.
- |
-
int |
-hour()
-Hour position of the timer in international format (0-23).
- |
-
int |
-millis()
-Get the milliseconds of the timer.
- |
-
int |
-minute()
-Minutes position of the timer.
- |
-
void |
-reset()
-reset the timer.
- |
-
int |
-second()
-Seconds position of the timer.
- |
-
void |
-setSpeedOfTime(float theSpeed)
-set the speed of time, for slow motion or high speed.
- |
-
long |
-time()
-get the time in milliseconds since the timer was started.
- |
-
java.lang.String |
-toString()
-return a string representation of the current status of the timer.
- |
-
void |
-update()
-called to update the timer.
- |
-
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public ControlTimer()-
public int day()-
public int hour()-
public int millis()-
public int minute()-
public void reset()-
public int second()-
public void setSpeedOfTime(float theSpeed)-
theSpeed
- intpublic long time()-
public java.lang.String toString()-
toString
in class java.lang.Object
public void update()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControlWindow.Pointer.html b/reference/controlP5/ControlWindow.Pointer.html deleted file mode 100644 index cf11aea..0000000 --- a/reference/controlP5/ControlWindow.Pointer.html +++ /dev/null @@ -1,430 +0,0 @@ - - - - - -public class ControlWindow.Pointer
-extends java.lang.Object
-ControlWindow.getPointer()
.
- Then use
- controlP5.ControlWindow#set(int, int)
to
- alter its position or invoke {
- controlP5.ControlWindow#pressed()
or
- controlP5.ControlWindow#released()
to change
- its state. To disable the mouse and enable the
- Pointer use controlP5.ControlWindow#enable()
- and controlP5.ControlWindow#disable()
to
- default back to the mouse as input parameter.Constructor and Description | -
---|
ControlWindow.Pointer() |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-disable() |
-
void |
-enable() |
-
int |
-getPreviousX() |
-
int |
-getPreviousY() |
-
int |
-getX() |
-
int |
-getY() |
-
boolean |
-isEnabled() |
-
ControlWindow.Pointer |
-pressed() |
-
ControlWindow.Pointer |
-released() |
-
ControlWindow.Pointer |
-set(int theX,
- int theY) |
-
ControlWindow.Pointer |
-set(int theX,
- int theY,
- boolean pressed) |
-
ControlWindow.Pointer |
-setX(int theX) |
-
ControlWindow.Pointer |
-setY(int theY) |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void disable()-
public void enable()-
public int getPreviousX()-
public int getPreviousY()-
public int getX()-
public int getY()-
public boolean isEnabled()-
public ControlWindow.Pointer pressed()-
public ControlWindow.Pointer released()-
public ControlWindow.Pointer set(int theX, - int theY)-
public ControlWindow.Pointer set(int theX, - int theY, - boolean pressed)-
public ControlWindow.Pointer setX(int theX)-
public ControlWindow.Pointer setY(int theY)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControlWindow.html b/reference/controlP5/ControlWindow.html deleted file mode 100644 index 2f1dfaf..0000000 --- a/reference/controlP5/ControlWindow.html +++ /dev/null @@ -1,1286 +0,0 @@ - - - - - -public final class ControlWindow
-extends java.lang.Object
-/**
- * ControlP5 ControlWindow
- * by andreas schlegel, 2012
- */
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-int myColorBackground = color(0, 0, 0);
-
-ControlWindow controlWindow;
-
-public int sliderValue = 40;
-
-void setup() {
- size(700, 400);
-
- cp5 = new ControlP5(this);
-
-
-// PLEASE READ
-//
-// With controlP5 2.0 the ControlWindow has been removed,
-// please see the changelog.txt for details.
-// Instead, see the extra/ControlP5frame example for
-// a ControlWindow alternative.
-
-
-
-
-
-
-
-
-
-
-
-// controlWindow = cp5.addControlWindow("controlP5window", 100, 100, 400, 200)
-// .hideCoordinates()
-// .setBackground(color(40))
-// ;
-
- cp5.addSlider("sliderValue")
- .setRange(0, 255)
- .setPosition(40, 40)
- .setSize(200, 29)
- //.moveTo(controlWindow)
- ;
-}
-
-
-void draw() {
- background(sliderValue);
-}
-
-void myTextfield(String theValue) {
- println(theValue);
-}
-
-void myWindowTextfield(String theValue) {
- println("from controlWindow: "+theValue);
-}
-
-void keyPressed() {
- // if (key==',') cp5.window("controlP5window").hide();
- // if (key=='.') cp5.window("controlP5window").show();
- // controlWindow = controlP5.addControlWindow("controlP5window2",600,100,400,200);
- // controlP5.controller("sliderValue1").moveTo(controlWindow);
-
- // if (key=='d') {
- // if (controlWindow.isUndecorated()) {
- // controlWindow.setUndecorated(false);
- // } else {
- // controlWindow.setUndecorated(true);
- // }
- // }
- // if (key=='t') {
- // controlWindow.toggleUndecorated();
- // }
-}
-
-
Modifier and Type | -Class and Description | -
---|---|
class |
-ControlWindow.Pointer
-A pointer by default is linked to the mouse and
- stores the x and y position as well as the pressed
- and released state.
- |
-
Modifier and Type | -Field and Description | -
---|---|
int |
-background |
-
Constructor and Description | -
---|
ControlWindow(ControlP5 theControlP5,
- processing.core.PApplet theApplet) |
-
Modifier and Type | -Method and Description | -
---|---|
ControlWindow |
-activateTab(java.lang.String theTab) |
-
Tab |
-add(Tab theTab) |
-
ControlWindow |
-addCanvas(Canvas theCanvas) |
-
Tab |
-addTab(java.lang.String theTab) |
-
ControlWindow |
-clear()
-clear the control window, delete all controllers from
- a control window.
- |
-
void |
-clearKeys() |
-
ControlWindow |
-disableMouseWheel()
-Deprecated.
- |
-
ControlWindow |
-disablePointer() |
-
void |
-draw() |
-
void |
-draw(processing.core.PGraphics pg) |
-
void |
-draw(processing.core.PGraphics pg,
- int theX,
- int theY) |
-
ControlWindow |
-enableMouseWheel()
-Deprecated.
- |
-
ControlWindow |
-enablePointer() |
-
ControlWindow |
-frameRate(int theFrameRate)
-sets the frame rate of the control window.
- |
-
Tab |
-getCurrentTab() |
-
ControllerInterface<?> |
-getFirstFromMouseOverList() |
-
java.util.List<ControllerInterface<?>> |
-getMouseOverList()
-A list of controllers that are registered with a
- mouseover.
- |
-
ControlWindow.Pointer |
-getPointer() |
-
processing.core.PVector |
-getPositionOfTabs()
-Returns the position of the tab bar as PVector.
- |
-
Tab |
-getTab(java.lang.String theTabName) |
-
ControllerList |
-getTabs() |
-
void |
-handleKeyEvent(processing.event.KeyEvent theKeyEvent) |
-
ControlWindow |
-hide()
-hide the controllers and tabs of the ControlWindow.
- |
-
boolean |
-isDrawBackground() |
-
boolean |
-isMouseOver()
-returns true if the mouse is inside a controller.
- |
-
boolean |
-isMouseOver(ControllerInterface<?> theController) |
-
boolean |
-isMousePressed() |
-
boolean |
-isMouseWheel()
-Deprecated.
- |
-
boolean |
-isUndecorated() |
-
boolean |
-isUpdate()
-check the update status of a control window.
- |
-
boolean |
-isVisible() |
-
void |
-keyEvent(processing.event.KeyEvent theKeyEvent) |
-
void |
-mouseEvent(int theX,
- int theY,
- boolean pressed)
-when in Android mode, call mouseEvent(int, int,
- boolean).
- |
-
void |
-mouseEvent(processing.event.MouseEvent theMouseEvent) |
-
java.lang.String |
-name()
-returns the name of the control window.
- |
-
processing.core.PApplet |
-papplet()
-get the papplet instance of the ControlWindow.
- |
-
ControlWindow |
-pre() |
-
void |
-remove() |
-
ControlWindow |
-removeCanvas(Canvas theCanvas) |
-
ControlWindow |
-removeMouseOverFor(ControllerInterface<?> theController) |
-
ControlWindow |
-removeTab(Tab theTab) |
-
void |
-resetMouseOver() |
-
ControlWindow |
-setBackground(int theValue)
-set the background color of the control window.
- |
-
ControlWindow |
-setColorActive(int theColor)
-set the color for the controller while active.
- |
-
ControlWindow |
-setColorBackground(int theColor)
-set the background color of the controller.
- |
-
ControlWindow |
-setColorForeground(int theColor)
-set the foreground color of the controller.
- |
-
ControlWindow |
-setColorLabel(int theColor)
-set the color of the text label of the controller.
- |
-
ControlWindow |
-setColorValue(int theColor)
-set the color of the values.
- |
-
ControlWindow |
-setContext(CDrawable theDrawable)
-Adds a custom context to a ControlWindow.
- |
-
ControlWindow |
-setDrawBackground(boolean theFlag)
-by default the background of a controlWindow is
- filled with a background color every frame.
- |
-
ControlWindow |
-setLocation(int theX,
- int theY) |
-
ControlWindow |
-setPosition(int theX,
- int theY) |
-
ControlWindow |
-setPositionOfTabs(int theX,
- int theY) |
-
ControlWindow |
-setPositionOfTabs(processing.core.PVector thePVector)
-Sets the position of the tab bar which is set to 0,0
- by default.
- |
-
ControlWindow |
-setUndecorated(boolean theFlag) |
-
void |
-setUpdate(boolean theFlag)
-enable or disable the update function of a control
- window.
- |
-
ControlWindow |
-show() |
-
ControlWindow |
-toggleUndecorated() |
-
void |
-update()
-updates all controllers inside the control window if
- update is enabled.
- |
-
void |
-updateEvents() |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ControlWindow(ControlP5 theControlP5, - processing.core.PApplet theApplet)-
public ControlWindow activateTab(java.lang.String theTab)-
public ControlWindow addCanvas(Canvas theCanvas)-
public Tab addTab(java.lang.String theTab)-
public ControlWindow clear()-
public void clearKeys()-
@Deprecated -public ControlWindow disableMouseWheel()-
public ControlWindow disablePointer()-
public void draw()-
public void draw(processing.core.PGraphics pg)-
public void draw(processing.core.PGraphics pg, - int theX, - int theY)-
@Deprecated -public ControlWindow enableMouseWheel()-
public ControlWindow enablePointer()-
public ControlWindow frameRate(int theFrameRate)-
theFrameRate
- public Tab getCurrentTab()-
public ControllerInterface<?> getFirstFromMouseOverList()-
public java.util.List<ControllerInterface<?>> getMouseOverList()-
public ControlWindow.Pointer getPointer()-
public processing.core.PVector getPositionOfTabs()-
public Tab getTab(java.lang.String theTabName)-
public ControllerList getTabs()-
public void handleKeyEvent(processing.event.KeyEvent theKeyEvent)-
theKeyEvent
- KeyEventpublic ControlWindow hide()-
public boolean isDrawBackground()-
public boolean isMouseOver()-
public boolean isMouseOver(ControllerInterface<?> theController)-
public boolean isMousePressed()-
@Deprecated -public boolean isMouseWheel()-
public boolean isUndecorated()-
public boolean isUpdate()-
public boolean isVisible()-
public void keyEvent(processing.event.KeyEvent theKeyEvent)-
public void mouseEvent(int theX, - int theY, - boolean pressed)-
public void mouseEvent(processing.event.MouseEvent theMouseEvent)-
public java.lang.String name()-
public processing.core.PApplet papplet()-
public ControlWindow pre()-
public void remove()-
public ControlWindow removeCanvas(Canvas theCanvas)-
public ControlWindow removeMouseOverFor(ControllerInterface<?> theController)-
public ControlWindow removeTab(Tab theTab)-
public void resetMouseOver()-
public ControlWindow setBackground(int theValue)-
public ControlWindow setColorActive(int theColor)-
public ControlWindow setColorBackground(int theColor)-
public ControlWindow setColorForeground(int theColor)-
public ControlWindow setColorLabel(int theColor)-
public ControlWindow setColorValue(int theColor)-
public ControlWindow setContext(CDrawable theDrawable)-
theDrawable
- CDrawableCDrawable
public ControlWindow setDrawBackground(boolean theFlag)-
theFlag
- public ControlWindow setLocation(int theX, - int theY)-
public ControlWindow setPosition(int theX, - int theY)-
public ControlWindow setPositionOfTabs(int theX, - int theY)-
public ControlWindow setPositionOfTabs(processing.core.PVector thePVector)-
thePVector
- public ControlWindow setUndecorated(boolean theFlag)-
public void setUpdate(boolean theFlag)-
public ControlWindow show()-
public ControlWindow toggleUndecorated()-
public void update()-
public void updateEvents()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Controller.html b/reference/controlP5/Controller.html deleted file mode 100644 index 646cf22..0000000 --- a/reference/controlP5/Controller.html +++ /dev/null @@ -1,3089 +0,0 @@ - - - - - -public abstract class Controller<T> -extends java.lang.Object -implements ControllerInterface<T>, CDrawable, ControlP5Constants-
- Controller is an abstract class that is extended by any available controller within controlP5. - this is the full documentation list for all methods available for a controller. An event - triggered by a controller will be forwarded to the main program. If a void - controlEvent(ControlEvent theEvent) {} method is available, this method will be called. -
-- A Controller can notify the main program in 2 different ways: -
-setBroadcast(boolean)
Bang
,
-Button
,
-Knob
,
-Matrix
,
-MultiList
,
-Numberbox
,
-RadioButton
,
-ListBox
,
-Slider
,
-Textarea
,
-Textfield
,
-Textlabel
,
-Toggle
,
-ControlGroup
,
-ControlBehavior
,
-ControlEvent
/**
- * ControlP5 Basics
- *
- * The following example demonstrates the basic use of controlP5.
- * After initializing controlP5 you can add controllers to controlP5.
- * Here we use three numberboxes, one slider and one textfield.
- * The numberbox with name numberboxC will trigger function numberboxC()
- * in the example below. Whenever controlP5 detects a function in your
- * sketch that corresponds to the name of a controller, it will forward
- * an event to that function. Any event triggered by a controller
- * will be forwarded to function controlEvent in your sketch.
- * related examples ControlP5numberbox, ControlP5slider, ControlP5textfield
- *
- * by Andreas Schlegel, 2011
- * www.sojamo.de/libraries/controlp5
- *
- */
-
-
-import controlP5.*;
-
-ControlP5 cp5;
-public int myColorRect = 200;
-public int myColorBackground = 100;
-
-void setup() {
- size(400, 400);
- noStroke();
-
- cp5 = new ControlP5(this);
-
- // create a slider
- // parameters:
- // name, minValue, maxValue, defaultValue, x, y, width, height
- cp5.addSlider("sliderA", 100, 200, 100, 100, 260, 100, 14);
-
-
- // create 3 numberboxes and assign an id for each
- cp5.addNumberbox("numberboxA", myColorRect, 100, 140, 100, 14).setId(1);
- cp5.addNumberbox("numberboxB", myColorBackground, 100, 180, 100, 14).setId(2);
- cp5.addNumberbox("numberboxC", 0, 100, 220, 100, 14).setId(3);
-
-
- // create a texfield
- cp5.addTextfield("textA", 100, 290, 100, 20);
-
- // change individual settings for a controller
- cp5.getController("numberboxA").setMax(255);
- cp5.getController("numberboxA").setMin(0);
-}
-
-void draw() {
- background(myColorBackground);
- fill(myColorRect);
- rect(0, 0, width, 100);
-}
-
-
-// events from controller numberboxC are received here
-public void numberboxC(int theValue) {
- println("### got an event from numberboxC : "+theValue);
-}
-
-
-// an event from slider sliderA will change the value of textfield textA here
-public void sliderA(int theValue) {
- Textfield txt = ((Textfield)cp5.getController("textA"));
- txt.setValue(""+theValue);
-}
-
-
-// for every change (a textfield event confirmed with a return) in textfield textA,
-// function textA will be invoked
-public void textA(String theValue) {
- println("### got an event from textA : "+theValue);
-}
-
-
-// function controlEvent will be invoked with every value change
-// in any registered controller
-public void controlEvent(ControlEvent theEvent) {
- println("got a control event from controller with id "+theEvent.getId());
- switch(theEvent.getId()) {
- case(1): // numberboxA is registered with id 1
- myColorRect = (int)(theEvent.getController().getValue());
- break;
- case(2): // numberboxB is registered with id 2
- myColorBackground = (int)(theEvent.getController().getValue());
- break;
- }
-}
-
-
Modifier and Type | -Field and Description | -
---|---|
static int |
-autoHeight |
-
static processing.core.PVector |
-autoSpacing |
-
static int |
-autoWidth |
-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Controller(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend Controller.
- |
-
Modifier and Type | -Method and Description | -
---|---|
T |
-add(ControllerInterface<?> theElement) |
-
T |
-addCallback(CallbackListener theListener) |
-
T |
-addListener(ControlListener theListener) |
-
T |
-align(int theCaptionX,
- int theCaptionY,
- int theValueX,
- int theValueY) |
-
T |
-bringToFront() |
-
T |
-bringToFront(ControllerInterface<?> theController) |
-
T |
-changeValue(float theValue)
-sets the value of the controller without sending the broadcast event.
- |
-
void |
-continuousUpdateEvents()
-continuousUpdateEvents is used for internal updates of a controller.
- |
-
void |
-draw(processing.core.PGraphics theGraphics)
-the default draw function for each controller extending superclass Controller.
- |
-
processing.core.PVector |
-getAbsolutePosition() |
-
java.lang.String |
-getAddress() |
-
float[] |
-getArrayValue()
-returns the current float array value of a controller.
- |
-
float |
-getArrayValue(int theIndex) |
-
ControlBehavior |
-getBehavior() |
-
Label |
-getCaptionLabel() |
-
CColor |
-getColor() |
-
java.util.List<ControllerPlug> |
-getControllerPlugList() |
-
ControlWindow |
-getControlWindow() |
-
int |
-getDecimalPrecision() |
-
float |
-getDefaultValue() |
-
int |
-getHeight() |
-
int |
-getId()
-returns the id of a controller, by default the id is -1.
- |
-
java.lang.String |
-getInfo() |
-
java.lang.String |
-getLabel()
-returns the controller's caption label text.
- |
-
float |
-getMax()
-returns the maximum value of the controller.
- |
-
float |
-getMin()
-returns the minimum value of the controller.
- |
-
java.lang.String |
-getName()
-returns the index name of the controller.
- |
-
ControllerInterface<?> |
-getParent()
-returns the parent of a controller.
- |
-
int |
-getPickingColor() |
-
Pointer |
-getPointer() |
-
processing.core.PVector |
-getPosition()
-get the position of a controller.
- |
-
ControllerProperty |
-getProperty(java.lang.String thePropertyName) |
-
ControllerProperty |
-getProperty(java.lang.String theSetter,
- java.lang.String theGetter) |
-
java.lang.String |
-getStringValue() |
-
Tab |
-getTab()
-get the instance of the tab the controller belongs to.
- |
-
float |
-getValue() |
-
Label |
-getValueLabel() |
-
ControllerView<T> |
-getView() |
-
int |
-getWidth() |
-
ControlWindow |
-getWindow()
-returns the control window of the controller
- |
-
T |
-hide() |
-
void |
-init() |
-
boolean |
-isActive()
-checks if a controller is active.
- |
-
boolean |
-isBroadcast()
-check if broadcasting is enabled or disabled for a controller.
- |
-
boolean |
-isInside()
-returns true or false and indicates if the mouse is inside the area of a controller.
- |
-
boolean |
-isLabelVisible() |
-
boolean |
-isListening()
-returns true or false for the current listening status.
- |
-
boolean |
-isLock() |
-
boolean |
-isMouseOver()
-check if the mouse is within this particular controller.
- |
-
boolean |
-isMousePressed()
-returns true or false if the mouse has is pressed.
- |
-
boolean |
-isMoveable()
-checks if a controller is moveable.
- |
-
boolean |
-isUpdate()
-enables the update function for a controller.
- |
-
boolean |
-isUserInteraction() |
-
boolean |
-isVisible() |
-
void |
-keyEvent(processing.event.KeyEvent theEvent) |
-
T |
-linebreak() |
-
T |
-listen(boolean theValue)
-enables a controller to listen to changes made to the variable linked to the controller.
- |
-
int |
-listenerSize() |
-
T |
-lock()
-disables the controller to be moved, or changed or controlled by the user.
- |
-
T |
-moveTo(ControlGroup<?> theGroup) |
-
T |
-moveTo(ControllerGroup<?> theGroup) |
-
T |
-moveTo(ControllerGroup<?> theGroup,
- Tab theTab,
- ControlWindow theControlWindow) |
-
T |
-moveTo(ControlWindow theControlWindow)
-moves the controller to the default tab of a control window - other than the main window.
- |
-
T |
-moveTo(ControlWindow theControlWindow,
- java.lang.String theTabName) |
-
T |
-moveTo(processing.core.PApplet theApplet)
-moves the controller to the default tab inside the main window.
- |
-
T |
-moveTo(processing.core.PApplet theApplet,
- java.lang.String theTabName)
-moves the controller to a tab inside the main window.
- |
-
T |
-moveTo(java.lang.String theTabName)
-moves the controller to another tab.
- |
-
T |
-moveTo(Tab theTab)
-moves the controller to another tab.
- |
-
T |
-plugTo(java.lang.Object theObject) |
-
T |
-plugTo(java.lang.Object[] theObjects)
-plugs the controller to a list of objects
- |
-
T |
-plugTo(java.lang.Object[] theObjects,
- java.lang.String theName) |
-
T |
-plugTo(java.lang.Object theObject,
- java.lang.String theName) |
-
T |
-registerProperty(java.lang.String thePropertyName) |
-
T |
-registerProperty(java.lang.String theSetter,
- java.lang.String theGetter) |
-
T |
-registerTooltip(java.lang.String theText)
-adds a tooltip to a controller, by default the tooltip is disabled.
- |
-
void |
-remove()
-removes a controller from controlP5.
- |
-
T |
-remove(ControllerInterface<?> theElement) |
-
T |
-removeBehavior() |
-
T |
-removeCallback() |
-
T |
-removeCallback(CallbackListener theListener) |
-
T |
-removeListener(ControlListener theListener) |
-
T |
-removeProperty(java.lang.String thePropertyName) |
-
T |
-removeProperty(java.lang.String theSetter,
- java.lang.String theGetter) |
-
T |
-setAbsolutePosition(processing.core.PVector thePVector) |
-
T |
-setAddress(java.lang.String theAddress) |
-
T |
-setArrayValue(float[] theArray) |
-
T |
-setArrayValue(int theIndex,
- float theValue) |
-
T |
-setBehavior(ControlBehavior theBehavior)
-with setBehavior you can add a ControlBehavior to a controller.
- |
-
T |
-setBroadcast(boolean theFlag)
-Use setBroadcast to enable and disable the broadcasting of changes in a controller's value.
- |
-
T |
-setCaptionLabel(java.lang.String theLabel)
-sets the content of the caption label of a controller.
- |
-
T |
-setColor(CColor theColor) |
-
T |
-setColorActive(int theColor) |
-
T |
-setColorBackground(int theColor) |
-
T |
-setColorCaptionLabel(int theColor) |
-
T |
-setColorForeground(int theColor) |
-
T |
-setColorValueLabel(int theColor) |
-
T |
-setDecimalPrecision(int theValue)
-sets the decimal precision of a controller's float value displayed.
- |
-
T |
-setDefaultValue(float theValue)
-set the default value.
- |
-
T |
-setGroup(ControllerGroup<?> theGroup) |
-
T |
-setGroup(java.lang.String theName)
-sets the group of the controller.
- |
-
T |
-setHeight(int theHeight) |
-
T |
-setId(int theId)
-set the id of a controller.
- |
-
T |
-setImage(processing.core.PImage theImage) |
-
T |
-setImage(processing.core.PImage theImage,
- int theState) |
-
T |
-setImages(processing.core.PImage... imgs) |
-
T |
-setImages(processing.core.PImage theImageDefault,
- processing.core.PImage theImageOver,
- processing.core.PImage theImageActive)
-by default controllers use simple shapes, to replace these shapes with images, use
- setImages().
- |
-
T |
-setImages(processing.core.PImage theImageDefault,
- processing.core.PImage theImageOver,
- processing.core.PImage theImageActive,
- processing.core.PImage theImageHighlight) |
-
T |
-setLabelVisible(boolean theValue)
-show or hide the labels of a controller.
- |
-
T |
-setLock(boolean theValue)
-sets the lock status of the controller
- |
-
T |
-setMax(float theValue)
-sets the maximum value of the Controller.
- |
-
T |
-setMin(float theValue)
-sets the minimum value of the Controller.
- |
-
T |
-setMouseOver(boolean theFlag) |
-
boolean |
-setMousePressed(boolean theStatus) |
-
T |
-setMoveable(boolean theValue)
-enable or prevent the controller to be moveable.
- |
-
T |
-setParent(ControllerInterface<?> theParent)
-set the parent of a parent of a controller.
- |
-
T |
-setPosition(float theX,
- float theY)
-set the position of a controller.
- |
-
T |
-setPosition(processing.core.PVector thePVector) |
-
T |
-setSize(int theWidth,
- int theHeight) |
-
T |
-setSize(processing.core.PImage theImage)
-auto-updates the size of a controller according to the dimensions of the PImage.
- |
-
T |
-setStringValue(java.lang.String theValue) |
-
T |
-setTab(ControlWindow theWindow,
- java.lang.String theName) |
-
T |
-setTab(java.lang.String theName)
-sets the tab of the controller.
- |
-
T |
-setUpdate(boolean theFlag)
-disables the update function for a controller.
- |
-
T |
-setUserInteraction(boolean theValue) |
-
T |
-setValue(float theValue) |
-
T |
-setValueLabel(java.lang.String theLabel)
-set or change the value of the value label of a controller.
- |
-
T |
-setValueSelf(float theValue) |
-
T |
-setView(ControllerView<T> theDisplay)
-use setDisplay to customize your controller look.
- |
-
void |
-setView(ControllerView<T> theDisplay,
- int theMode) |
-
T |
-setVisible(boolean theFlag) |
-
T |
-setWidth(int theWidth) |
-
T |
-show() |
-
java.lang.String |
-toString() |
-
T |
-unlock()
-enables the controller to be moved, changed and controlled by the user.
- |
-
T |
-unplugFrom(java.lang.Object theObject)
-unplugs the Controller for a single object
- |
-
T |
-unplugFrom(java.lang.Object[] theObjects)
-unplugs the controller from a list of objects
- |
-
T |
-unregisterTooltip() |
-
T |
-update()
-updates the value of the controller without having to set the value explicitly.
- |
-
T |
-updateAbsolutePosition() |
-
T |
-updateEvents()
-updateEvents is used for internal updates of a controller.
- |
-
T |
-updateInternalEvents(processing.core.PApplet theApplet)
-a method for putting input events like e.g.
- |
-
T |
-updateSize() |
-
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public static int autoHeight-
public static processing.core.PVector autoSpacing-
public static int autoWidth-
public Controller(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public T add(ControllerInterface<?> theElement)-
add
in interface ControllerInterface<T>
theElement
- ControllerInterfacepublic T addCallback(CallbackListener theListener)-
theListener
- CallbackListener
public T addListener(ControlListener theListener)-
addListener
in interface ControllerInterface<T>
theListener
- ControlListenerControlListener
public T align(int theCaptionX, - int theCaptionY, - int theValueX, - int theValueY)-
public T bringToFront()-
bringToFront
in interface ControllerInterface<T>
public T bringToFront(ControllerInterface<?> theController)-
bringToFront
in interface ControllerInterface<T>
public final T changeValue(float theValue)-
theValue
- floatpublic final void continuousUpdateEvents()-
continuousUpdateEvents
in interface ControllerInterface<T>
public void draw(processing.core.PGraphics theGraphics)-
draw
in interface CDrawable
draw
in interface ControllerInterface<T>
theApplet
- PAppletControllerView
public processing.core.PVector getAbsolutePosition()-
getAbsolutePosition
in interface ControllerInterface<T>
PVector
public java.lang.String getAddress()-
getAddress
in interface ControllerInterface<T>
public float[] getArrayValue()-
getArrayValue
in interface ControllerInterface<T>
getValue()
,
-getStringValue()
public float getArrayValue(int theIndex)-
getArrayValue
in interface ControllerInterface<T>
theIndex
- public ControlBehavior getBehavior()-
public CColor getColor()-
getColor
in interface ControllerInterface<T>
public java.util.List<ControllerPlug> getControllerPlugList()-
public ControlWindow getControlWindow()-
public int getDecimalPrecision()-
public float getDefaultValue()-
public int getHeight()-
getHeight
in interface ControllerInterface<T>
public int getId()-
getId
in interface ControllerInterface<T>
public java.lang.String getInfo()-
public java.lang.String getLabel()-
public float getMax()-
public float getMin()-
public java.lang.String getName()-
getName
in interface ControllerInterface<T>
public ControllerInterface<?> getParent()-
getParent
in interface ControllerInterface<T>
public int getPickingColor()-
getPickingColor
in interface ControllerInterface<T>
public Pointer getPointer()-
public processing.core.PVector getPosition()-
getPosition
in interface ControllerInterface<T>
public ControllerProperty getProperty(java.lang.String thePropertyName)-
getProperty
in interface ControllerInterface<T>
public ControllerProperty getProperty(java.lang.String theSetter, - java.lang.String theGetter)-
getProperty
in interface ControllerInterface<T>
public java.lang.String getStringValue()-
getStringValue
in interface ControllerInterface<T>
getValue()
,
-getArrayValue()
public Tab getTab()-
getTab
in interface ControllerInterface<T>
public float getValue()-
getValue
in interface ControllerInterface<T>
getStringValue()
,
-getArrayValue()
public Label getValueLabel()-
public ControllerView<T> getView()-
public int getWidth()-
getWidth
in interface ControllerInterface<T>
public ControlWindow getWindow()-
getWindow
in interface ControllerInterface<T>
public T hide()-
hide
in interface ControllerInterface<T>
public void init()-
init
in interface ControllerInterface<T>
public boolean isActive()-
public boolean isBroadcast()-
public boolean isInside()-
public boolean isLabelVisible()-
public boolean isListening()-
listen(boolean)
public boolean isLock()-
public boolean isMouseOver()-
isMouseOver
in interface ControllerInterface<T>
public boolean isMousePressed()-
public boolean isMoveable()-
public boolean isUpdate()-
isUpdate
in interface ControllerInterface<T>
update()
,
-setUpdate(boolean)
public boolean isUserInteraction()-
public boolean isVisible()-
isVisible
in interface ControllerInterface<T>
public void keyEvent(processing.event.KeyEvent theEvent)-
keyEvent
in interface ControllerInterface<T>
KeyEvent
- theEventpublic T linebreak()-
public T listen(boolean theValue)-
theFlag
- public int listenerSize()-
public T lock()-
public final T moveTo(ControlGroup<?> theGroup)-
theGroup
- public final T moveTo(ControllerGroup<?> theGroup)-
moveTo
in interface ControllerInterface<T>
public final T moveTo(ControllerGroup<?> theGroup, - Tab theTab, - ControlWindow theControlWindow)-
moveTo
in interface ControllerInterface<T>
public final T moveTo(ControlWindow theControlWindow)-
theControlWindow
- public final T moveTo(ControlWindow theControlWindow, - java.lang.String theTabName)-
theControlWindow
- theTabName
- public final T moveTo(processing.core.PApplet theApplet)-
theApplet
- public final T moveTo(processing.core.PApplet theApplet, - java.lang.String theTabName)-
theApplet
- theTabName
- public final T moveTo(java.lang.String theTabName)-
theTabName
- Stringpublic final T moveTo(Tab theTab)-
theTab
- public T plugTo(java.lang.Object theObject)-
theObject
- public T plugTo(java.lang.Object[] theObjects)-
theObject
- public T plugTo(java.lang.Object[] theObjects, - java.lang.String theName)-
theObjects
- theName
- public T plugTo(java.lang.Object theObject, - java.lang.String theName)-
public T registerProperty(java.lang.String thePropertyName)-
registerProperty
in interface ControllerInterface<T>
public T registerProperty(java.lang.String theSetter, - java.lang.String theGetter)-
registerProperty
in interface ControllerInterface<T>
public T registerTooltip(java.lang.String theText)-
theText
- public void remove()-
remove
in interface ControllerInterface<T>
public T remove(ControllerInterface<?> theElement)-
remove
in interface ControllerInterface<T>
theElement
- ControllerInterfacepublic T removeBehavior()-
public T removeCallback()-
public T removeCallback(CallbackListener theListener)-
theListener
- CallbackListener
public T removeListener(ControlListener theListener)-
theListener
- ControlListenerControlListener
public T removeProperty(java.lang.String thePropertyName)-
removeProperty
in interface ControllerInterface<T>
public T removeProperty(java.lang.String theSetter, - java.lang.String theGetter)-
removeProperty
in interface ControllerInterface<T>
public T setAbsolutePosition(processing.core.PVector thePVector)-
setAbsolutePosition
in interface ControllerInterface<T>
public T setAddress(java.lang.String theAddress)-
setAddress
in interface ControllerInterface<T>
public T setArrayValue(float[] theArray)-
setArrayValue
in interface ControllerInterface<T>
theArray
- public T setArrayValue(int theIndex, - float theValue)-
setArrayValue
in interface ControllerInterface<T>
theIndex
- theValue
- public T setBehavior(ControlBehavior theBehavior)-
theBehavior
- ControlBehaviorpublic T setBroadcast(boolean theFlag)-
theFlag
- booleanpublic T setCaptionLabel(java.lang.String theLabel)-
setCaptionLabel
in interface ControllerInterface<T>
theLabel
- public T setColor(CColor theColor)-
setColor
in interface ControllerInterface<T>
public T setColorActive(int theColor)-
setColorActive
in interface ControllerInterface<T>
public T setColorBackground(int theColor)-
setColorBackground
in interface ControllerInterface<T>
public T setColorCaptionLabel(int theColor)-
theColor
- public T setColorForeground(int theColor)-
setColorForeground
in interface ControllerInterface<T>
public T setColorValueLabel(int theColor)-
theColor
- public T setDecimalPrecision(int theValue)-
theValue
- public T setDefaultValue(float theValue)-
theValue
- floatpublic final T setGroup(ControllerGroup<?> theGroup)-
public final T setGroup(java.lang.String theName)-
theName
- Stringpublic T setHeight(int theHeight)-
theHeight
- public T setId(int theId)-
setId
in interface ControllerInterface<T>
int
- theIdpublic T setImage(processing.core.PImage theImage)-
public T setImage(processing.core.PImage theImage, - int theState)-
theImage
- theState
- use Controller.DEFAULT (background) Controller.OVER (foreground)
- Controller.ACTIVE (active)public T setImages(processing.core.PImage... imgs)-
public T setImages(processing.core.PImage theImageDefault, - processing.core.PImage theImageOver, - processing.core.PImage theImageActive)-
theImageDefault
- theImageOver
- theImageActive
- public T setImages(processing.core.PImage theImageDefault, - processing.core.PImage theImageOver, - processing.core.PImage theImageActive, - processing.core.PImage theImageHighlight)-
public T setLabelVisible(boolean theValue)-
theValue
- booleanpublic T setLock(boolean theValue)-
theValue
- public T setMax(float theValue)-
theValue
- floatpublic T setMin(float theValue)-
theValue
- floatpublic T setMouseOver(boolean theFlag)-
setMouseOver
in interface ControllerInterface<T>
public final boolean setMousePressed(boolean theStatus)-
setMousePressed
in interface ControllerInterface<T>
theStatus
- booleanpublic T setMoveable(boolean theValue)-
theValue
- booleanpublic final T setParent(ControllerInterface<?> theParent)-
theParent
- ControllerInterfacepublic T setPosition(float theX, - float theY)-
setPosition
in interface ControllerInterface<T>
theX
- floattheY
- floatpublic T setPosition(processing.core.PVector thePVector)-
setPosition
in interface ControllerInterface<T>
public T setSize(int theWidth, - int theHeight)-
theWidth
- theHeight
- public T setSize(processing.core.PImage theImage)-
theImage
- public T setStringValue(java.lang.String theValue)-
setStringValue
in interface ControllerInterface<T>
theValue
- public final T setTab(ControlWindow theWindow, - java.lang.String theName)-
public final T setTab(java.lang.String theName)-
theName
- Stringpublic T setUpdate(boolean theFlag)-
setUpdate
in interface ControllerInterface<T>
theFlag
- booleanupdate()
,
-isUpdate()
public T setUserInteraction(boolean theValue)-
public T setValue(float theValue)-
setValue
in interface ControllerInterface<T>
theValue
- floatpublic T setValueLabel(java.lang.String theLabel)-
theLabel
- public T setValueSelf(float theValue)-
public T setView(ControllerView<T> theDisplay)-
theDisplay
- ControllerView
public void setView(ControllerView<T> theDisplay, - int theMode)-
public T setVisible(boolean theFlag)-
theFlag
- booleanpublic T setWidth(int theWidth)-
theWidth
- public T show()-
show
in interface ControllerInterface<T>
public java.lang.String toString()-
toString
in class java.lang.Object
public T unlock()-
public T unplugFrom(java.lang.Object theObject)-
theObject
- public T unplugFrom(java.lang.Object[] theObjects)-
theObjects
- public T unregisterTooltip()-
registerTooltip(String)
public T update()-
update
in interface ControllerInterface<T>
setUpdate(boolean)
,
-isUpdate()
public T updateAbsolutePosition()-
updateAbsolutePosition
in interface ControllerInterface<T>
public final T updateEvents()-
updateEvents
in interface ControllerInterface<T>
public T updateInternalEvents(processing.core.PApplet theApplet)-
ControllerInterface
updateInternalEvents
in interface ControllerInterface<T>
ControllerInterface.updateInternalEvents
public T updateSize()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControllerGroup.html b/reference/controlP5/ControllerGroup.html deleted file mode 100644 index f56aea2..0000000 --- a/reference/controlP5/ControllerGroup.html +++ /dev/null @@ -1,2422 +0,0 @@ - - - - - -public abstract class ControllerGroup<T> -extends java.lang.Object -implements ControllerInterface<T>, ControlP5Constants, ControlListener-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
ControllerGroup(ControlP5 theControlP5,
- ControllerGroup<?> theParent,
- java.lang.String theName,
- float theX,
- float theY) |
-
ControllerGroup(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend ControllerGroup.
- |
-
Modifier and Type | -Method and Description | -
---|---|
processing.core.PVector |
-absolutePosition()
-Deprecated.
- |
-
T |
-add(ControllerInterface<?> theElement)
-Adds a controller to the group, but use Controller.setGroup() instead.
- |
-
Canvas |
-addCanvas(Canvas theCanvas)
-Adds a canvas to a controllerGroup such as a tab or group.
- |
-
T |
-addCloseButton()
-TODO redesign or deprecate add a close button to the controlbar of this controlGroup.
- |
-
T |
-addDrawable(CDrawable theElement) |
-
T |
-addListener(ControlListener theListener) |
-
float[] |
-arrayValue()
-Deprecated.
- |
-
T |
-bringToFront() |
-
T |
-bringToFront(ControllerInterface<?> theController) |
-
T |
-close() |
-
CColor |
-color()
-Deprecated.
- |
-
void |
-continuousUpdateEvents() |
-
void |
-controlEvent(ControlEvent theEvent)
-controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about
- value changes.
- |
-
Controller<?> |
-controller(java.lang.String theController)
-Deprecated.
- |
-
T |
-disableCollapse() |
-
void |
-draw(processing.core.PGraphics theGraphics) |
-
T |
-enableCollapse() |
-
processing.core.PVector |
-getAbsolutePosition() |
-
java.lang.String |
-getAddress() |
-
float[] |
-getArrayValue() |
-
float |
-getArrayValue(int theIndex) |
-
Label |
-getCaptionLabel() |
-
CColor |
-getColor() |
-
Controller<?> |
-getController(java.lang.String theController) |
-
int |
-getHeight() |
-
int |
-getId() |
-
java.lang.String |
-getInfo() |
-
java.lang.String |
-getName() |
-
ControllerInterface<?> |
-getParent() |
-
int |
-getPickingColor() |
-
processing.core.PVector |
-getPosition() |
-
ControllerProperty |
-getProperty(java.lang.String thePropertyName) |
-
ControllerProperty |
-getProperty(java.lang.String theSetter,
- java.lang.String theGetter) |
-
java.lang.String |
-getStringValue() |
-
Tab |
-getTab() |
-
float |
-getValue() |
-
Label |
-getValueLabel() |
-
int |
-getWidth() |
-
ControlWindow |
-getWindow() |
-
T |
-hide() |
-
T |
-hideArrow() |
-
T |
-hideBar() |
-
int |
-id()
-Deprecated.
- |
-
void |
-init() |
-
boolean |
-isBarVisible() |
-
boolean |
-isCollapse() |
-
boolean |
-isMouseOver() |
-
boolean |
-isMoveable() |
-
boolean |
-isOpen() |
-
boolean |
-isUpdate()
-checks the update status of a controller.
- |
-
boolean |
-isVisible() |
-
void |
-keyEvent(processing.event.KeyEvent theEvent) |
-
int |
-listenerSize() |
-
T |
-moveTo(ControllerGroup<?> theGroup) |
-
T |
-moveTo(ControllerGroup<?> theGroup,
- Tab theTab,
- ControlWindow theControlWindow) |
-
T |
-moveTo(ControlWindow theControlWindow) |
-
T |
-moveTo(ControlWindow theControlWindow,
- java.lang.String theTabName) |
-
T |
-moveTo(processing.core.PApplet thePApplet) |
-
T |
-moveTo(java.lang.String theTabName) |
-
T |
-moveTo(java.lang.String theTabName,
- ControlWindow theControlWindow) |
-
T |
-moveTo(Tab theTab) |
-
T |
-moveTo(Tab theTab,
- ControlWindow theControlWindow) |
-
java.lang.String |
-name()
-Deprecated.
- |
-
T |
-open() |
-
ControllerInterface<?> |
-parent()
-Deprecated.
- |
-
processing.core.PVector |
-position()
-Deprecated.
- |
-
T |
-registerProperty(java.lang.String thePropertyName) |
-
T |
-registerProperty(java.lang.String theSetter,
- java.lang.String theGetter) |
-
void |
-remove()
-removes the group from controlP5.
- |
-
T |
-remove(CDrawable theElement) |
-
T |
-remove(ControllerInterface<?> theElement)
-Removes a controller from the group, but use Controller.setGroup() instead.
- |
-
T |
-removeCanvas(Canvas theCanvas)
-Removes a canvas from a controller group.
- |
-
T |
-removeCloseButton()
-TODO redesign or deprecate remove the close button.
- |
-
T |
-removeListener(ControlListener theListener) |
-
T |
-removeProperty(java.lang.String thePropertyName) |
-
T |
-removeProperty(java.lang.String theSetter,
- java.lang.String theGetter) |
-
T |
-setAbsolutePosition(processing.core.PVector thePVector) |
-
T |
-setAddress(java.lang.String theAddress) |
-
T |
-setArrayValue(float[] theArray) |
-
T |
-setArrayValue(int theIndex,
- float theValue) |
-
T |
-setCaptionLabel(java.lang.String theValue) |
-
T |
-setColor(CColor theColor) |
-
T |
-setColorActive(int theColor) |
-
T |
-setColorBackground(int theColor) |
-
T |
-setColorForeground(int theColor) |
-
T |
-setColorLabel(int theColor) |
-
T |
-setColorValue(int theColor) |
-
T |
-setGroup(ControllerGroup<?> theGroup) |
-
T |
-setGroup(java.lang.String theName) |
-
T |
-setHeight(int theHeight) |
-
T |
-setId(int theId) |
-
T |
-setLabel(java.lang.String theLabel) |
-
T |
-setMouseOver(boolean theFlag) |
-
boolean |
-setMousePressed(boolean theStatus) |
-
T |
-setMoveable(boolean theFlag)
-set the moveable status of the group, when false, the group can't be moved.
- |
-
T |
-setOpen(boolean theFlag) |
-
T |
-setPosition(float theX,
- float theY)
-set the position of this controller.
- |
-
T |
-setPosition(processing.core.PVector thePVector) |
-
T |
-setSize(int theWidth,
- int theHeight) |
-
T |
-setStringValue(java.lang.String theValue) |
-
T |
-setTab(ControlWindow theWindow,
- java.lang.String theName) |
-
T |
-setTab(java.lang.String theName) |
-
T |
-setTab(Tab theTab) |
-
T |
-setTitle(java.lang.String theTitle) |
-
T |
-setUpdate(boolean theFlag)
-enables or disables the update function of a controller.
- |
-
T |
-setValue(float theValue) |
-
T |
-setVisible(boolean theFlag) |
-
T |
-setWidth(int theWidth) |
-
T |
-show() |
-
T |
-showArrow() |
-
T |
-showBar() |
-
java.lang.String |
-stringValue()
-Deprecated.
- |
-
java.lang.String |
-toString() |
-
T |
-update() |
-
T |
-updateAbsolutePosition() |
-
T |
-updateEvents() |
-
T |
-updateInternalEvents(processing.core.PApplet theApplet)
-a method for putting input events like e.g.
- |
-
float |
-value()
-Deprecated.
- |
-
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public ControllerGroup(ControlP5 theControlP5, - ControllerGroup<?> theParent, - java.lang.String theName, - float theX, - float theY)-
theControlP5
- ControlP5theParent
- ControllerGrouptheName
- StringtheX
- floattheY
- floatpublic ControllerGroup(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
@Deprecated -public processing.core.PVector absolutePosition()-
public T add(ControllerInterface<?> theElement)-
add
in interface ControllerInterface<T>
theElement
- ControllerInterfacepublic Canvas addCanvas(Canvas theCanvas)-
theCanvas
- public T addCloseButton()-
public T addDrawable(CDrawable theElement)-
theElement
- CDrawablepublic T addListener(ControlListener theListener)-
addListener
in interface ControllerInterface<T>
theListener
- ControlListenerControlListener
@Deprecated -public float[] arrayValue()-
public T bringToFront()-
bringToFront
in interface ControllerInterface<T>
public T bringToFront(ControllerInterface<?> theController)-
bringToFront
in interface ControllerInterface<T>
public T close()-
@Deprecated -public CColor color()-
public void continuousUpdateEvents()-
continuousUpdateEvents
in interface ControllerInterface<T>
public void controlEvent(ControlEvent theEvent)-
ControlListener
controlEvent
in interface ControlListener
theEvent
- ControlEventCallbackListener
,
-CallbackEvent
@Deprecated -public Controller<?> controller(java.lang.String theController)-
public T disableCollapse()-
public final void draw(processing.core.PGraphics theGraphics)-
draw
in interface ControllerInterface<T>
public T enableCollapse()-
public processing.core.PVector getAbsolutePosition()-
getAbsolutePosition
in interface ControllerInterface<T>
public java.lang.String getAddress()-
getAddress
in interface ControllerInterface<T>
public float[] getArrayValue()-
getArrayValue
in interface ControllerInterface<T>
public float getArrayValue(int theIndex)-
getArrayValue
in interface ControllerInterface<T>
theIndex
- public Label getCaptionLabel()-
public CColor getColor()-
getColor
in interface ControllerInterface<T>
public Controller<?> getController(java.lang.String theController)-
public int getHeight()-
getHeight
in interface ControllerInterface<T>
public int getId()-
getId
in interface ControllerInterface<T>
public java.lang.String getInfo()-
public java.lang.String getName()-
getName
in interface ControllerInterface<T>
public ControllerInterface<?> getParent()-
getParent
in interface ControllerInterface<T>
public int getPickingColor()-
getPickingColor
in interface ControllerInterface<T>
public processing.core.PVector getPosition()-
getPosition
in interface ControllerInterface<T>
public ControllerProperty getProperty(java.lang.String thePropertyName)-
getProperty
in interface ControllerInterface<T>
public ControllerProperty getProperty(java.lang.String theSetter, - java.lang.String theGetter)-
getProperty
in interface ControllerInterface<T>
public java.lang.String getStringValue()-
getStringValue
in interface ControllerInterface<T>
public Tab getTab()-
getTab
in interface ControllerInterface<T>
public float getValue()-
getValue
in interface ControllerInterface<T>
public Label getValueLabel()-
public int getWidth()-
getWidth
in interface ControllerInterface<T>
public ControlWindow getWindow()-
getWindow
in interface ControllerInterface<T>
public T hide()-
hide
in interface ControllerInterface<T>
public T hideArrow()-
public T hideBar()-
@Deprecated -public int id()-
id
in interface ControllerInterface<T>
public void init()-
init
in interface ControllerInterface<T>
public boolean isBarVisible()-
public boolean isCollapse()-
public boolean isMouseOver()-
isMouseOver
in interface ControllerInterface<T>
public boolean isMoveable()-
public boolean isOpen()-
public boolean isUpdate()-
isUpdate
in interface ControllerInterface<T>
public boolean isVisible()-
isVisible
in interface ControllerInterface<T>
public void keyEvent(processing.event.KeyEvent theEvent)-
keyEvent
in interface ControllerInterface<T>
theEvent
- KeyEventpublic int listenerSize()-
public final T moveTo(ControllerGroup<?> theGroup)-
moveTo
in interface ControllerInterface<T>
public final T moveTo(ControllerGroup<?> theGroup, - Tab theTab, - ControlWindow theControlWindow)-
moveTo
in interface ControllerInterface<T>
theGroup
- ControlGrouptheTab
- TabtheControlWindow
- ControlWindowpublic T moveTo(ControlWindow theControlWindow)-
public final T moveTo(ControlWindow theControlWindow, - java.lang.String theTabName)-
public T moveTo(processing.core.PApplet thePApplet)-
public final T moveTo(java.lang.String theTabName)-
public final T moveTo(java.lang.String theTabName, - ControlWindow theControlWindow)-
public final T moveTo(Tab theTab, - ControlWindow theControlWindow)-
@Deprecated -public java.lang.String name()-
name
in interface ControllerInterface<T>
public T open()-
@Deprecated -public ControllerInterface<?> parent()-
parent
in interface ControllerInterface<T>
@Deprecated -public processing.core.PVector position()-
public T registerProperty(java.lang.String thePropertyName)-
registerProperty
in interface ControllerInterface<T>
public T registerProperty(java.lang.String theSetter, - java.lang.String theGetter)-
registerProperty
in interface ControllerInterface<T>
public void remove()-
remove
in interface ControllerInterface<T>
public T remove(CDrawable theElement)-
theElement
- CDrawablepublic T remove(ControllerInterface<?> theElement)-
remove
in interface ControllerInterface<T>
theElement
- ControllerInterfacepublic T removeCanvas(Canvas theCanvas)-
theCanvas
- public T removeCloseButton()-
public T removeListener(ControlListener theListener)-
theListener
- ControlListenerControlListener
public T removeProperty(java.lang.String thePropertyName)-
removeProperty
in interface ControllerInterface<T>
public T removeProperty(java.lang.String theSetter, - java.lang.String theGetter)-
removeProperty
in interface ControllerInterface<T>
public T setAbsolutePosition(processing.core.PVector thePVector)-
setAbsolutePosition
in interface ControllerInterface<T>
public T setAddress(java.lang.String theAddress)-
setAddress
in interface ControllerInterface<T>
public T setArrayValue(float[] theArray)-
setArrayValue
in interface ControllerInterface<T>
theArray
- public T setArrayValue(int theIndex, - float theValue)-
setArrayValue
in interface ControllerInterface<T>
theIndex
- theValue
- public T setCaptionLabel(java.lang.String theValue)-
setCaptionLabel
in interface ControllerInterface<T>
public T setColor(CColor theColor)-
setColor
in interface ControllerInterface<T>
public T setColorActive(int theColor)-
setColorActive
in interface ControllerInterface<T>
public T setColorBackground(int theColor)-
setColorBackground
in interface ControllerInterface<T>
public T setColorForeground(int theColor)-
setColorForeground
in interface ControllerInterface<T>
public T setColorLabel(int theColor)-
setColorLabel
in interface ControllerInterface<T>
public T setColorValue(int theColor)-
setColorValue
in interface ControllerInterface<T>
public final T setGroup(ControllerGroup<?> theGroup)-
theGroup
- ControllerGrouppublic final T setGroup(java.lang.String theName)-
theName
- Stringpublic T setHeight(int theHeight)-
theHeight
- public T setId(int theId)-
setId
in interface ControllerInterface<T>
public T setLabel(java.lang.String theLabel)-
setLabel
in interface ControllerInterface<T>
theLabel
- Stringpublic T setMouseOver(boolean theFlag)-
setMouseOver
in interface ControllerInterface<T>
public boolean setMousePressed(boolean theStatus)-
setMousePressed
in interface ControllerInterface<T>
theStatus
- booleanpublic T setMoveable(boolean theFlag)-
theFlag
- booleanpublic T setOpen(boolean theFlag)-
public T setPosition(float theX, - float theY)-
setPosition
in interface ControllerInterface<T>
theX
- floattheY
- floatpublic T setPosition(processing.core.PVector thePVector)-
setPosition
in interface ControllerInterface<T>
public T setSize(int theWidth, - int theHeight)-
public T setStringValue(java.lang.String theValue)-
setStringValue
in interface ControllerInterface<T>
public final T setTab(ControlWindow theWindow, - java.lang.String theName)-
public final T setTab(java.lang.String theName)-
theName
- Stringpublic T setTitle(java.lang.String theTitle)-
public T setUpdate(boolean theFlag)-
setUpdate
in interface ControllerInterface<T>
theFlag
- booleanpublic T setValue(float theValue)-
setValue
in interface ControllerInterface<T>
public T setVisible(boolean theFlag)-
theFlag
- booleanpublic T setWidth(int theWidth)-
theWidth
- public T show()-
show
in interface ControllerInterface<T>
public T showArrow()-
public T showBar()-
@Deprecated -public java.lang.String stringValue()-
stringValue
in interface ControllerInterface<T>
public java.lang.String toString()-
toString
in class java.lang.Object
public T update()-
update
in interface ControllerInterface<T>
public T updateAbsolutePosition()-
updateAbsolutePosition
in interface ControllerInterface<T>
public T updateEvents()-
updateEvents
in interface ControllerInterface<T>
public T updateInternalEvents(processing.core.PApplet theApplet)-
ControllerInterface
updateInternalEvents
in interface ControllerInterface<T>
@Deprecated -public float value()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControllerInterface.html b/reference/controlP5/ControllerInterface.html deleted file mode 100644 index bfac44e..0000000 --- a/reference/controlP5/ControllerInterface.html +++ /dev/null @@ -1,1043 +0,0 @@ - - - - - -public interface ControllerInterface<T>
-Modifier and Type | -Method and Description | -
---|---|
T |
-add(ControllerInterface<?> theElement) |
-
T |
-addListener(ControlListener theListener) |
-
T |
-bringToFront() |
-
T |
-bringToFront(ControllerInterface<?> theController) |
-
void |
-continuousUpdateEvents() |
-
void |
-draw(processing.core.PGraphics theGraphics) |
-
processing.core.PVector |
-getAbsolutePosition() |
-
java.lang.String |
-getAddress() |
-
float[] |
-getArrayValue() |
-
float |
-getArrayValue(int theIndex) |
-
CColor |
-getColor() |
-
int |
-getHeight() |
-
int |
-getId() |
-
java.lang.String |
-getName() |
-
ControllerInterface<?> |
-getParent() |
-
int |
-getPickingColor() |
-
processing.core.PVector |
-getPosition() |
-
ControllerProperty |
-getProperty(java.lang.String thePropertyName) |
-
ControllerProperty |
-getProperty(java.lang.String theSetter,
- java.lang.String theGetter) |
-
java.lang.String |
-getStringValue() |
-
Tab |
-getTab() |
-
float |
-getValue() |
-
int |
-getWidth() |
-
ControlWindow |
-getWindow() |
-
T |
-hide() |
-
void |
-init() |
-
boolean |
-isMouseOver() |
-
boolean |
-isUpdate() |
-
boolean |
-isVisible() |
-
void |
-keyEvent(processing.event.KeyEvent theEvent) |
-
T |
-moveTo(ControllerGroup<?> theGroup) |
-
T |
-moveTo(ControllerGroup<?> theGroup,
- Tab theTab,
- ControlWindow theWindow) |
-
ControllerInterface<?> |
-parent() |
-
T |
-registerProperty(java.lang.String thePropertyName) |
-
T |
-registerProperty(java.lang.String theSetter,
- java.lang.String theGetter) |
-
void |
-remove() |
-
T |
-remove(ControllerInterface<?> theElement) |
-
T |
-removeProperty(java.lang.String thePropertyName) |
-
T |
-removeProperty(java.lang.String theSetter,
- java.lang.String theGetter) |
-
T |
-setAbsolutePosition(processing.core.PVector thePVector) |
-
T |
-setAddress(java.lang.String theAddress) |
-
T |
-setArrayValue(float[] theArray) |
-
T |
-setArrayValue(int theIndex,
- float theValue) |
-
T |
-setCaptionLabel(java.lang.String theValue) |
-
T |
-setColor(CColor theColor) |
-
T |
-setColorActive(int theColor) |
-
T |
-setColorBackground(int theColor) |
-
T |
-setColorForeground(int theColor) |
-
T |
-setColorLabel(int theColor) |
-
T |
-setColorValue(int theColor) |
-
T |
-setId(int theValue) |
-
T |
-setLabel(java.lang.String theString) |
-
T |
-setMouseOver(boolean theFlag) |
-
boolean |
-setMousePressed(boolean theStatus) |
-
T |
-setPosition(float theX,
- float theY) |
-
T |
-setPosition(processing.core.PVector thePVector) |
-
T |
-setStringValue(java.lang.String theValue) |
-
T |
-setUpdate(boolean theFlag) |
-
T |
-setValue(float theValue) |
-
T |
-show() |
-
T |
-update() |
-
T |
-updateAbsolutePosition() |
-
T |
-updateEvents() |
-
T |
-updateInternalEvents(processing.core.PApplet theApplet)
-a method for putting input events like e.g.
- |
-
T add(ControllerInterface<?> theElement)-
T addListener(ControlListener theListener)-
T bringToFront()-
T bringToFront(ControllerInterface<?> theController)-
void continuousUpdateEvents()-
void draw(processing.core.PGraphics theGraphics)-
processing.core.PVector getAbsolutePosition()-
java.lang.String getAddress()-
float[] getArrayValue()-
float getArrayValue(int theIndex)-
CColor getColor()-
int getHeight()-
int getId()-
java.lang.String getName()-
ControllerInterface<?> getParent()-
int getPickingColor()-
processing.core.PVector getPosition()-
ControllerProperty getProperty(java.lang.String thePropertyName)-
ControllerProperty getProperty(java.lang.String theSetter, - java.lang.String theGetter)-
java.lang.String getStringValue()-
Tab getTab()-
float getValue()-
int getWidth()-
ControlWindow getWindow()-
T hide()-
void init()-
boolean isMouseOver()-
boolean isUpdate()-
boolean isVisible()-
void keyEvent(processing.event.KeyEvent theEvent)-
T moveTo(ControllerGroup<?> theGroup)-
T moveTo(ControllerGroup<?> theGroup, - Tab theTab, - ControlWindow theWindow)-
ControllerInterface<?> parent()-
T registerProperty(java.lang.String thePropertyName)-
T registerProperty(java.lang.String theSetter, - java.lang.String theGetter)-
void remove()-
T remove(ControllerInterface<?> theElement)-
T removeProperty(java.lang.String thePropertyName)-
T removeProperty(java.lang.String theSetter, - java.lang.String theGetter)-
T setAbsolutePosition(processing.core.PVector thePVector)-
T setAddress(java.lang.String theAddress)-
T setArrayValue(float[] theArray)-
T setArrayValue(int theIndex, - float theValue)-
T setCaptionLabel(java.lang.String theValue)-
T setColorActive(int theColor)-
T setColorBackground(int theColor)-
T setColorForeground(int theColor)-
T setColorLabel(int theColor)-
T setColorValue(int theColor)-
T setId(int theValue)-
T setLabel(java.lang.String theString)-
T setMouseOver(boolean theFlag)-
boolean setMousePressed(boolean theStatus)-
T setPosition(float theX, - float theY)-
T setPosition(processing.core.PVector thePVector)-
T setStringValue(java.lang.String theValue)-
T setUpdate(boolean theFlag)-
T setValue(float theValue)-
T show()-
T update()-
T updateAbsolutePosition()-
T updateEvents()-
T updateInternalEvents(processing.core.PApplet theApplet)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControllerList.html b/reference/controlP5/ControllerList.html deleted file mode 100644 index 1e128ca..0000000 --- a/reference/controlP5/ControllerList.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - -public class ControllerList
-extends java.lang.Object
-Constructor and Description | -
---|
ControllerList() |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-add(ControllerInterface<?> theController) |
-
java.util.List<ControllerInterface<?>> |
-get() |
-
ControllerInterface<?> |
-get(int theIndex) |
-
CDrawable |
-getDrawable(int theIndex) |
-
java.util.List<CDrawable> |
-getDrawables() |
-
int |
-size() |
-
int |
-sizeDrawable() |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void add(ControllerInterface<?> theController)-
public java.util.List<ControllerInterface<?>> get()-
public ControllerInterface<?> get(int theIndex)-
public CDrawable getDrawable(int theIndex)-
public java.util.List<CDrawable> getDrawables()-
public int size()-
public int sizeDrawable()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControllerPlug.html b/reference/controlP5/ControllerPlug.html deleted file mode 100644 index 67bb1a6..0000000 --- a/reference/controlP5/ControllerPlug.html +++ /dev/null @@ -1,401 +0,0 @@ - - - - - -public class ControllerPlug
-extends java.lang.Object
-/**
-* ControlP5 plugTo
-*
-* This example demonstrate how to use the plugTo method to
-* connect a controller to a field or method of a particular object.
-*
-*
-* find a list of public methods available for the ControlP5 Controller
-* at the bottom of this sketch.
-*
-* by Andreas Schlegel, 2011
-* www.sojamo.de/libraries/controlp5
-*
-*/
-
-import controlP5.*;
-import processing.opengl.*;
-
-ControlP5 controlP5;
-
-Test[] testarray;
-
-Test test;
-
-Button b;
-
-int cnt;
-
-void setup() {
- size(600,400);
- smooth();
- test = new Test(50);
- testarray = new Test[10];
- for(int i=0;i<10;i++) {
- testarray[i] = new Test(200 + i*20);
- }
-
- controlP5 = new ControlP5(this);
-
- controlP5.begin(100,20);
-
- b = controlP5.addButton("trigger",1);
- b.setColorBackground(ControlP5.RED);
-
- controlP5.addButton("plug",2);
- controlP5.addButton("unplug",3);
-
- // b is a button previously added to controlP5 with name 'trigger'
- // controlP5 no tries to find a field or method inside object test
- // in order to connect controller 'trigger' with test.trigger()
- b.plugTo(test);
- controlP5.end();
-}
-
-// connects controller 'trigger' with objects of type Test contained
-// inside arrat testarray
-void plug(int theValue) {
- b.plugTo(testarray);
- b.setColorBackground(ControlP5.GREEN);
- println("plugging controller b1 to array 'testarray' and variable 'test'.");
-}
-
-// disconnects controller 'trigger' from objects of type Test stored
-// inside array testarray
-void unplug(int theValue) {
- b.unplugFrom(testarray);
- b.setColorBackground(ControlP5.RED);
- println("removing array 'testarray' and variable 'test' from controller b1.");
-}
-
-
-void draw() {
- background(0);
- fill(255);
- for(int i=0;i<10;i++) {
- testarray[i].display();
- }
- test.display();
- cnt++;
- if(cnt%30 == 0) {
- controlP5.getController("trigger").update();
- }
-}
-
-
-class Test {
- float n0 = 0;
- float n1 = 1;
- float x;
-
- Test(float theX) {
- x = theX;
- }
-
- void trigger(int theValue) {
- n1 = random(100);
- }
-
- void display() {
- n0 += (n1-n0) * 0.1;
- rect(x,200,10,n0);
- }
-
- void controlEvent(ControlEvent theEvent) {
- //println("\t\t b1 event sub \n\n");
- }
-}
-
-
-
Constructor and Description | -
---|
ControllerPlug(java.lang.Object theObject,
- java.lang.String theName,
- int theType,
- int theParameterType,
- java.lang.Class<?>[] theAcceptClassList) |
-
Modifier and Type | -Method and Description | -
---|---|
static boolean |
-checkPlug(java.lang.Object theObject,
- java.lang.String thePlugName,
- java.lang.Class<?>[] theArgs) |
-
void |
-set(java.lang.Object theObject,
- java.lang.String theName,
- int theType,
- int theParameterType,
- java.lang.Class<?>[] theAcceptClassList) |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ControllerPlug(java.lang.Object theObject, - java.lang.String theName, - int theType, - int theParameterType, - java.lang.Class<?>[] theAcceptClassList)-
public static boolean checkPlug(java.lang.Object theObject, - java.lang.String thePlugName, - java.lang.Class<?>[] theArgs)-
public void set(java.lang.Object theObject, - java.lang.String theName, - int theType, - int theParameterType, - java.lang.Class<?>[] theAcceptClassList)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControllerProperties.html b/reference/controlP5/ControllerProperties.html deleted file mode 100644 index 10c83ab..0000000 --- a/reference/controlP5/ControllerProperties.html +++ /dev/null @@ -1,1040 +0,0 @@ - - - - - -public class ControllerProperties
-extends java.lang.Object
-/**
- * ControlP5 Properties
- *
- *
- * saves controller values to a properties-file
- * loads controller values from a properties-file
- *
- * Properties will only save values not the Controller itself.
- *
- * Also take a look at the use/ControlP5snapshot example to
- * save controller values to memory.
- *
- * Use ControllerProperties to load and save serialized controller properties
- * to a properties file.
- * The controllers implementing save/load properties so far are
- * Slider, Knob, Numberbox, Toggle, Checkbox, RadioButton, Textlabel,
- * Matrix, Range, Textarea, ListBox, Dropdown, ColorPicker.
- * Properties are currently saved in the java serialization format.
- *
- * saveProperties(String theFilename) and loadProperties(String theFilename)
- * by default properties will be saved to your sketch folder as controlP5.ser
- * if that file already exists it will be overwritten. for custom property files
- * see the comments inside keyPressed() below.
- *
- * find a list of public methods available for the ControllerProperties class
- * at the bottom of this sketch's source code
- *
- * default properties load/save key combinations are
- * alt+shift+l to load properties
- * alt+shift+s to save properties
- *
- * by andreas schlegel, 2012
- * www.sojamo.de/libraries/controlp5
- *
- */
-
-import controlP5.*;
-
-ControlP5 cp5;
-public int myColor = color(0, 0, 0);
-
-public int sliderValue = 100;
-public int sliderTicks1 = 100;
-public int sliderTicks2 = 30;
-
-
-void setup() {
- size(700, 400);
- noStroke();
-
- cp5 = new ControlP5(this);
-
- cp5.addSlider("slider")
- .setBroadcast(false)
- .setRange(0, 200)
- .setPosition(20, 100)
- .setSize(10, 100)
- .setBroadcast(true)
- .setValue(100)
- ;
-
- cp5.addSlider("sliderTicks1")
- .setRange(0, 255)
- .setPosition(100, 100)
- .setSize(10, 100)
- .setNumberOfTickMarks(5)
- ;
-
- cp5.addSlider("sliderValue")
- .setRange(0, 255)
- .setValue(128)
- .setPosition(200, 180)
- .setSize(100, 10)
- ;
-
- cp5.addSlider("sliderTicks2")
- .setRange(0, 255)
- .setValue(128)
- .setPosition(200, 220)
- .setSize(100, 10)
- .setNumberOfTickMarks(7)
- .setSliderMode(Slider.FLEXIBLE)
- ;
-
-}
-
-void draw() {
- background(sliderTicks1);
-
- fill(sliderValue);
- rect(0, 0, width, 100);
-
- fill(myColor);
- rect(0, 300, width, 70);
-
- fill(sliderTicks2);
- rect(0, 370, width, 30);
-}
-
-public void slider(float theColor) {
- myColor = color(theColor);
- println("a slider event. setting background to "+theColor);
-}
-
-void keyPressed() {
- // default properties load/save key combinations are
- // alt+shift+l to load properties
- // alt+shift+s to save properties
- if (key=='1') {
- cp5.saveProperties(("hello.properties"));
- }
- else if (key=='2') {
- cp5.loadProperties(("hello.properties"));
- }
-}
-
-/*
-a list of all methods available for the ControllerProperties Controller
-use ControlP5.printPublicMethodsFor(ControllerProperties.class);
-to print the following list into the console.
-
-You can find further details about class ControllerProperties in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-
-controlP5.ControllerProperties : ArrayList getSnapshotIndices()
-controlP5.ControllerProperties : ControllerProperties addSet(String)
-controlP5.ControllerProperties : ControllerProperties delete(ControllerProperty)
-controlP5.ControllerProperties : ControllerProperties getSnapshot(String)
-controlP5.ControllerProperties : ControllerProperties move(ControllerInterface, String, String)
-controlP5.ControllerProperties : ControllerProperties move(ControllerProperty, String, String)
-controlP5.ControllerProperties : ControllerProperties only(ControllerProperty, String)
-controlP5.ControllerProperties : ControllerProperties print()
-controlP5.ControllerProperties : ControllerProperties register(ControllerInterface, String)
-controlP5.ControllerProperties : ControllerProperties remove(ControllerInterface)
-controlP5.ControllerProperties : ControllerProperties remove(ControllerInterface, String)
-controlP5.ControllerProperties : ControllerProperties remove(ControllerInterface, String, String)
-controlP5.ControllerProperties : ControllerProperties removeSnapshot(String)
-controlP5.ControllerProperties : ControllerProperties saveSnapshot(String)
-controlP5.ControllerProperties : ControllerProperties saveSnapshotAs(String, String)
-controlP5.ControllerProperties : ControllerProperties setSnapshot(String)
-controlP5.ControllerProperties : ControllerProperties updateSnapshot(String)
-controlP5.ControllerProperties : ControllerProperty getProperty(ControllerInterface, String)
-controlP5.ControllerProperties : ControllerProperty getProperty(ControllerInterface, String, String)
-controlP5.ControllerProperties : ControllerProperty register(ControllerInterface, String, String)
-controlP5.ControllerProperties : HashSet getPropertySet(ControllerInterface)
-controlP5.ControllerProperties : List get(ControllerInterface)
-controlP5.ControllerProperties : Map get()
-controlP5.ControllerProperties : String toString()
-controlP5.ControllerProperties : boolean load()
-controlP5.ControllerProperties : boolean load(String)
-controlP5.ControllerProperties : boolean save()
-controlP5.ControllerProperties : boolean saveAs(String)
-controlP5.ControllerProperties : void setFormat(Format)
-java.lang.Object : String toString()
-java.lang.Object : boolean equals(Object)
-
-
-*/
-
-
-
Modifier and Type | -Field and Description | -
---|---|
static int |
-CLOSE |
-
static java.lang.String |
-defaultName |
-
static java.util.logging.Logger |
-logger |
-
static int |
-OPEN |
-
Constructor and Description | -
---|
ControllerProperties(ControlP5 theControlP5) |
-
Modifier and Type | -Method and Description | -
---|---|
ControllerProperties |
-addSet(java.lang.String theSet) |
-
ControllerProperties |
-copy(ControllerInterface<?> theController,
- java.lang.String... theSet) |
-
ControllerProperties |
-copy(ControllerProperty theProperty,
- java.lang.String... theSet)
-copies a ControllerProperty from one set to other(s);
- |
-
ControllerProperties |
-delete(ControllerProperty theProperty)
-deletes a ControllerProperty from all Sets including the default set.
- |
-
java.util.Map<ControllerProperty,java.util.HashSet<java.lang.String>> |
-get() |
-
java.util.List<ControllerProperty> |
-get(ControllerInterface<?> theController) |
-
ControllerProperty |
-getProperty(ControllerInterface<?> theController,
- java.lang.String theProperty) |
-
ControllerProperty |
-getProperty(ControllerInterface<?> theController,
- java.lang.String theSetter,
- java.lang.String theGetter) |
-
java.util.HashSet<ControllerProperty> |
-getPropertySet(ControllerInterface<?> theController) |
-
ControllerProperties |
-getSnapshot(java.lang.String theKey)
-restores properties previously stored as snapshot in memory.
- |
-
java.util.ArrayList<java.lang.String> |
-getSnapshotIndices()
-properties stored in memory can be accessed by index, getSnapshotIndices() returns the index of the snapshot
- list.
- |
-
boolean |
-load()
-load properties from the default properties file 'controlP5.properties'
- |
-
boolean |
-load(java.lang.String thePropertiesPath) |
-
ControllerProperties |
-move(ControllerInterface<?> theController,
- java.lang.String fromSet,
- java.lang.String toSet) |
-
ControllerProperties |
-move(ControllerProperty theProperty,
- java.lang.String fromSet,
- java.lang.String toSet)
-Moves a ControllerProperty from one set to another.
- |
-
ControllerProperties |
-only(ControllerProperty theProperty,
- java.lang.String theSet)
-stores a ControllerProperty in one particular set only.
- |
-
ControllerProperties |
-print() |
-
ControllerProperties |
-register(ControllerInterface<?> theController,
- java.lang.String theProperty)
-registering a property with only one parameter assumes that there is a setter and getter function present for the
- Controller.
- |
-
ControllerProperty |
-register(ControllerInterface<?> theController,
- java.lang.String thePropertySetter,
- java.lang.String thePropertyGetter)
-adds a property based on names of setter and getter methods of a controller.
- |
-
ControllerProperties |
-remove(ControllerInterface<?> theController) |
-
ControllerProperties |
-remove(ControllerInterface<?> theController,
- java.lang.String... theSet) |
-
ControllerProperties |
-remove(ControllerInterface<?> theController,
- java.lang.String theProperty) |
-
ControllerProperties |
-remove(ControllerInterface<?> theController,
- java.lang.String theSetter,
- java.lang.String theGetter) |
-
ControllerProperties |
-remove(ControllerProperty theProperty,
- java.lang.String... theSet)
-removes a ControllerProperty from one or multiple sets.
- |
-
ControllerProperties |
-removeSnapshot(java.lang.String theKey)
-removes a snapshot by key.
- |
-
boolean |
-save()
-saves all registered properties into the default 'controlP5.properties' file into your sketch folder.
- |
-
boolean |
-saveAs(java.lang.String thePropertiesPath)
-saves all registered properties into a file specified by parameter thePropertiesPath.
- |
-
boolean |
-saveAs(java.lang.String thePropertiesPath,
- java.lang.String... theSets)
-saves a list of properties sets into a file specified by parameter thePropertiesPath.
- |
-
ControllerProperties |
-saveSnapshot(java.lang.String theKey)
-saves a snapshot into your sketch's sketch folder.
- |
-
ControllerProperties |
-saveSnapshotAs(java.lang.String thePropertiesPath,
- java.lang.String theKey)
-saves a snapshot to the file with path given by the first parameter (thePropertiesPath).
- |
-
void |
-setFormat(controlP5.ControllerProperties.PropertiesStorageFormat theFormat)
-use ControllerProperties.SERIALIZED, ControllerProperties.XML or ControllerProperties.JSON as parameter.
- |
-
ControllerProperties |
-setSnapshot(java.lang.String theKey)
-logs all registered properties in memory.
- |
-
java.lang.String |
-toString() |
-
ControllerProperties |
-updateSnapshot(java.lang.String theKey)
-convenience method, setSnapshot(String) also works here since it will override existing log with the same key.
- |
-
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final int CLOSE-
public static java.lang.String defaultName-
public static final java.util.logging.Logger logger-
public static final int OPEN-
public ControllerProperties(ControlP5 theControlP5)-
public ControllerProperties addSet(java.lang.String theSet)-
public ControllerProperties copy(ControllerInterface<?> theController, - java.lang.String... theSet)-
public ControllerProperties copy(ControllerProperty theProperty, - java.lang.String... theSet)-
public ControllerProperties delete(ControllerProperty theProperty)-
public java.util.Map<ControllerProperty,java.util.HashSet<java.lang.String>> get()-
public java.util.List<ControllerProperty> get(ControllerInterface<?> theController)-
public ControllerProperty getProperty(ControllerInterface<?> theController, - java.lang.String theProperty)-
public ControllerProperty getProperty(ControllerInterface<?> theController, - java.lang.String theSetter, - java.lang.String theGetter)-
public java.util.HashSet<ControllerProperty> getPropertySet(ControllerInterface<?> theController)-
public ControllerProperties getSnapshot(java.lang.String theKey)-
setSnapshot(String)
public java.util.ArrayList<java.lang.String> getSnapshotIndices()-
public boolean load()-
public boolean load(java.lang.String thePropertiesPath)-
public ControllerProperties move(ControllerInterface<?> theController, - java.lang.String fromSet, - java.lang.String toSet)-
public ControllerProperties move(ControllerProperty theProperty, - java.lang.String fromSet, - java.lang.String toSet)-
public ControllerProperties only(ControllerProperty theProperty, - java.lang.String theSet)-
public ControllerProperties print()-
public ControllerProperties register(ControllerInterface<?> theController, - java.lang.String theProperty)-
theProperty
- public ControllerProperty register(ControllerInterface<?> theController, - java.lang.String thePropertySetter, - java.lang.String thePropertyGetter)-
thePropertySetter
- thePropertyGetter
- public ControllerProperties remove(ControllerInterface<?> theController)-
public ControllerProperties remove(ControllerInterface<?> theController, - java.lang.String... theSet)-
public ControllerProperties remove(ControllerInterface<?> theController, - java.lang.String theProperty)-
public ControllerProperties remove(ControllerInterface<?> theController, - java.lang.String theSetter, - java.lang.String theGetter)-
public ControllerProperties remove(ControllerProperty theProperty, - java.lang.String... theSet)-
public ControllerProperties removeSnapshot(java.lang.String theKey)-
public boolean save()-
public boolean saveAs(java.lang.String thePropertiesPath)-
public boolean saveAs(java.lang.String thePropertiesPath, - java.lang.String... theSets)-
public ControllerProperties saveSnapshot(java.lang.String theKey)-
public ControllerProperties saveSnapshotAs(java.lang.String thePropertiesPath, - java.lang.String theKey)-
public void setFormat(controlP5.ControllerProperties.PropertiesStorageFormat theFormat)-
public ControllerProperties setSnapshot(java.lang.String theKey)-
theKey
- getSnapshot(String)
public java.lang.String toString()-
toString
in class java.lang.Object
public ControllerProperties updateSnapshot(java.lang.String theKey)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControllerProperty.html b/reference/controlP5/ControllerProperty.html deleted file mode 100644 index c5428cd..0000000 --- a/reference/controlP5/ControllerProperty.html +++ /dev/null @@ -1,456 +0,0 @@ - - - - - -public class ControllerProperty
-extends java.lang.Object
-implements java.io.Serializable, java.lang.Cloneable
-/**
- * ControlP5 Properties
- *
- *
- * saves controller values to a properties-file
- * loads controller values from a properties-file
- *
- * Properties will only save values not the Controller itself.
- *
- * Also take a look at the use/ControlP5snapshot example to
- * save controller values to memory.
- *
- * Use ControllerProperties to load and save serialized controller properties
- * to a properties file.
- * The controllers implementing save/load properties so far are
- * Slider, Knob, Numberbox, Toggle, Checkbox, RadioButton, Textlabel,
- * Matrix, Range, Textarea, ListBox, Dropdown, ColorPicker.
- * Properties are currently saved in the java serialization format.
- *
- * saveProperties(String theFilename) and loadProperties(String theFilename)
- * by default properties will be saved to your sketch folder as controlP5.ser
- * if that file already exists it will be overwritten. for custom property files
- * see the comments inside keyPressed() below.
- *
- * find a list of public methods available for the ControllerProperties class
- * at the bottom of this sketch's source code
- *
- * default properties load/save key combinations are
- * alt+shift+l to load properties
- * alt+shift+s to save properties
- *
- * by andreas schlegel, 2012
- * www.sojamo.de/libraries/controlp5
- *
- */
-
-import controlP5.*;
-
-ControlP5 cp5;
-public int myColor = color(0, 0, 0);
-
-public int sliderValue = 100;
-public int sliderTicks1 = 100;
-public int sliderTicks2 = 30;
-
-
-void setup() {
- size(700, 400);
- noStroke();
-
- cp5 = new ControlP5(this);
-
- cp5.addSlider("slider")
- .setBroadcast(false)
- .setRange(0, 200)
- .setPosition(20, 100)
- .setSize(10, 100)
- .setBroadcast(true)
- .setValue(100)
- ;
-
- cp5.addSlider("sliderTicks1")
- .setRange(0, 255)
- .setPosition(100, 100)
- .setSize(10, 100)
- .setNumberOfTickMarks(5)
- ;
-
- cp5.addSlider("sliderValue")
- .setRange(0, 255)
- .setValue(128)
- .setPosition(200, 180)
- .setSize(100, 10)
- ;
-
- cp5.addSlider("sliderTicks2")
- .setRange(0, 255)
- .setValue(128)
- .setPosition(200, 220)
- .setSize(100, 10)
- .setNumberOfTickMarks(7)
- .setSliderMode(Slider.FLEXIBLE)
- ;
-
-}
-
-void draw() {
- background(sliderTicks1);
-
- fill(sliderValue);
- rect(0, 0, width, 100);
-
- fill(myColor);
- rect(0, 300, width, 70);
-
- fill(sliderTicks2);
- rect(0, 370, width, 30);
-}
-
-public void slider(float theColor) {
- myColor = color(theColor);
- println("a slider event. setting background to "+theColor);
-}
-
-void keyPressed() {
- // default properties load/save key combinations are
- // alt+shift+l to load properties
- // alt+shift+s to save properties
- if (key=='1') {
- cp5.saveProperties(("hello.properties"));
- }
- else if (key=='2') {
- cp5.loadProperties(("hello.properties"));
- }
-}
-
-/*
-a list of all methods available for the ControllerProperties Controller
-use ControlP5.printPublicMethodsFor(ControllerProperties.class);
-to print the following list into the console.
-
-You can find further details about class ControllerProperties in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-
-controlP5.ControllerProperties : ArrayList getSnapshotIndices()
-controlP5.ControllerProperties : ControllerProperties addSet(String)
-controlP5.ControllerProperties : ControllerProperties delete(ControllerProperty)
-controlP5.ControllerProperties : ControllerProperties getSnapshot(String)
-controlP5.ControllerProperties : ControllerProperties move(ControllerInterface, String, String)
-controlP5.ControllerProperties : ControllerProperties move(ControllerProperty, String, String)
-controlP5.ControllerProperties : ControllerProperties only(ControllerProperty, String)
-controlP5.ControllerProperties : ControllerProperties print()
-controlP5.ControllerProperties : ControllerProperties register(ControllerInterface, String)
-controlP5.ControllerProperties : ControllerProperties remove(ControllerInterface)
-controlP5.ControllerProperties : ControllerProperties remove(ControllerInterface, String)
-controlP5.ControllerProperties : ControllerProperties remove(ControllerInterface, String, String)
-controlP5.ControllerProperties : ControllerProperties removeSnapshot(String)
-controlP5.ControllerProperties : ControllerProperties saveSnapshot(String)
-controlP5.ControllerProperties : ControllerProperties saveSnapshotAs(String, String)
-controlP5.ControllerProperties : ControllerProperties setSnapshot(String)
-controlP5.ControllerProperties : ControllerProperties updateSnapshot(String)
-controlP5.ControllerProperties : ControllerProperty getProperty(ControllerInterface, String)
-controlP5.ControllerProperties : ControllerProperty getProperty(ControllerInterface, String, String)
-controlP5.ControllerProperties : ControllerProperty register(ControllerInterface, String, String)
-controlP5.ControllerProperties : HashSet getPropertySet(ControllerInterface)
-controlP5.ControllerProperties : List get(ControllerInterface)
-controlP5.ControllerProperties : Map get()
-controlP5.ControllerProperties : String toString()
-controlP5.ControllerProperties : boolean load()
-controlP5.ControllerProperties : boolean load(String)
-controlP5.ControllerProperties : boolean save()
-controlP5.ControllerProperties : boolean saveAs(String)
-controlP5.ControllerProperties : void setFormat(Format)
-java.lang.Object : String toString()
-java.lang.Object : boolean equals(Object)
-
-
-*/
-
-
-
Modifier and Type | -Method and Description | -
---|---|
void |
-disable() |
-
void |
-enable() |
-
boolean |
-equals(java.lang.Object o) |
-
int |
-hashCode() |
-
java.lang.String |
-toString() |
-
getClass, notify, notifyAll, wait, wait, wait
public void disable()-
public void enable()-
public boolean equals(java.lang.Object o)-
equals
in class java.lang.Object
public int hashCode()-
hashCode
in class java.lang.Object
public java.lang.String toString()-
toString
in class java.lang.Object
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControllerStyle.html b/reference/controlP5/ControllerStyle.html deleted file mode 100644 index f01b108..0000000 --- a/reference/controlP5/ControllerStyle.html +++ /dev/null @@ -1,784 +0,0 @@ - - - - - -public class ControllerStyle
-extends java.lang.Object
-implements java.io.Serializable
-Label.getStyle()
,
-Serialized Form/**
-* ControlP5 ControllerStyle
-*
-*
-* find a list of public methods available for the ControllerStyle Controller
-* at the bottom of this sketch.
-*
-* by Andreas Schlegel, 2011
-* www.sojamo.de/libraries/controlp5
-*
-*/
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-float v1 = 50, v2 = 100, v3 = 100, v4 = 100;
-
-void setup() {
- size(400,600);
- smooth();
- noStroke();
- cp5 = new ControlP5(this);
-
- cp5.begin(100,100);
- cp5.addSlider("v1",0,255).linebreak();
- cp5.addSlider("v2",0,200).linebreak();
- cp5.addSlider("v3",0,300).linebreak();
- cp5.addSlider("v4",0,400);
- cp5.end();
-
- // change the caption label for controller v1 and apply styles
- cp5.getController("v1").setCaptionLabel("Background");
- style("v1");
-
- // change the caption label for controller v2 and apply styles
- cp5.getController("v2").setCaptionLabel("Ellipse A");
- style("v2");
-
- // change the caption label for controller v3 and apply styles
- cp5.getController("v3").setCaptionLabel("Ellipse B");
- style("v3");
-
- // change the caption label for controller v3 and apply styles
- cp5.getController("v4").setCaptionLabel("Ellipse C");
- style("v4");
-
-
-}
-
-void style(String theControllerName) {
- Controller c = cp5.getController(theControllerName);
- // adjust the height of the controller
- c.setHeight(15);
-
- // add some padding to the caption label background
- c.getCaptionLabel().getStyle().setPadding(4,4,3,4);
-
- // shift the caption label up by 4px
- c.getCaptionLabel().getStyle().setMargin(-4,0,0,0);
-
- // set the background color of the caption label
- c.getCaptionLabel().setColorBackground(color(10,20,30,140));
-}
-
-void draw() {
- background(v1);
- fill(255,255,220,100);
- ellipse(width/2-100, height/2-100,v2 + 50,v2 + 50);
- ellipse(width/2+100, height/2,v3,v3);
- ellipse(width/2, height/2+100,v4,v4);
-}
-
-
-
-/*
-a list of all methods available for the ControllerStyle Controller
-use ControlP5.printPublicMethodsFor(ControllerStyle.class);
-to print the following list into the console.
-
-You can find further details about class ControllerStyle in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-
-
-
-controlP5.ControllerStyle : ControllerStyle margin(int)
-controlP5.ControllerStyle : ControllerStyle margin(int, int, int, int)
-controlP5.ControllerStyle : ControllerStyle moveMargin(int, int, int, int)
-controlP5.ControllerStyle : ControllerStyle movePadding(int, int, int, int)
-controlP5.ControllerStyle : ControllerStyle padding(int)
-controlP5.ControllerStyle : ControllerStyle padding(int, int, int, int)
-controlP5.ControllerStyle : ControllerStyle setMargin(int, int, int, int)
-controlP5.ControllerStyle : ControllerStyle setMarginBottom(int)
-controlP5.ControllerStyle : ControllerStyle setMarginLeft(int)
-controlP5.ControllerStyle : ControllerStyle setMarginRight(int)
-controlP5.ControllerStyle : ControllerStyle setMarginTop(int)
-controlP5.ControllerStyle : ControllerStyle setPadding(int, int, int, int)
-controlP5.ControllerStyle : ControllerStyle setPaddingBottom(int)
-controlP5.ControllerStyle : ControllerStyle setPaddingLeft(int)
-controlP5.ControllerStyle : ControllerStyle setPaddingRight(int)
-controlP5.ControllerStyle : ControllerStyle setPaddingTop(int)
-java.lang.Object : String toString()
-java.lang.Object : boolean equals(Object)
-
-
-*/
-
-
Modifier and Type | -Field and Description | -
---|---|
int |
-background |
-
int |
-backgroundHeight |
-
int |
-backgroundWidth |
-
int |
-color |
-
int |
-marginBottom |
-
int |
-marginLeft |
-
int |
-marginRight |
-
int |
-marginTop |
-
int |
-paddingBottom |
-
int |
-paddingLeft |
-
int |
-paddingRight |
-
int |
-paddingTop |
-
Constructor and Description | -
---|
ControllerStyle() |
-
Modifier and Type | -Method and Description | -
---|---|
ControllerStyle |
-margin(int theValue) |
-
ControllerStyle |
-margin(int theTop,
- int theRight,
- int theBottom,
- int theLeft) |
-
ControllerStyle |
-moveMargin(int theTop,
- int theRight,
- int theBottom,
- int theLeft) |
-
ControllerStyle |
-movePadding(int theTop,
- int theRight,
- int theBottom,
- int theLeft) |
-
ControllerStyle |
-padding(int theValue) |
-
ControllerStyle |
-padding(int theTop,
- int theRight,
- int theBottom,
- int theLeft) |
-
ControllerStyle |
-setMargin(int theTop,
- int theRight,
- int theBottom,
- int theLeft) |
-
ControllerStyle |
-setMarginBottom(int theValue) |
-
ControllerStyle |
-setMarginLeft(int theValue) |
-
ControllerStyle |
-setMarginRight(int theValue) |
-
ControllerStyle |
-setMarginTop(int theValue) |
-
ControllerStyle |
-setPadding(int theTop,
- int theRight,
- int theBottom,
- int theLeft) |
-
ControllerStyle |
-setPaddingBottom(int theValue) |
-
ControllerStyle |
-setPaddingLeft(int theValue) |
-
ControllerStyle |
-setPaddingRight(int theValue) |
-
ControllerStyle |
-setPaddingTop(int theValue) |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public int background-
public int backgroundHeight-
public int backgroundWidth-
public int color-
public int marginBottom-
public int marginLeft-
public int marginRight-
public int marginTop-
public int paddingBottom-
public int paddingLeft-
public int paddingRight-
public int paddingTop-
public ControllerStyle margin(int theValue)-
public ControllerStyle margin(int theTop, - int theRight, - int theBottom, - int theLeft)-
public ControllerStyle moveMargin(int theTop, - int theRight, - int theBottom, - int theLeft)-
public ControllerStyle movePadding(int theTop, - int theRight, - int theBottom, - int theLeft)-
public ControllerStyle padding(int theValue)-
public ControllerStyle padding(int theTop, - int theRight, - int theBottom, - int theLeft)-
public ControllerStyle setMargin(int theTop, - int theRight, - int theBottom, - int theLeft)-
public ControllerStyle setMarginBottom(int theValue)-
public ControllerStyle setMarginLeft(int theValue)-
public ControllerStyle setMarginRight(int theValue)-
public ControllerStyle setMarginTop(int theValue)-
public ControllerStyle setPadding(int theTop, - int theRight, - int theBottom, - int theLeft)-
public ControllerStyle setPaddingBottom(int theValue)-
public ControllerStyle setPaddingLeft(int theValue)-
public ControllerStyle setPaddingRight(int theValue)-
public ControllerStyle setPaddingTop(int theValue)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ControllerView.html b/reference/controlP5/ControllerView.html deleted file mode 100644 index cf4243d..0000000 --- a/reference/controlP5/ControllerView.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - -public interface ControllerView<T>
-controlP5.draw(processing.core.PApplet)
,
-controlP5.setView(ControlleView)
void display(processing.core.PGraphics theGraphics, - T theController)-
theApplet
- theController
- processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/DropdownList.html b/reference/controlP5/DropdownList.html deleted file mode 100644 index 6931853..0000000 --- a/reference/controlP5/DropdownList.html +++ /dev/null @@ -1,1130 +0,0 @@ - - - - - -public class DropdownList -extends ControlGroup<DropdownList>-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
DropdownList(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend DropdownList.
- |
-
Modifier and Type | -Method and Description | -
---|---|
DropdownList |
-actAsPulldownMenu(boolean theValue)
-Enables a ListBox to act as a pulldown menu.
- |
-
ListBoxItem |
-addItem(java.lang.String theName,
- int theValue)
-Adds an item to the ListBox.
- |
-
DropdownList |
-addItems(java.util.List<?> theItems) |
-
DropdownList |
-addItems(java.util.List<?> theItems,
- int theOffset) |
-
DropdownList |
-addItems(java.lang.String[] theItems)
-adds a list of items from a string array.
- |
-
void |
-beginItems() |
-
DropdownList |
-clear()
-Removes all items from a list box
- |
-
void |
-controlEvent(ControlEvent theEvent)
-controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about
- value changes.
- |
-
void |
-endItems() |
-
ListBoxItem |
-getItem(Controller<?> theButton)
-returns a ListBoxItem based on its Button reference.
- |
-
ListBoxItem |
-getItem(int theIndex)
-returns a listBoxItem by index in the list of items.
- |
-
ListBoxItem |
-getItem(java.lang.String theItemName)
-TODO faulty returns a listBoxItem by name.
- |
-
java.lang.String[][] |
-getListBoxItems() |
-
float |
-getScrollPosition() |
-
java.lang.String |
-getStringValue() |
-
DropdownList |
-hideScrollbar() |
-
boolean |
-isScrollable() |
-
boolean |
-isScrollbarEnabled() |
-
void |
-keyEvent(processing.event.KeyEvent theEvent)
-Adding key support.
- |
-
DropdownList |
-removeItem(java.lang.String theItemName)
-Removes an item from the ListBox using the unique name of the item given when added to the
- list.
- |
-
DropdownList |
-scroll(float theValue)
-scroll the scrollList remotely.
- |
-
void |
-scrolled(int theStep) |
-
DropdownList |
-setColor(CColor theColor) |
-
DropdownList |
-setColorActive(int theColor) |
-
DropdownList |
-setColorBackground(int theColor) |
-
DropdownList |
-setColorForeground(int theColor) |
-
DropdownList |
-setColorLabel(int theColor) |
-
DropdownList |
-setColorValue(int theColor) |
-
DropdownList |
-setHeight(int theHeight) |
-
DropdownList |
-setIndex(int theIndex) |
-
DropdownList |
-setItemHeight(int theHeight) |
-
DropdownList |
-setListBoxItems(java.lang.String[][] l) |
-
DropdownList |
-setScrollbarVisible(boolean theValue) |
-
DropdownList |
-setScrollbarWidth(int theWidth) |
-
DropdownList |
-setSize(int theWidth,
- int theHeight) |
-
DropdownList |
-setValue(float theValue) |
-
DropdownList |
-setWidth(int theWidth) |
-
DropdownList |
-showScrollbar() |
-
DropdownList |
-toUpperCase(boolean theFlag) |
-
DropdownList |
-updateInternalEvents(processing.core.PApplet theApplet)
-a method for putting input events like e.g.
- |
-
DropdownList |
-updateListBoxItems() |
-
activateEvent, addListener, getBackgroundHeight, getBarHeight, getInfo, listenerSize, mousePressed, removeListener, setBackgroundColor, setBackgroundHeight, setBarHeight, stringValue, toString
absolutePosition, add, addCanvas, addCloseButton, addDrawable, arrayValue, bringToFront, bringToFront, close, color, continuousUpdateEvents, controller, disableCollapse, draw, enableCollapse, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getCaptionLabel, getColor, getController, getHeight, getId, getName, getParent, getPickingColor, getPosition, getProperty, getProperty, getTab, getValue, getValueLabel, getWidth, getWindow, hide, hideArrow, hideBar, id, init, isBarVisible, isCollapse, isMouseOver, isMoveable, isOpen, isUpdate, isVisible, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, name, open, parent, position, registerProperty, registerProperty, remove, remove, remove, removeCanvas, removeCloseButton, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setCaptionLabel, setGroup, setGroup, setId, setLabel, setMouseOver, setMousePressed, setMoveable, setOpen, setPosition, setPosition, setStringValue, setTab, setTab, setTab, setTitle, setUpdate, setVisible, show, showArrow, showBar, update, updateAbsolutePosition, updateEvents, value
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public DropdownList(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public DropdownList actAsPulldownMenu(boolean theValue)-
public ListBoxItem addItem(java.lang.String theName, - int theValue)-
theName
- StringtheValue
- intcontrolP5.ListBox#removeItem(String,int)
public DropdownList addItems(java.util.List<?> theItems)-
public DropdownList addItems(java.util.List<?> theItems, - int theOffset)-
public DropdownList addItems(java.lang.String[] theItems)-
theItems
- public void beginItems()-
public DropdownList clear()-
public void controlEvent(ControlEvent theEvent)-
ControlListener
controlEvent
in interface ControlListener
controlEvent
in class ControlGroup<DropdownList>
theEvent
- ControlEventCallbackListener
,
-CallbackEvent
public void endItems()-
public ListBoxItem getItem(Controller<?> theButton)-
theButton
- public ListBoxItem getItem(int theIndex)-
theIndex
- public ListBoxItem getItem(java.lang.String theItemName)-
theItemName
- public java.lang.String[][] getListBoxItems()-
public float getScrollPosition()-
public java.lang.String getStringValue()-
ControllerGroup
getStringValue
in interface ControllerInterface<DropdownList>
getStringValue
in class ControllerGroup<DropdownList>
public DropdownList hideScrollbar()-
public boolean isScrollable()-
public boolean isScrollbarEnabled()-
public void keyEvent(processing.event.KeyEvent theEvent)-
keyEvent
in interface ControllerInterface<DropdownList>
keyEvent
in class ControllerGroup<DropdownList>
theEvent
- KeyEventpublic DropdownList removeItem(java.lang.String theItemName)-
theItemName
- StringListBox.addItem(String,int)
public DropdownList scroll(float theValue)-
public void scrolled(int theStep)-
public DropdownList setColor(CColor theColor)-
setColor
in interface ControllerInterface<DropdownList>
setColor
in class ControllerGroup<DropdownList>
public DropdownList setColorActive(int theColor)-
setColorActive
in interface ControllerInterface<DropdownList>
setColorActive
in class ControllerGroup<DropdownList>
public DropdownList setColorBackground(int theColor)-
setColorBackground
in interface ControllerInterface<DropdownList>
setColorBackground
in class ControllerGroup<DropdownList>
public DropdownList setColorForeground(int theColor)-
setColorForeground
in interface ControllerInterface<DropdownList>
setColorForeground
in class ControllerGroup<DropdownList>
public DropdownList setColorLabel(int theColor)-
setColorLabel
in interface ControllerInterface<DropdownList>
setColorLabel
in class ControllerGroup<DropdownList>
public DropdownList setColorValue(int theColor)-
setColorValue
in interface ControllerInterface<DropdownList>
setColorValue
in class ControllerGroup<DropdownList>
public DropdownList setHeight(int theHeight)-
setHeight
in class ControllerGroup<DropdownList>
public DropdownList setIndex(int theIndex)-
public DropdownList setItemHeight(int theHeight)-
public DropdownList setListBoxItems(java.lang.String[][] l)-
public DropdownList setScrollbarVisible(boolean theValue)-
public DropdownList setScrollbarWidth(int theWidth)-
public DropdownList setSize(int theWidth, - int theHeight)-
setSize
in class ControlGroup<DropdownList>
public DropdownList setValue(float theValue)-
ControllerGroup
setValue
in interface ControllerInterface<DropdownList>
setValue
in class ControllerGroup<DropdownList>
public DropdownList setWidth(int theWidth)-
setWidth
in class ControllerGroup<DropdownList>
public DropdownList showScrollbar()-
public DropdownList toUpperCase(boolean theFlag)-
public DropdownList updateInternalEvents(processing.core.PApplet theApplet)-
ControllerInterface
updateInternalEvents
in interface ControllerInterface<DropdownList>
updateInternalEvents
in class ControlGroup<DropdownList>
public DropdownList updateListBoxItems()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/FrameRate.html b/reference/controlP5/FrameRate.html deleted file mode 100644 index 6c34eba..0000000 --- a/reference/controlP5/FrameRate.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - -public class FrameRate -extends Textlabel-
autoHeight, autoSpacing, autoWidth
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Modifier and Type | -Method and Description | -
---|---|
void |
-draw(processing.core.PGraphics theGraphics)
-the default draw function for each controller extending superclass Controller.
- |
-
FrameRate |
-setInterval(int theValue) |
-
append, draw, draw, draw, get, getLineHeight, setColor, setFont, setFont, setFont, setHeight, setLetterSpacing, setLineHeight, setMultiline, setStringValue, setText, setValue, setValue, setWidth, valueLabel
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getInfo, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, show, toString, unlock, unplugFrom, unplugFrom, unregisterTooltip, update, updateAbsolutePosition, updateEvents, updateInternalEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public void draw(processing.core.PGraphics theGraphics)-
Controller
draw
in interface CDrawable
draw
in interface ControllerInterface<Textlabel>
draw
in class Textlabel
ControllerView
public FrameRate setInterval(int theValue)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Group.html b/reference/controlP5/Group.html deleted file mode 100644 index e4b333a..0000000 --- a/reference/controlP5/Group.html +++ /dev/null @@ -1,464 +0,0 @@ - - - - - -public class Group -extends ControlGroup<Group>-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Group(ControlP5 theControlP5,
- ControllerGroup<?> theParent,
- java.lang.String theName,
- int theX,
- int theY,
- int theW,
- int theH) |
-
Group(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend Group.
- |
-
activateEvent, addListener, controlEvent, getBackgroundHeight, getBarHeight, getInfo, listenerSize, mousePressed, removeListener, setBackgroundColor, setBackgroundHeight, setBarHeight, setSize, stringValue, toString, updateInternalEvents
absolutePosition, add, addCanvas, addCloseButton, addDrawable, arrayValue, bringToFront, bringToFront, close, color, continuousUpdateEvents, controller, disableCollapse, draw, enableCollapse, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getCaptionLabel, getColor, getController, getHeight, getId, getName, getParent, getPickingColor, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getWidth, getWindow, hide, hideArrow, hideBar, id, init, isBarVisible, isCollapse, isMouseOver, isMoveable, isOpen, isUpdate, isVisible, keyEvent, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, name, open, parent, position, registerProperty, registerProperty, remove, remove, remove, removeCanvas, removeCloseButton, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorForeground, setColorLabel, setColorValue, setGroup, setGroup, setHeight, setId, setLabel, setMouseOver, setMousePressed, setMoveable, setOpen, setPosition, setPosition, setStringValue, setTab, setTab, setTab, setTitle, setUpdate, setValue, setVisible, setWidth, show, showArrow, showBar, update, updateAbsolutePosition, updateEvents, value
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public Group(ControlP5 theControlP5, - ControllerGroup<?> theParent, - java.lang.String theName, - int theX, - int theY, - int theW, - int theH)-
public Group(ControlP5 theControlP5, - java.lang.String theName)-
/**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Knob.html b/reference/controlP5/Knob.html deleted file mode 100644 index 4c78efa..0000000 --- a/reference/controlP5/Knob.html +++ /dev/null @@ -1,1403 +0,0 @@ - - - - - -public class Knob -extends Controller<Knob>-
/**
-* 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)
-
-
-*/
-
-
-
-
Modifier and Type | -Field and Description | -
---|---|
static int |
-autoHeight |
-
static int |
-autoWidth |
-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Knob(ControlP5 theControlP5,
- ControllerGroup<?> theParent,
- java.lang.String theName,
- float theMin,
- float theMax,
- float theDefaultValue,
- int theX,
- int theY,
- int theWidth) |
-
Knob(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend Knob.
- |
-
Modifier and Type | -Method and Description | -
---|---|
float |
-getAngle() |
-
float |
-getAngleRange() |
-
int |
-getDragDirection()
-Gets the drag direction which is either Controller.HORIZONTAL or Controller.VERTICAL.
- |
-
int |
-getNumberOfTickMarks() |
-
float |
-getRadius() |
-
float |
-getResolution() |
-
float |
-getStartAngle()
-get the start angle, 0 is at 3 o'clock.
- |
-
int |
-getTickMarkLength() |
-
float |
-getTickMarkWeight() |
-
float |
-getValue() |
-
int |
-getViewStyle() |
-
Knob |
-hideTickMarks() |
-
boolean |
-isConstrained() |
-
boolean |
-isShowAngleRange() |
-
boolean |
-isShowTickMarks() |
-
void |
-mousePressed() |
-
void |
-mouseReleasedOutside() |
-
Knob |
-scrolled(int theRotationValue)
-Changes the value of the knob when hovering and using the mouse wheel or the scroll function
- of a multi-touch track pad.
- |
-
Knob |
-setAngleRange(float theRange)
-set the range in between which the know operates.
- |
-
Knob |
-setConstrained(boolean theValue) |
-
Knob |
-setDragDirection(int theValue)
-Sets the drag direction, when controlling a knob, parameter is either Controller.HORIZONTAL
- or Controller.VERTICAL.
- |
-
Knob |
-setMax(float theValue)
-sets the maximum value of the Controller.
- |
-
Knob |
-setMin(float theValue)
-sets the minimum value of the Controller.
- |
-
Knob |
-setNumberOfTickMarks(int theNumber) |
-
Knob |
-setRadius(float theValue) |
-
Knob |
-setRange(float theMin,
- float theMax) |
-
Knob |
-setResolution(float theValue)
-resolution is a sensitivity value when dragging a knob.
- |
-
Knob |
-setScrollSensitivity(float theValue)
-Sets the sensitivity for the scroll behavior when using the mouse wheel or the scroll
- function of a multi-touch track pad.
- |
-
Knob |
-setShowAngleRange(boolean theValue) |
-
Knob |
-setSize(int theWidth,
- int theHeight) |
-
Knob |
-setStartAngle(float theAngle)
-The start angle is a value between 0 and TWO_PI.
- |
-
Knob |
-setTickMarkLength(int theLength) |
-
Knob |
-setTickMarkWeight(float theWeight) |
-
Knob |
-setValue(float theValue) |
-
Knob |
-setViewStyle(int theStyle)
-set the display style of a knob.
- |
-
Knob |
-showTickMarks() |
-
Knob |
-shuffle()
-Assigns a random value to the controller.
- |
-
Knob |
-snapToTickMarks(boolean theFlag) |
-
Knob |
-update()
-updates the value of the controller without having to set the value explicitly.
- |
-
Knob |
-updateDisplayMode(int theMode) |
-
Knob |
-updateInternalEvents(processing.core.PApplet theApplet)
-a method for putting input events like e.g.
- |
-
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, draw, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getInfo, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setHeight, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, setWidth, show, toString, unlock, unplugFrom, unplugFrom, unregisterTooltip, updateAbsolutePosition, updateEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public static int autoHeight-
public static int autoWidth-
public Knob(ControlP5 theControlP5, - ControllerGroup<?> theParent, - java.lang.String theName, - float theMin, - float theMax, - float theDefaultValue, - int theX, - int theY, - int theWidth)-
public Knob(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public float getAngle()-
public float getAngleRange()-
public int getDragDirection()-
public int getNumberOfTickMarks()-
public float getRadius()-
public float getResolution()-
public float getStartAngle()-
public int getTickMarkLength()-
public float getTickMarkWeight()-
public float getValue()-
getValue
in interface ControllerInterface<Knob>
getValue
in class Controller<Knob>
Controller.getStringValue()
,
-Controller.getArrayValue()
public int getViewStyle()-
public Knob hideTickMarks()-
public boolean isConstrained()-
public boolean isShowAngleRange()-
public boolean isShowTickMarks()-
public void mousePressed()-
public void mouseReleasedOutside()-
public Knob scrolled(int theRotationValue)-
public Knob setAngleRange(float theRange)-
public Knob setConstrained(boolean theValue)-
public Knob setDragDirection(int theValue)-
theValue
- must be Controller.HORIZONTAL or Controller.VERTICALpublic Knob setMax(float theValue)-
Controller
setMax
in class Controller<Knob>
theValue
- floatpublic Knob setMin(float theValue)-
Controller
setMin
in class Controller<Knob>
theValue
- floatpublic Knob setNumberOfTickMarks(int theNumber)-
public Knob setRadius(float theValue)-
public Knob setRange(float theMin, - float theMax)-
public Knob setResolution(float theValue)-
public Knob setScrollSensitivity(float theValue)-
theValue
- public Knob setShowAngleRange(boolean theValue)-
public Knob setSize(int theWidth, - int theHeight)-
setSize
in class Controller<Knob>
public Knob setStartAngle(float theAngle)-
public Knob setTickMarkLength(int theLength)-
public Knob setTickMarkWeight(float theWeight)-
public Knob setValue(float theValue)-
setValue
in interface ControllerInterface<Knob>
setValue
in class Controller<Knob>
theValue
- floatpublic Knob setViewStyle(int theStyle)-
theStyle
- use Knob.LINE, Knob.ELLIPSE or Knob.ARCpublic Knob showTickMarks()-
public Knob shuffle()-
public Knob snapToTickMarks(boolean theFlag)-
public Knob update()-
Controller
update
in interface ControllerInterface<Knob>
update
in class Controller<Knob>
Controller.setUpdate(boolean)
,
-Controller.isUpdate()
public Knob updateDisplayMode(int theMode)-
public Knob updateInternalEvents(processing.core.PApplet theApplet)-
ControllerInterface
updateInternalEvents
in interface ControllerInterface<Knob>
updateInternalEvents
in class Controller<Knob>
ControllerInterface.updateInternalEvents
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Label.html b/reference/controlP5/Label.html deleted file mode 100644 index fa3b885..0000000 --- a/reference/controlP5/Label.html +++ /dev/null @@ -1,1211 +0,0 @@ - - - - - -public class Label -extends java.lang.Object -implements CDrawable-
ControlFont
/**
-* ControlP5 Textlabel
-*
-*
-* find a list of public methods available for the Textlabel Controller
-* at the bottom of this sketch.
-*
-* by Andreas Schlegel, 2012
-* www.sojamo.de/libraries/controlp5
-*
-*/
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-Textlabel myTextlabelA;
-Textlabel myTextlabelB;
-
-void setup() {
- size(700,400);
- cp5 = new ControlP5(this);
-
- myTextlabelA = cp5.addTextlabel("label")
- .setText("A single ControlP5 textlabel, in yellow.")
- .setPosition(100,50)
- .setColorValue(0xffffff00)
- .setFont(createFont("Georgia",20))
- ;
-
- myTextlabelB = new Textlabel(cp5,"Another textlabel, not created through ControlP5 needs to be rendered separately by calling Textlabel.draw(PApplet).",100,100,400,200);
-
-}
-
-
-
-void draw() {
- background(0);
- myTextlabelB.draw(this);
-}
-
-
-
-/*
-a list of all methods available for the Textlabel Controller
-use ControlP5.printPublicMethodsFor(Textlabel.class);
-to print the following list into the console.
-
-You can find further details about class Textlabel in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-controlP5.Textlabel : Label get()
-controlP5.Textlabel : Textlabel setColor(int)
-controlP5.Textlabel : Textlabel setFont(ControlFont)
-controlP5.Textlabel : Textlabel setFont(PFont)
-controlP5.Textlabel : Textlabel setFont(int)
-controlP5.Textlabel : Textlabel setHeight(int)
-controlP5.Textlabel : Textlabel setLetterSpacing(int)
-controlP5.Textlabel : Textlabel setMultiline(boolean)
-controlP5.Textlabel : Textlabel setStringValue(String)
-controlP5.Textlabel : Textlabel setText(String)
-controlP5.Textlabel : Textlabel setValue(String)
-controlP5.Textlabel : Textlabel setValue(float)
-controlP5.Textlabel : Textlabel setWidth(int)
-controlP5.Textlabel : void draw()
-controlP5.Textlabel : void draw(PApplet)
-controlP5.Textlabel : void draw(int, int)
-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 : 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 : Textlabel addCallback(CallbackListener)
-controlP5.Controller : Textlabel addListener(ControlListener)
-controlP5.Controller : Textlabel bringToFront()
-controlP5.Controller : Textlabel bringToFront(ControllerInterface)
-controlP5.Controller : Textlabel hide()
-controlP5.Controller : Textlabel linebreak()
-controlP5.Controller : Textlabel listen(boolean)
-controlP5.Controller : Textlabel lock()
-controlP5.Controller : Textlabel plugTo(Object)
-controlP5.Controller : Textlabel plugTo(Object, String)
-controlP5.Controller : Textlabel plugTo(Object[])
-controlP5.Controller : Textlabel plugTo(Object[], String)
-controlP5.Controller : Textlabel registerProperty(String)
-controlP5.Controller : Textlabel registerProperty(String, String)
-controlP5.Controller : Textlabel registerTooltip(String)
-controlP5.Controller : Textlabel removeBehavior()
-controlP5.Controller : Textlabel removeCallback()
-controlP5.Controller : Textlabel removeCallback(CallbackListener)
-controlP5.Controller : Textlabel removeListener(ControlListener)
-controlP5.Controller : Textlabel removeProperty(String)
-controlP5.Controller : Textlabel removeProperty(String, String)
-controlP5.Controller : Textlabel setArrayValue(float[])
-controlP5.Controller : Textlabel setArrayValue(int, float)
-controlP5.Controller : Textlabel setBehavior(ControlBehavior)
-controlP5.Controller : Textlabel setBroadcast(boolean)
-controlP5.Controller : Textlabel setCaptionLabel(String)
-controlP5.Controller : Textlabel setColor(CColor)
-controlP5.Controller : Textlabel setColorActive(int)
-controlP5.Controller : Textlabel setColorBackground(int)
-controlP5.Controller : Textlabel setColorCaptionLabel(int)
-controlP5.Controller : Textlabel setColorForeground(int)
-controlP5.Controller : Textlabel setColorValueLabel(int)
-controlP5.Controller : Textlabel setDecimalPrecision(int)
-controlP5.Controller : Textlabel setDefaultValue(float)
-controlP5.Controller : Textlabel setHeight(int)
-controlP5.Controller : Textlabel setId(int)
-controlP5.Controller : Textlabel setImages(PImage, PImage, PImage)
-controlP5.Controller : Textlabel setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Textlabel setLabelVisible(boolean)
-controlP5.Controller : Textlabel setLock(boolean)
-controlP5.Controller : Textlabel setMax(float)
-controlP5.Controller : Textlabel setMin(float)
-controlP5.Controller : Textlabel setMouseOver(boolean)
-controlP5.Controller : Textlabel setMoveable(boolean)
-controlP5.Controller : Textlabel setPosition(PVector)
-controlP5.Controller : Textlabel setPosition(float, float)
-controlP5.Controller : Textlabel setSize(PImage)
-controlP5.Controller : Textlabel setSize(int, int)
-controlP5.Controller : Textlabel setStringValue(String)
-controlP5.Controller : Textlabel setUpdate(boolean)
-controlP5.Controller : Textlabel setValueLabel(String)
-controlP5.Controller : Textlabel setView(ControllerView)
-controlP5.Controller : Textlabel setVisible(boolean)
-controlP5.Controller : Textlabel setWidth(int)
-controlP5.Controller : Textlabel show()
-controlP5.Controller : Textlabel unlock()
-controlP5.Controller : Textlabel unplugFrom(Object)
-controlP5.Controller : Textlabel unplugFrom(Object[])
-controlP5.Controller : Textlabel unregisterTooltip()
-controlP5.Controller : Textlabel update()
-controlP5.Controller : Textlabel updateSize()
-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)
-
-
-*/
-
-
-
-
Modifier and Type | -Field and Description | -
---|---|
int |
-_myPaddingX |
-
int |
-_myPaddingY |
-
static int |
-paddingX |
-
static int |
-paddingY |
-
Constructor and Description | -
---|
Label(ControlP5 theControlP5,
- java.lang.String theValue) |
-
Label(ControlP5 theControlP5,
- java.lang.String theValue,
- int theWidth,
- int theHeight,
- int theColor) |
-
Modifier and Type | -Method and Description | -
---|---|
Label |
-align(int[] a) |
-
Label |
-align(int theX,
- int theY) |
-
Label |
-alignX(int theX) |
-
Label |
-alignY(int theY) |
-
Label |
-disableColorBackground() |
-
void |
-draw(processing.core.PGraphics theGraphics) |
-
void |
-draw(processing.core.PGraphics theGraphics,
- int theX,
- int theY) |
-
void |
-draw(processing.core.PGraphics theGraphics,
- int theX,
- int theY,
- ControllerInterface<?> theController) |
-
Label |
-enableColorBackground() |
-
int[] |
-getAlign() |
-
int |
-getColor() |
-
ControlFont |
-getFont() |
-
int |
-getHeight() |
-
int |
-getLetterSpacing() |
-
int |
-getLineHeight() |
-
float |
-getOffsetYratio() |
-
int |
-getOverflow() |
-
ControllerStyle |
-getStyle() |
-
java.lang.String |
-getText() |
-
java.lang.String |
-getTextFormatted() |
-
int |
-getTextHeight() |
-
int |
-getWidth() |
-
Label |
-hide() |
-
boolean |
-isFixedSize() |
-
boolean |
-isMultiline() |
-
boolean |
-isToUpperCase() |
-
boolean |
-isVisible() |
-
Label |
-set(java.lang.String theValue) |
-
Label |
-setColor(int theColor) |
-
Label |
-setColor(int theValue,
- boolean theFlag) |
-
Label |
-setColorBackground(int theColor) |
-
Label |
-setFixedSize(boolean theValue) |
-
Label |
-setFont(ControlFont theFont) |
-
Label |
-setFont(int theBitFontIndex) |
-
Label |
-setFont(processing.core.PFont thePFont) |
-
Label |
-setHeight(int theHeight) |
-
Label |
-setLetterSpacing(int theValue) |
-
Label |
-setLineHeight(int theValue) |
-
Label |
-setMultiline(boolean theValue) |
-
Label |
-setOffsetY(int theValue) |
-
Label |
-setOffsetYratio(float theValue) |
-
Label |
-setPadding(int thePaddingX,
- int thePaddingY) |
-
Label |
-setPaddingX(int thePaddingX) |
-
Label |
-setPaddingY(int thePaddingY) |
-
Label |
-setSize(int theSize) |
-
Label |
-setText(java.lang.String theValue) |
-
Label |
-setVisible(boolean theValue) |
-
Label |
-setWidth(int theWidth) |
-
Label |
-show() |
-
Label |
-toUpperCase(boolean theValue) |
-
Label |
-updateFont(ControlFont theFont) |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public int _myPaddingX-
public int _myPaddingY-
public static int paddingX-
public static int paddingY-
public Label(ControlP5 theControlP5, - java.lang.String theValue)-
public Label(ControlP5 theControlP5, - java.lang.String theValue, - int theWidth, - int theHeight, - int theColor)-
public Label align(int[] a)-
public Label align(int theX, - int theY)-
public Label alignX(int theX)-
public Label alignY(int theY)-
public Label disableColorBackground()-
public void draw(processing.core.PGraphics theGraphics)- -
public void draw(processing.core.PGraphics theGraphics, - int theX, - int theY)-
public void draw(processing.core.PGraphics theGraphics, - int theX, - int theY, - ControllerInterface<?> theController)-
public Label enableColorBackground()-
public int[] getAlign()-
public int getColor()-
public ControlFont getFont()-
public int getHeight()-
public int getLetterSpacing()-
public int getLineHeight()-
public float getOffsetYratio()-
public int getOverflow()-
public ControllerStyle getStyle()-
public java.lang.String getText()-
public java.lang.String getTextFormatted()-
public int getTextHeight()-
public int getWidth()-
public Label hide()-
public boolean isFixedSize()-
public boolean isMultiline()-
public boolean isToUpperCase()-
public boolean isVisible()-
public Label set(java.lang.String theValue)-
public Label setColor(int theColor)-
public Label setColor(int theValue, - boolean theFlag)-
public Label setColorBackground(int theColor)-
public Label setFixedSize(boolean theValue)-
public Label setFont(ControlFont theFont)-
public Label setFont(int theBitFontIndex)-
public Label setFont(processing.core.PFont thePFont)-
public Label setHeight(int theHeight)-
public Label setLetterSpacing(int theValue)-
public Label setLineHeight(int theValue)-
public Label setMultiline(boolean theValue)-
public Label setOffsetY(int theValue)-
public Label setOffsetYratio(float theValue)-
public Label setPadding(int thePaddingX, - int thePaddingY)-
public Label setPaddingX(int thePaddingX)-
public Label setPaddingY(int thePaddingY)-
public Label setSize(int theSize)-
public Label setText(java.lang.String theValue)-
public Label setVisible(boolean theValue)-
public Label setWidth(int theWidth)-
public Label show()-
public Label toUpperCase(boolean theValue)-
public Label updateFont(ControlFont theFont)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ListBox.html b/reference/controlP5/ListBox.html deleted file mode 100644 index 6125ca8..0000000 --- a/reference/controlP5/ListBox.html +++ /dev/null @@ -1,1353 +0,0 @@ - - - - - -public class ListBox -extends ControlGroup<ListBox> -implements ControlListener-
DropdownList
/**
-* ControlP5 ListBox
-*
-* find a list of public methods available for the ListBox Controller
-* at the bottom of this sketch.
-* use the scrollwheel, up or down cursors to scroll through
-* a listbox when hovering with the mouse.
-*
-* DEPRECATED, use ScrollableList instead.
-*
-* by Andreas Schlegel, 2012
-* www.sojamo.de/libraries/controlp5
-*
-*/
-
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-ListBox l;
-
-int cnt = 0;
-
-void setup() {
- size(700, 400);
-
- ControlP5.printPublicMethodsFor(ListBox.class);
-
- cp5 = new ControlP5(this);
- l = cp5.addListBox("myList")
- .setPosition(100, 100)
- .setSize(120, 120)
- .setItemHeight(15)
- .setBarHeight(15)
- .setColorBackground(color(255, 128))
- .setColorActive(color(0))
- .setColorForeground(color(255, 100,0))
- ;
-
- l.captionLabel().toUpperCase(true);
- l.captionLabel().set("A Listbox");
- l.captionLabel().setColor(0xffff0000);
- l.captionLabel().style().marginTop = 3;
- l.valueLabel().style().marginTop = 3;
-
- for (int i=0;i<80;i++) {
- ListBoxItem lbi = l.addItem("item "+i, i);
- lbi.setColorBackground(0xffff0000);
- }
-
-}
-
-void keyPressed() {
- if (key=='0') {
- // will activate the listbox item with value 5
- l.setValue(5);
- }
- if (key=='1') {
- // set the height of a listBox should always be a multiple of itemHeight
- l.setHeight(210);
- }
- else if (key=='2') {
- // set the height of a listBox should always be a multiple of itemHeight
- l.setHeight(120);
- }
- else if (key=='3') {
- // set the width of a listBox
- l.setWidth(200);
- }
- else if (key=='i') {
- // set the height of a listBoxItem, should always be a fraction of the listBox
- l.setItemHeight(30);
- }
- else if (key=='u') {
- // set the height of a listBoxItem, should always be a fraction of the listBox
- l.setItemHeight(10);
- l.setBackgroundColor(color(100, 0, 0));
- }
- else if (key=='a') {
- int n = (int)(random(100000));
- l.addItem("item "+n, n);
- }
- else if (key=='d') {
- l.removeItem("item "+cnt);
- cnt++;
- } else if (key=='c') {
- l.clear();
- }
-}
-
-void controlEvent(ControlEvent theEvent) {
- // ListBox is if type ControlGroup.
- // 1 controlEvent will be executed, where the event
- // originates from a ControlGroup. therefore
- // you need to check the Event with
- // if (theEvent.isGroup())
- // to avoid an error message from controlP5.
-
- if (theEvent.isGroup()) {
- // an event from a group e.g. scrollList
- println(theEvent.group().value()+" from "+theEvent.group());
- }
-
- if(theEvent.isGroup() && theEvent.name().equals("myList")){
- int test = (int)theEvent.group().value();
- println("test "+test);
-}
-}
-
-void draw() {
- background(128);
- // scroll the scroll List according to the mouseX position
- // when holding down SPACE.
- if (keyPressed && key==' ') {
- //l.scroll(mouseX/((float)width)); // scroll taks values between 0 and 1
- }
- if (keyPressed && key==' ') {
- l.setWidth(mouseX);
- }
-}
-
-
-
-/*
-a list of all methods available for the ListBox Controller
-use ControlP5.printPublicMethodsFor(ListBox.class);
-to print the following list into the console.
-
-You can find further details about class ListBox in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-
-controlP5.ControlGroup : ControlGroup activateEvent(boolean)
-controlP5.ControlGroup : ControlGroup addListener(ControlListener)
-controlP5.ControlGroup : ControlGroup hideBar()
-controlP5.ControlGroup : ControlGroup removeListener(ControlListener)
-controlP5.ControlGroup : ControlGroup setBackgroundColor(int)
-controlP5.ControlGroup : ControlGroup setBackgroundHeight(int)
-controlP5.ControlGroup : ControlGroup setBarHeight(int)
-controlP5.ControlGroup : ControlGroup showBar()
-controlP5.ControlGroup : ControllerGroup updateInternalEvents(PApplet)
-controlP5.ControlGroup : String info()
-controlP5.ControlGroup : String toString()
-controlP5.ControlGroup : boolean isBarVisible()
-controlP5.ControlGroup : int getBackgroundHeight()
-controlP5.ControlGroup : int getBarHeight()
-controlP5.ControlGroup : int listenerSize()
-controlP5.ControllerGroup : CColor getColor()
-controlP5.ControllerGroup : ControlWindow getWindow()
-controlP5.ControllerGroup : ControlWindowCanvas addCanvas(ControlWindowCanvas)
-controlP5.ControllerGroup : Controller getController(String)
-controlP5.ControllerGroup : ControllerGroup add(ControllerInterface)
-controlP5.ControllerGroup : ControllerGroup close()
-controlP5.ControllerGroup : ControllerGroup disableCollapse()
-controlP5.ControllerGroup : ControllerGroup enableCollapse()
-controlP5.ControllerGroup : ControllerGroup hide()
-controlP5.ControllerGroup : ControllerGroup moveTo(ControlWindow)
-controlP5.ControllerGroup : ControllerGroup open()
-controlP5.ControllerGroup : ControllerGroup registerProperty(String)
-controlP5.ControllerGroup : ControllerGroup registerProperty(String, String)
-controlP5.ControllerGroup : ControllerGroup remove(CDrawable)
-controlP5.ControllerGroup : ControllerGroup remove(ControllerInterface)
-controlP5.ControllerGroup : ControllerGroup removeCanvas(ControlWindowCanvas)
-controlP5.ControllerGroup : ControllerGroup removeProperty(String)
-controlP5.ControllerGroup : ControllerGroup removeProperty(String, String)
-controlP5.ControllerGroup : ControllerGroup setAddress(String)
-controlP5.ControllerGroup : ControllerGroup setArrayValue(float[])
-controlP5.ControllerGroup : ControllerGroup setColor(CColor)
-controlP5.ControllerGroup : ControllerGroup setColorActive(int)
-controlP5.ControllerGroup : ControllerGroup setColorBackground(int)
-controlP5.ControllerGroup : ControllerGroup setColorForeground(int)
-controlP5.ControllerGroup : ControllerGroup setColorLabel(int)
-controlP5.ControllerGroup : ControllerGroup setColorValue(int)
-controlP5.ControllerGroup : ControllerGroup setHeight(int)
-controlP5.ControllerGroup : ControllerGroup setId(int)
-controlP5.ControllerGroup : ControllerGroup setLabel(String)
-controlP5.ControllerGroup : ControllerGroup setMoveable(boolean)
-controlP5.ControllerGroup : ControllerGroup setOpen(boolean)
-controlP5.ControllerGroup : ControllerGroup setPosition(PVector)
-controlP5.ControllerGroup : ControllerGroup setPosition(float, float)
-controlP5.ControllerGroup : ControllerGroup setStringValue(String)
-controlP5.ControllerGroup : ControllerGroup setUpdate(boolean)
-controlP5.ControllerGroup : ControllerGroup setValue(float)
-controlP5.ControllerGroup : ControllerGroup setVisible(boolean)
-controlP5.ControllerGroup : ControllerGroup setWidth(int)
-controlP5.ControllerGroup : ControllerGroup show()
-controlP5.ControllerGroup : ControllerGroup update()
-controlP5.ControllerGroup : ControllerGroup updateAbsolutePosition()
-controlP5.ControllerGroup : ControllerProperty getProperty(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String, String)
-controlP5.ControllerGroup : Label captionLabel()
-controlP5.ControllerGroup : Label valueLabel()
-controlP5.ControllerGroup : PVector getPosition()
-controlP5.ControllerGroup : String getAddress()
-controlP5.ControllerGroup : String getName()
-controlP5.ControllerGroup : String getStringValue()
-controlP5.ControllerGroup : String info()
-controlP5.ControllerGroup : String toString()
-controlP5.ControllerGroup : Tab getTab()
-controlP5.ControllerGroup : boolean isCollapse()
-controlP5.ControllerGroup : boolean isMouseOver()
-controlP5.ControllerGroup : boolean isMoveable()
-controlP5.ControllerGroup : boolean isOpen()
-controlP5.ControllerGroup : boolean isUpdate()
-controlP5.ControllerGroup : boolean isVisible()
-controlP5.ControllerGroup : boolean setMousePressed(boolean)
-controlP5.ControllerGroup : float getValue()
-controlP5.ControllerGroup : float[] getArrayValue()
-controlP5.ControllerGroup : int getHeight()
-controlP5.ControllerGroup : int getId()
-controlP5.ControllerGroup : int getWidth()
-controlP5.ControllerGroup : void remove()
-controlP5.ListBox : ListBox actAsPulldownMenu(boolean)
-controlP5.ListBox : ListBox addItems(List)
-controlP5.ListBox : ListBox addItems(List, int)
-controlP5.ListBox : ListBox addItems(String[])
-controlP5.ListBox : ListBox clear()
-controlP5.ListBox : ListBox hideScrollbar()
-controlP5.ListBox : ListBox removeItem(String)
-controlP5.ListBox : ListBox scroll(float)
-controlP5.ListBox : ListBox setColorActive(int)
-controlP5.ListBox : ListBox setColorBackground(int)
-controlP5.ListBox : ListBox setColorForeground(int)
-controlP5.ListBox : ListBox setColorLabel(int)
-controlP5.ListBox : ListBox setHeight(int)
-controlP5.ListBox : ListBox setItemHeight(int)
-controlP5.ListBox : ListBox setListBoxItems(String[][])
-controlP5.ListBox : ListBox setWidth(int)
-controlP5.ListBox : ListBox showScrollbar()
-controlP5.ListBox : ListBox toUpperCase(boolean)
-controlP5.ListBox : ListBoxItem addItem(String, int)
-controlP5.ListBox : ListBoxItem getItem(Controller)
-controlP5.ListBox : ListBoxItem getItem(String)
-controlP5.ListBox : ListBoxItem getItem(int)
-controlP5.ListBox : String[][] getListBoxItems()
-controlP5.ListBox : boolean isScrollbarVisible()
-java.lang.Object : String toString()
-java.lang.Object : String toString()
-java.lang.Object : boolean equals(Object)
-
-
-*/
-
-
-
-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
ListBox(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend ListBox.
- |
-
Modifier and Type | -Method and Description | -
---|---|
ListBox |
-actAsPulldownMenu(boolean theValue)
-Enables a ListBox to act as a pulldown menu.
- |
-
ListBoxItem |
-addItem(java.lang.String theName,
- int theValue)
-Adds an item to the ListBox.
- |
-
ListBox |
-addItems(java.util.List<?> theItems) |
-
ListBox |
-addItems(java.util.List<?> theItems,
- int theOffset) |
-
ListBox |
-addItems(java.lang.String[] theItems)
-adds a list of items from a string array.
- |
-
void |
-beginItems() |
-
ListBox |
-clear()
-Removes all items from a list box
- |
-
void |
-controlEvent(ControlEvent theEvent)
-controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about
- value changes.
- |
-
void |
-endItems() |
-
ListBoxItem |
-getItem(Controller<?> theButton)
-returns a ListBoxItem based on its Button reference.
- |
-
ListBoxItem |
-getItem(int theIndex)
-returns a listBoxItem by index from the list of items.
- |
-
ListBoxItem |
-getItem(java.lang.String theItemName)
-TODO faulty returns a listBoxItem by name.
- |
-
java.lang.String[][] |
-getListBoxItems() |
-
float |
-getScrollPosition() |
-
ListBox |
-hideScrollbar() |
-
boolean |
-isScrollable() |
-
boolean |
-isScrollbarEnabled() |
-
void |
-keyEvent(processing.event.KeyEvent theEvent)
-Adding key support.
- |
-
ListBox |
-removeItem(java.lang.String theItemName)
-Removes an item from the ListBox using the unique name of the item given when added to the
- list.
- |
-
ListBox |
-scroll(float theValue)
-scroll the scrollList remotely.
- |
-
void |
-scrolled(int theStep) |
-
ListBox |
-setColor(CColor theColor) |
-
ListBox |
-setColorActive(int theColor) |
-
ListBox |
-setColorBackground(int theColor) |
-
ListBox |
-setColorForeground(int theColor) |
-
ListBox |
-setColorLabel(int theColor) |
-
ListBox |
-setColorValue(int theColor) |
-
ListBox |
-setHeight(int theHeight) |
-
ListBox |
-setItemHeight(int theHeight) |
-
ListBox |
-setListBoxItems(java.lang.String[][] l) |
-
ListBox |
-setScrollbarVisible(boolean theValue) |
-
ListBox |
-setScrollbarWidth(int theWidth) |
-
ListBox |
-setSize(int theWidth,
- int theHeight) |
-
ListBox |
-setValue(float theValue) |
-
ListBox |
-setWidth(int theWidth) |
-
ListBox |
-showScrollbar() |
-
ListBox |
-toUpperCase(boolean theFlag) |
-
ListBox |
-updateInternalEvents(processing.core.PApplet theApplet)
-a method for putting input events like e.g.
- |
-
ListBox |
-updateListBoxItems() |
-
activateEvent, addListener, getBackgroundHeight, getBarHeight, getInfo, listenerSize, mousePressed, removeListener, setBackgroundColor, setBackgroundHeight, setBarHeight, stringValue, toString
absolutePosition, add, addCanvas, addCloseButton, addDrawable, arrayValue, bringToFront, bringToFront, close, color, continuousUpdateEvents, controller, disableCollapse, draw, enableCollapse, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getCaptionLabel, getColor, getController, getHeight, getId, getName, getParent, getPickingColor, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getWidth, getWindow, hide, hideArrow, hideBar, id, init, isBarVisible, isCollapse, isMouseOver, isMoveable, isOpen, isUpdate, isVisible, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, name, open, parent, position, registerProperty, registerProperty, remove, remove, remove, removeCanvas, removeCloseButton, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setCaptionLabel, setGroup, setGroup, setId, setLabel, setMouseOver, setMousePressed, setMoveable, setOpen, setPosition, setPosition, setStringValue, setTab, setTab, setTab, setTitle, setUpdate, setVisible, show, showArrow, showBar, update, updateAbsolutePosition, updateEvents, value
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public ListBox(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public ListBox actAsPulldownMenu(boolean theValue)-
public ListBoxItem addItem(java.lang.String theName, - int theValue)-
theName
- StringtheValue
- intcontrolP5.ListBox#removeItem(String,int)
public ListBox addItems(java.util.List<?> theItems)-
public ListBox addItems(java.util.List<?> theItems, - int theOffset)-
public ListBox addItems(java.lang.String[] theItems)-
theItems
- public void beginItems()-
public ListBox clear()-
public void controlEvent(ControlEvent theEvent)-
ControlListener
controlEvent
in interface ControlListener
controlEvent
in class ControlGroup<ListBox>
theEvent
- ControlEventCallbackListener
,
-CallbackEvent
public void endItems()-
public ListBoxItem getItem(Controller<?> theButton)-
theButton
- public ListBoxItem getItem(int theIndex)-
theIndex
- public ListBoxItem getItem(java.lang.String theItemName)-
theItemName
- public java.lang.String[][] getListBoxItems()-
public float getScrollPosition()-
public ListBox hideScrollbar()-
public boolean isScrollable()-
public boolean isScrollbarEnabled()-
public void keyEvent(processing.event.KeyEvent theEvent)-
keyEvent
in interface ControllerInterface<ListBox>
keyEvent
in class ControllerGroup<ListBox>
theEvent
- KeyEventpublic ListBox removeItem(java.lang.String theItemName)-
theItemName
- StringaddItem(String,int)
public ListBox scroll(float theValue)-
public void scrolled(int theStep)-
public ListBox setColor(CColor theColor)-
setColor
in interface ControllerInterface<ListBox>
setColor
in class ControllerGroup<ListBox>
public ListBox setColorActive(int theColor)-
setColorActive
in interface ControllerInterface<ListBox>
setColorActive
in class ControllerGroup<ListBox>
public ListBox setColorBackground(int theColor)-
setColorBackground
in interface ControllerInterface<ListBox>
setColorBackground
in class ControllerGroup<ListBox>
public ListBox setColorForeground(int theColor)-
setColorForeground
in interface ControllerInterface<ListBox>
setColorForeground
in class ControllerGroup<ListBox>
public ListBox setColorLabel(int theColor)-
setColorLabel
in interface ControllerInterface<ListBox>
setColorLabel
in class ControllerGroup<ListBox>
public ListBox setColorValue(int theColor)-
setColorValue
in interface ControllerInterface<ListBox>
setColorValue
in class ControllerGroup<ListBox>
public ListBox setHeight(int theHeight)-
setHeight
in class ControllerGroup<ListBox>
public ListBox setItemHeight(int theHeight)-
public ListBox setListBoxItems(java.lang.String[][] l)-
public ListBox setScrollbarVisible(boolean theValue)-
public ListBox setScrollbarWidth(int theWidth)-
public ListBox setSize(int theWidth, - int theHeight)-
setSize
in class ControlGroup<ListBox>
public ListBox setValue(float theValue)-
ControllerGroup
setValue
in interface ControllerInterface<ListBox>
setValue
in class ControllerGroup<ListBox>
public ListBox setWidth(int theWidth)-
setWidth
in class ControllerGroup<ListBox>
public ListBox showScrollbar()-
public ListBox toUpperCase(boolean theFlag)-
public ListBox updateInternalEvents(processing.core.PApplet theApplet)-
ControllerInterface
updateInternalEvents
in interface ControllerInterface<ListBox>
updateInternalEvents
in class ControlGroup<ListBox>
public ListBox updateListBoxItems()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ListBoxItem.html b/reference/controlP5/ListBoxItem.html deleted file mode 100644 index f6dc0b4..0000000 --- a/reference/controlP5/ListBoxItem.html +++ /dev/null @@ -1,455 +0,0 @@ - - - - - -public class ListBoxItem
-extends java.lang.Object
-Modifier and Type | -Method and Description | -
---|---|
CColor |
-getColor() |
-
int |
-getId()
-returns the id of a listboxitem.
- |
-
java.lang.String |
-getName()
-returns the name of the listboxitem.
- |
-
java.lang.String |
-getText()
-returns the text displayed for this listboxitem.
- |
-
boolean |
-getToUpperCase()
-returns the uppercase status of this listboxitem.
- |
-
int |
-getValue()
-returns the value of the listboxitem.
- |
-
boolean |
-isActive()
-TODO no effect yet.
- |
-
void |
-setColor(CColor theColor) |
-
void |
-setColorActive(int theColor) |
-
void |
-setColorBackground(int theColor) |
-
void |
-setColorForeground(int theColor) |
-
void |
-setColorLabel(int theColor) |
-
void |
-setId(int theId)
-set the id of a listboxitem
- |
-
ListBoxItem |
-setText(java.lang.String theText)
-change text text of a lsitboxitem's label.
- |
-
java.lang.String |
-toString() |
-
void |
-toUpperCase(boolean theFlag)
-by default the text of a listboxitem is set to uppercase, use toUpperCase(false) to make
- changes.
- |
-
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public CColor getColor()-
public int getId()-
public java.lang.String getName()-
public java.lang.String getText()-
public boolean getToUpperCase()-
public int getValue()-
public boolean isActive()-
public void setColor(CColor theColor)-
public void setColorActive(int theColor)-
public void setColorBackground(int theColor)-
public void setColorForeground(int theColor)-
public void setColorLabel(int theColor)-
public void setId(int theId)-
theId
- public ListBoxItem setText(java.lang.String theText)-
theText
- public java.lang.String toString()-
toString
in class java.lang.Object
public void toUpperCase(boolean theFlag)-
theFlag
- processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Matrix.html b/reference/controlP5/Matrix.html deleted file mode 100644 index adca802..0000000 --- a/reference/controlP5/Matrix.html +++ /dev/null @@ -1,1228 +0,0 @@ - - - - - -public class Matrix -extends Controller<Matrix>-
/**
- * ControlP5 Matrix
- *
- * A matrix can be used for example as a sequencer, a drum machine.
- *
- * find a list of public methods available for the Matrix Controller
- * at the bottom of this sketch.
- *
- * by Andreas Schlegel, 2012
- * www.sojamo.de/libraries/controlp5
- *
- */
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-Dong[][] d;
-int nx = 10;
-int ny = 10;
-
-void setup() {
- size(700, 400);
-
- cp5 = new ControlP5(this);
-
- cp5.addMatrix("myMatrix")
- .setPosition(50, 100)
- .setSize(200, 200)
- .setGrid(nx, ny)
- .setGap(10, 1)
- .setInterval(200)
- .setMode(ControlP5.MULTIPLES)
- .setColorBackground(color(120))
- .setBackground(color(40))
- ;
-
- cp5.getController("myMatrix").getCaptionLabel().alignX(CENTER);
-
- // use setMode to change the cell-activation which by
- // default is ControlP5.SINGLE_ROW, 1 active cell per row,
- // but can be changed to ControlP5.SINGLE_COLUMN or
- // ControlP5.MULTIPLES
-
- d = new Dong[nx][ny];
- for (int x = 0;x
autoHeight, autoSpacing, autoWidth
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Matrix(ControlP5 theControlP5,
- ControllerGroup<?> theParent,
- java.lang.String theName,
- int theCellX,
- int theCellY,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
Matrix(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend Matrix.
- |
-
Modifier and Type | -Method and Description | -
---|---|
Matrix |
-clear() |
-
boolean |
-get(int theX,
- int theY) |
-
int[][] |
-getCells() |
-
int |
-getInterval() |
-
int |
-getMode() |
-
static int |
-getX(float thePosition) |
-
static int |
-getX(int thePosition) |
-
static int |
-getY(float thePosition) |
-
static int |
-getY(int thePosition) |
-
boolean |
-isPlaying() |
-
void |
-mousePressed() |
-
void |
-mouseReleased() |
-
Matrix |
-pause() |
-
Matrix |
-play() |
-
Matrix |
-plugTo(java.lang.Object theObject) |
-
Matrix |
-plugTo(java.lang.Object theObject,
- java.lang.String thePlugName) |
-
void |
-remove()
-removes a controller from controlP5.
- |
-
Matrix |
-set(int theX,
- int theY,
- boolean theValue)
-set the state of a particular cell inside a matrix.
- |
-
Matrix |
-setBackground(int c) |
-
Matrix |
-setCells(int[][] theCells) |
-
Matrix |
-setGap(int theX,
- int theY) |
-
Matrix |
-setGrid(int theCellX,
- int theCellY) |
-
Matrix |
-setInterval(int theInterval)
-set the speed of intervals in millis iterating through the matrix.
- |
-
Matrix |
-setMode(int theMode)
-use setMode to change the cell-activation which by default is ControlP5.SINGLE_ROW, 1 active
- cell per row, but can be changed to ControlP5.SINGLE_COLUMN or ControlP5.MULTIPLES
- |
-
Matrix |
-setValue(float theValue) |
-
Matrix |
-stop() |
-
Matrix |
-trigger(int theColumn) |
-
Matrix |
-update()
-updates the value of the controller without having to set the value explicitly.
- |
-
Matrix |
-updateDisplayMode(int theMode) |
-
Matrix |
-updateInternalEvents(processing.core.PApplet theApplet)
-a method for putting input events like e.g.
- |
-
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, draw, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getInfo, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setHeight, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, setWidth, show, toString, unlock, unplugFrom, unplugFrom, unregisterTooltip, updateAbsolutePosition, updateEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public Matrix(ControlP5 theControlP5, - ControllerGroup<?> theParent, - java.lang.String theName, - int theCellX, - int theCellY, - int theX, - int theY, - int theWidth, - int theHeight)-
public Matrix(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public Matrix clear()-
public boolean get(int theX, - int theY)-
public int[][] getCells()-
public int getInterval()-
public int getMode()-
public static int getX(float thePosition)-
public static int getX(int thePosition)-
public static int getY(float thePosition)-
public static int getY(int thePosition)-
public boolean isPlaying()-
public void mousePressed()-
public void mouseReleased()-
public Matrix pause()-
public Matrix play()-
public Matrix plugTo(java.lang.Object theObject)-
plugTo
in class Controller<Matrix>
public Matrix plugTo(java.lang.Object theObject, - java.lang.String thePlugName)-
plugTo
in class Controller<Matrix>
public void remove()-
Controller
remove
in interface ControllerInterface<Matrix>
remove
in class Controller<Matrix>
public Matrix set(int theX, - int theY, - boolean theValue)-
theX
- theY
- theValue
- public Matrix setBackground(int c)-
public Matrix setCells(int[][] theCells)-
public Matrix setGap(int theX, - int theY)-
public Matrix setGrid(int theCellX, - int theCellY)-
public Matrix setInterval(int theInterval)-
theInterval
- intpublic Matrix setMode(int theMode)-
theMode
- return Matrixpublic Matrix setValue(float theValue)-
setValue
in interface ControllerInterface<Matrix>
setValue
in class Controller<Matrix>
theValue
- floatpublic Matrix stop()-
public Matrix trigger(int theColumn)-
public Matrix update()-
Controller
update
in interface ControllerInterface<Matrix>
update
in class Controller<Matrix>
Controller.setUpdate(boolean)
,
-Controller.isUpdate()
public Matrix updateDisplayMode(int theMode)-
public Matrix updateInternalEvents(processing.core.PApplet theApplet)-
ControllerInterface
updateInternalEvents
in interface ControllerInterface<Matrix>
updateInternalEvents
in class Controller<Matrix>
ControllerInterface.updateInternalEvents
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/MultiList.html b/reference/controlP5/MultiList.html deleted file mode 100644 index 51af43f..0000000 --- a/reference/controlP5/MultiList.html +++ /dev/null @@ -1,921 +0,0 @@ - - - - - -public class MultiList -extends Controller<MultiList> -implements ControlListener-
/**
- * ControlP5 MultiList
- * by andreas schlegel, 2009
- */
-
-import controlP5.*;
-
-ControlP5 controlP5;
-MultiList l;
-
-void setup() {
- size(700,400);
- frameRate(30);
- controlP5 = new ControlP5(this);
-
- // add a multiList to controlP5.
- // elements of the list have default dimensions
- // here, a width of 100 and a height of 12
- l = controlP5.addMultiList("myList",20,20,100,12);
-
- // create a multiListButton which we will use to
- // add new buttons to the multilist
- MultiListButton b;
- b = l.add("level1",1);
-
- // add items to a sublist of button "level1"
- b.add("level11",11).setLabel("level1 item1");
- b.add("level12",12).setLabel("level1 item2");
-
- b = l.add("level2",2);
-
- int cnt = 100;
-
- // add some more sublists.
- for(int i=0;i<10;i++) {
- MultiListButton c = b.add("level2"+(i+1),20+i+1);
- c.setLabel("level2 item"+(i+1));
- c.setColorBackground(color(64 + 18*i,0,0));
-
- if(i==4) {
- // changing the width and the height of a button
- // will be inherited by its sublists.
- c.setWidth(100);
- c.setHeight(20);
- }
- cnt++;
-
- if(i==4) {
- for(int j=0;j<10;j++) {
- cnt++;
- MultiListButton d;
- d = c.add("level2"+i+""+j,250+j+1);
- d.setLabel("level2 item"+(i+1)+" "+"item"+(j+1));
- d.setColorBackground(color(64 + 18*j,(64 + 18*j)/2,0));
- d.setId(cnt);
- d.setWidth(200);
- }
- }
- }
-
- MultiListButton cc = (MultiListButton)controlP5.controller("level21");
- cc.setHeight(40);
-}
-
-
-void controlEvent(ControlEvent theEvent) {
- println(theEvent.controller().name()+" = "+theEvent.value());
- // uncomment the line below to remove a multilist item when clicked.
- // theEvent.controller().remove();
-}
-
-
-void draw() {
- background(0);
-}
-
-void keyPressed() {
- if(controlP5.controller("level23")!=null) {
- println("removing multilist button level23.");
- controlP5.controller("level23").remove();
- }
-}
-
Modifier and Type | -Field and Description | -
---|---|
int |
-closeDelay |
-
autoHeight, autoSpacing, autoWidth
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
MultiList(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend MultiList.
- |
-
MultiList(ControlP5 theControlP5,
- Tab theParent,
- java.lang.String theName,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
Modifier and Type | -Method and Description | -
---|---|
MultiListButton |
-add(java.lang.String theName,
- int theValue)
-adds multilist buttons to the multilist.
- |
-
void |
-close() |
-
void |
-close(controlP5.MultiListInterface theInterface) |
-
void |
-controlEvent(ControlEvent theEvent)
-controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about
- value changes.
- |
-
void |
-draw(processing.core.PGraphics theGraphics)
-the default draw function for each controller extending superclass Controller.
- |
-
java.util.List<MultiListButton> |
-getChildren()
-Deprecated.
- |
-
int |
-getDirection() |
-
java.lang.String |
-name() |
-
boolean |
-observe() |
-
void |
-occupied(boolean theFlag) |
-
void |
-open() |
-
void |
-remove()
-removes the multilist.
- |
-
void |
-setup() |
-
MultiList |
-setValue(float theValue) |
-
java.util.List<MultiListButton> |
-subelements()
-Deprecated.
- |
-
MultiList |
-toUpperCase(boolean theValue) |
-
MultiList |
-update()
-updates the value of the controller without having to set the value explicitly.
- |
-
boolean |
-update(processing.core.PApplet theApplet) |
-
void |
-updateLocation(float theX,
- float theY) |
-
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getInfo, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setHeight, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, setWidth, show, toString, unlock, unplugFrom, unplugFrom, unregisterTooltip, updateAbsolutePosition, updateEvents, updateInternalEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public MultiList(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public MultiListButton add(java.lang.String theName, - int theValue)-
theName
- StringtheValue
- intpublic void close()-
public void close(controlP5.MultiListInterface theInterface)-
theInterface
- MultiListInterfacepublic void controlEvent(ControlEvent theEvent)-
ControlListener
controlEvent
in interface ControlListener
theEvent
- CallbackListener
,
-CallbackEvent
public void draw(processing.core.PGraphics theGraphics)-
draw
in interface CDrawable
draw
in interface ControllerInterface<MultiList>
draw
in class Controller<MultiList>
ControllerView
@Deprecated -public java.util.List<MultiListButton> getChildren()-
public int getDirection()-
public boolean observe()-
public void occupied(boolean theFlag)-
theFlag
- booleanpublic void open()-
public void remove()-
remove
in interface ControllerInterface<MultiList>
remove
in class Controller<MultiList>
public void setup()-
public MultiList setValue(float theValue)-
setValue
in interface ControllerInterface<MultiList>
setValue
in class Controller<MultiList>
theValue
- float@Deprecated -public java.util.List<MultiListButton> subelements()-
public MultiList toUpperCase(boolean theValue)-
public MultiList update()-
update
in interface ControllerInterface<MultiList>
update
in class Controller<MultiList>
Controller.setUpdate(boolean)
,
-Controller.isUpdate()
public boolean update(processing.core.PApplet theApplet)-
theApplet
- public void updateLocation(float theX, - float theY)-
theX
- floattheY
- floatpublic java.lang.String name()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/MultiListButton.html b/reference/controlP5/MultiListButton.html deleted file mode 100644 index 59e4efb..0000000 --- a/reference/controlP5/MultiListButton.html +++ /dev/null @@ -1,614 +0,0 @@ - - - - - -public class MultiListButton -extends Button-
/**
- * ControlP5 MultiList
- * by andreas schlegel, 2009
- */
-
-import controlP5.*;
-
-ControlP5 controlP5;
-MultiList l;
-
-void setup() {
- size(700,400);
- frameRate(30);
- controlP5 = new ControlP5(this);
-
- // add a multiList to controlP5.
- // elements of the list have default dimensions
- // here, a width of 100 and a height of 12
- l = controlP5.addMultiList("myList",20,20,100,12);
-
- // create a multiListButton which we will use to
- // add new buttons to the multilist
- MultiListButton b;
- b = l.add("level1",1);
-
- // add items to a sublist of button "level1"
- b.add("level11",11).setLabel("level1 item1");
- b.add("level12",12).setLabel("level1 item2");
-
- b = l.add("level2",2);
-
- int cnt = 100;
-
- // add some more sublists.
- for(int i=0;i<10;i++) {
- MultiListButton c = b.add("level2"+(i+1),20+i+1);
- c.setLabel("level2 item"+(i+1));
- c.setColorBackground(color(64 + 18*i,0,0));
-
- if(i==4) {
- // changing the width and the height of a button
- // will be inherited by its sublists.
- c.setWidth(100);
- c.setHeight(20);
- }
- cnt++;
-
- if(i==4) {
- for(int j=0;j<10;j++) {
- cnt++;
- MultiListButton d;
- d = c.add("level2"+i+""+j,250+j+1);
- d.setLabel("level2 item"+(i+1)+" "+"item"+(j+1));
- d.setColorBackground(color(64 + 18*j,(64 + 18*j)/2,0));
- d.setId(cnt);
- d.setWidth(200);
- }
- }
- }
-
- MultiListButton cc = (MultiListButton)controlP5.controller("level21");
- cc.setHeight(40);
-}
-
-
-void controlEvent(ControlEvent theEvent) {
- println(theEvent.controller().name()+" = "+theEvent.value());
- // uncomment the line below to remove a multilist item when clicked.
- // theEvent.controller().remove();
-}
-
-
-void draw() {
- background(0);
-}
-
-void keyPressed() {
- if(controlP5.controller("level23")!=null) {
- println("removing multilist button level23.");
- controlP5.controller("level23").remove();
- }
-}
-
autoHeight, autoWidth
autoSpacing
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Modifier and Type | -Method and Description | -
---|---|
MultiListButton |
-add(java.lang.String theName,
- float theValue)
-add a new button to the sublist of this multilist button.
- |
-
void |
-close() |
-
void |
-close(controlP5.MultiListInterface theInterface) |
-
void |
-draw(processing.core.PGraphics theGraphics) |
-
java.util.List<MultiListButton> |
-getChildren()
-Deprecated.
- |
-
int |
-getDirection() |
-
void |
-mouseReleasedOutside() |
-
java.lang.String |
-name() |
-
boolean |
-observe() |
-
void |
-open() |
-
void |
-remove()
-removes a controller from controlP5.
- |
-
MultiListButton |
-setHeight(int theHeight)
-set the height of a multlist button.
- |
-
MultiListButton |
-setWidth(int theWidth)
-set the width of a multlist button.
- |
-
MultiListButton |
-toUpperCase(boolean theValue) |
-
void |
-updateLocation(float theX,
- float theY) |
-
void |
-updateRect(float theX,
- float theY,
- float theW,
- float theH) |
-
activateBy, getBooleanValue, getInfo, isOn, isPressed, mousePressed, mouseReleased, setOff, setOn, setSwitch, setValue, toString, update, updateDisplayMode, updateViewMode
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, draw, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, show, unlock, unplugFrom, unplugFrom, unregisterTooltip, updateAbsolutePosition, updateEvents, updateInternalEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public MultiListButton add(java.lang.String theName, - float theValue)-
theName
- StringtheValue
- intpublic void close()-
public void close(controlP5.MultiListInterface theInterface)-
@Deprecated -public java.util.List<MultiListButton> getChildren()-
public int getDirection()-
public void mouseReleasedOutside()-
mouseReleasedOutside
in class Button
public boolean observe()-
public void open()-
public void remove()-
Controller
remove
in interface ControllerInterface<Button>
remove
in class Controller<Button>
public MultiListButton setHeight(int theHeight)-
setHeight
in class Controller<Button>
theHeight
- intpublic MultiListButton setWidth(int theWidth)-
setWidth
in class Controller<Button>
theWidth
- intpublic MultiListButton toUpperCase(boolean theValue)-
public void updateLocation(float theX, - float theY)-
public void updateRect(float theX, - float theY, - float theW, - float theH)-
public void draw(processing.core.PGraphics theGraphics)-
public java.lang.String name()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Numberbox.html b/reference/controlP5/Numberbox.html deleted file mode 100644 index 5d7a053..0000000 --- a/reference/controlP5/Numberbox.html +++ /dev/null @@ -1,1057 +0,0 @@ - - - - - -public class Numberbox -extends Controller<Numberbox>-
/**
-* ControlP5 Numberbox
-*
-*
-* find a list of public methods available for the Numberbox 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);
-
-public float numberboxValue = 100;
-
-void setup() {
- size(700,400);
- noStroke();
- cp5 = new ControlP5(this);
-
- cp5.addNumberbox("numberbox")
- .setPosition(100,160)
- .setSize(100,14)
- .setScrollSensitivity(1.1)
- .setValue(50)
- ;
-
-
- cp5.addNumberbox("numberboxValue")
- .setPosition(100,200)
- .setSize(100,14)
- .setRange(0,200)
- .setMultiplier(0.1) // set the sensitifity of the numberbox
- .setDirection(Controller.HORIZONTAL) // change the control direction to left/right
- .setValue(100)
- ;
-
-}
-
-void draw() {
- background(myColorBackground);
- fill(numberboxValue);
- rect(0,0,width,100);
-}
-
-void numberbox(int theColor) {
- myColorBackground = color(theColor);
- println("a numberbox event. setting background to "+theColor);
-}
-
-
-
-/*
-a list of all methods available for the Numberbox Controller
-use ControlP5.printPublicMethodsFor(Numberbox.class);
-to print the following list into the console.
-
-You can find further details about class Numberbox in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-controlP5.Numberbox : Numberbox linebreak()
-controlP5.Numberbox : Numberbox setDirection(int)
-controlP5.Numberbox : Numberbox setMultiplier(float)
-controlP5.Numberbox : Numberbox setRange(float, float)
-controlP5.Numberbox : Numberbox setScrollSensitivity(float)
-controlP5.Numberbox : Numberbox setValue(float)
-controlP5.Numberbox : Numberbox shuffle()
-controlP5.Numberbox : Numberbox update()
-controlP5.Numberbox : float getMultiplier()
-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 : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Numberbox addCallback(CallbackListener)
-controlP5.Controller : Numberbox addListener(ControlListener)
-controlP5.Controller : Numberbox bringToFront()
-controlP5.Controller : Numberbox bringToFront(ControllerInterface)
-controlP5.Controller : Numberbox hide()
-controlP5.Controller : Numberbox linebreak()
-controlP5.Controller : Numberbox listen(boolean)
-controlP5.Controller : Numberbox lock()
-controlP5.Controller : Numberbox plugTo(Object)
-controlP5.Controller : Numberbox plugTo(Object, String)
-controlP5.Controller : Numberbox plugTo(Object[])
-controlP5.Controller : Numberbox plugTo(Object[], String)
-controlP5.Controller : Numberbox registerProperty(String)
-controlP5.Controller : Numberbox registerProperty(String, String)
-controlP5.Controller : Numberbox registerTooltip(String)
-controlP5.Controller : Numberbox removeBehavior()
-controlP5.Controller : Numberbox removeCallback()
-controlP5.Controller : Numberbox removeCallback(CallbackListener)
-controlP5.Controller : Numberbox removeListener(ControlListener)
-controlP5.Controller : Numberbox removeProperty(String)
-controlP5.Controller : Numberbox removeProperty(String, String)
-controlP5.Controller : Numberbox setArrayValue(float[])
-controlP5.Controller : Numberbox setArrayValue(int, float)
-controlP5.Controller : Numberbox setBehavior(ControlBehavior)
-controlP5.Controller : Numberbox setBroadcast(boolean)
-controlP5.Controller : Numberbox setCaptionLabel(String)
-controlP5.Controller : Numberbox setColor(CColor)
-controlP5.Controller : Numberbox setColorActive(int)
-controlP5.Controller : Numberbox setColorBackground(int)
-controlP5.Controller : Numberbox setColorCaptionLabel(int)
-controlP5.Controller : Numberbox setColorForeground(int)
-controlP5.Controller : Numberbox setColorValueLabel(int)
-controlP5.Controller : Numberbox setDecimalPrecision(int)
-controlP5.Controller : Numberbox setDefaultValue(float)
-controlP5.Controller : Numberbox setHeight(int)
-controlP5.Controller : Numberbox setId(int)
-controlP5.Controller : Numberbox setImages(PImage, PImage, PImage)
-controlP5.Controller : Numberbox setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Numberbox setLabelVisible(boolean)
-controlP5.Controller : Numberbox setLock(boolean)
-controlP5.Controller : Numberbox setMax(float)
-controlP5.Controller : Numberbox setMin(float)
-controlP5.Controller : Numberbox setMouseOver(boolean)
-controlP5.Controller : Numberbox setMoveable(boolean)
-controlP5.Controller : Numberbox setPosition(PVector)
-controlP5.Controller : Numberbox setPosition(float, float)
-controlP5.Controller : Numberbox setSize(PImage)
-controlP5.Controller : Numberbox setSize(int, int)
-controlP5.Controller : Numberbox setStringValue(String)
-controlP5.Controller : Numberbox setUpdate(boolean)
-controlP5.Controller : Numberbox setValueLabel(String)
-controlP5.Controller : Numberbox setView(ControllerView)
-controlP5.Controller : Numberbox setVisible(boolean)
-controlP5.Controller : Numberbox setWidth(int)
-controlP5.Controller : Numberbox show()
-controlP5.Controller : Numberbox unlock()
-controlP5.Controller : Numberbox unplugFrom(Object)
-controlP5.Controller : Numberbox unplugFrom(Object[])
-controlP5.Controller : Numberbox unregisterTooltip()
-controlP5.Controller : Numberbox update()
-controlP5.Controller : Numberbox updateSize()
-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)
-
-
-*/
-
-
-
-
Modifier and Type | -Field and Description | -
---|---|
static int |
-autoHeight |
-
static int |
-autoWidth |
-
static int |
-DOWN |
-
static int |
-LEFT |
-
static int |
-RIGHT |
-
static int |
-UP |
-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Numberbox(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend Numberbox.
- |
-
Numberbox(ControlP5 theControlP5,
- Tab theParent,
- java.lang.String theName,
- float theDefaultValue,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
Modifier and Type | -Method and Description | -
---|---|
float |
-getMultiplier() |
-
Numberbox |
-linebreak() |
-
void |
-mousePressed() |
-
void |
-mouseReleased() |
-
void |
-mouseReleasedOutside() |
-
Numberbox |
-scrolled(int theRotationValue)
-changes the value of the numberbox when hovering and using the mouse wheel or the scroll
- function of a multi-touch track pad.
- |
-
Numberbox |
-setDirection(int theValue)
-set the direction for changing the numberbox value when dragging the mouse.
- |
-
Numberbox |
-setMultiplier(float theMultiplier) |
-
Numberbox |
-setRange(float theMin,
- float theMax) |
-
Numberbox |
-setScrollSensitivity(float theValue)
-sets the sensitivity for the scroll behavior when using the mouse wheel or the scroll
- function of a multi-touch track pad.
- |
-
Numberbox |
-setSensitivity(float theValue)
-Deprecated.
- |
-
Numberbox |
-setValue(float theValue)
-set the value of the numberbox.
- |
-
Numberbox |
-shuffle()
-assigns a random value to the controller.
- |
-
Numberbox |
-update()
-updates the value of the controller without having to set the value explicitly.
- |
-
Numberbox |
-updateDisplayMode(int theMode) |
-
Numberbox |
-updateInternalEvents(processing.core.PApplet theApplet)
-a method for putting input events like e.g.
- |
-
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, draw, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getInfo, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setHeight, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, setWidth, show, toString, unlock, unplugFrom, unplugFrom, unregisterTooltip, updateAbsolutePosition, updateEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public static int autoHeight-
public static int autoWidth-
public static int DOWN-
public static int LEFT-
public static int RIGHT-
public static int UP-
public Numberbox(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public Numberbox(ControlP5 theControlP5, - Tab theParent, - java.lang.String theName, - float theDefaultValue, - int theX, - int theY, - int theWidth, - int theHeight)-
theControlP5
- ControlP5theParent
- TabtheName
- StringtheDefaultValue
- floattheX
- inttheY
- inttheWidth
- inttheHeight
- intpublic float getMultiplier()-
public Numberbox linebreak()-
linebreak
in class Controller<Numberbox>
public void mousePressed()-
public void mouseReleased()-
public void mouseReleasedOutside()-
public Numberbox scrolled(int theRotationValue)-
theRotationValue
- public Numberbox setDirection(int theValue)-
theValue
- public Numberbox setMultiplier(float theMultiplier)-
theMultiplier
- public Numberbox setRange(float theMin, - float theMax)-
public Numberbox setScrollSensitivity(float theValue)-
theValue
- @Deprecated -public Numberbox setSensitivity(float theValue)-
theValue
- setScrollSensitivity(float)
public Numberbox setValue(float theValue)-
setValue
in interface ControllerInterface<Numberbox>
setValue
in class Controller<Numberbox>
theValue
- floatpublic Numberbox shuffle()-
public Numberbox update()-
Controller
update
in interface ControllerInterface<Numberbox>
update
in class Controller<Numberbox>
Controller.setUpdate(boolean)
,
-Controller.isUpdate()
public Numberbox updateDisplayMode(int theMode)-
public Numberbox updateInternalEvents(processing.core.PApplet theApplet)-
ControllerInterface
updateInternalEvents
in interface ControllerInterface<Numberbox>
updateInternalEvents
in class Controller<Numberbox>
ControllerInterface.updateInternalEvents
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Pointer.html b/reference/controlP5/Pointer.html deleted file mode 100644 index 7855a9f..0000000 --- a/reference/controlP5/Pointer.html +++ /dev/null @@ -1,305 +0,0 @@ - - - - - -public interface Pointer
-processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Println.html b/reference/controlP5/Println.html deleted file mode 100644 index 485fd89..0000000 --- a/reference/controlP5/Println.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - -public class Println
-extends java.lang.Object
-Constructor and Description | -
---|
Println(Textarea theTextarea) |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-clear() |
-
void |
-pause() |
-
void |
-play() |
-
Println |
-setMax(int theMax) |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Radio.html b/reference/controlP5/Radio.html deleted file mode 100644 index 12b3f06..0000000 --- a/reference/controlP5/Radio.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - - -public class Radio -extends RadioButton-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Radio(ControlP5 theControlP5,
- ControllerGroup<?> theParent,
- java.lang.String theName,
- int theX,
- int theY) |
-
activate, activate, addItem, addItem, align, align, alignX, alignY, controlEvent, deactivate, deactivate, deactivateAll, getAlign, getInfo, getItem, getItem, getItems, getState, getState, hideLabels, plugTo, plugTo, removeItem, setArrayValue, setColorLabels, setImage, setImage, setImages, setItemHeight, setItemsPerRow, setItemWidth, setLabelPadding, setNoneSelectedAllowed, setSize, setSize, setSpacingColumn, setSpacingRow, showLabels, toggle, toUpperCase, updateLayout
activateEvent, addListener, getBackgroundHeight, getBarHeight, listenerSize, mousePressed, removeListener, setBackgroundColor, setBackgroundHeight, setBarHeight, stringValue, toString, updateInternalEvents
absolutePosition, add, addCanvas, addCloseButton, addDrawable, arrayValue, bringToFront, bringToFront, close, color, continuousUpdateEvents, controller, disableCollapse, draw, enableCollapse, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getCaptionLabel, getColor, getController, getHeight, getId, getName, getParent, getPickingColor, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getWidth, getWindow, hide, hideArrow, hideBar, id, init, isBarVisible, isCollapse, isMouseOver, isMoveable, isOpen, isUpdate, isVisible, keyEvent, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, name, open, parent, position, registerProperty, registerProperty, remove, remove, remove, removeCanvas, removeCloseButton, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorForeground, setColorLabel, setColorValue, setGroup, setGroup, setHeight, setId, setLabel, setMouseOver, setMousePressed, setMoveable, setOpen, setPosition, setPosition, setStringValue, setTab, setTab, setTab, setTitle, setUpdate, setValue, setVisible, setWidth, show, showArrow, showBar, update, updateAbsolutePosition, updateEvents, value
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public Radio(ControlP5 theControlP5, - ControllerGroup<?> theParent, - java.lang.String theName, - int theX, - int theY)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/RadioButton.html b/reference/controlP5/RadioButton.html deleted file mode 100644 index 858663a..0000000 --- a/reference/controlP5/RadioButton.html +++ /dev/null @@ -1,1370 +0,0 @@ - - - - - -public class RadioButton -extends ControlGroup<RadioButton>-
/**
-* ControlP5 RadioButton
-*
-*
-* find a list of public methods available for the RadioButton 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);
-
-RadioButton r;
-
-void setup() {
- size(700,400);
-
- cp5 = new ControlP5(this);
- r = cp5.addRadioButton("radioButton")
- .setPosition(20,160)
- .setSize(40,20)
- .setColorForeground(color(120))
- .setColorActive(color(255))
- .setColorLabel(color(255))
- .setItemsPerRow(5)
- .setSpacingColumn(50)
- .addItem("50",1)
- .addItem("100",2)
- .addItem("150",3)
- .addItem("200",4)
- .addItem("250",5)
- ;
-
- for(Toggle t:r.getItems()) {
- t.captionLabel().setColorBackground(color(255,80));
- t.captionLabel().style().moveMargin(-7,0,0,-3);
- t.captionLabel().style().movePadding(7,0,0,3);
- t.captionLabel().style().backgroundWidth = 45;
- t.captionLabel().style().backgroundHeight = 13;
- }
-}
-
-
-void draw() {
- background(myColorBackground);
-}
-
-
-void keyPressed() {
- switch(key) {
- case('0'): r.deactivateAll(); break;
- case('1'): r.activate(0); break;
- case('2'): r.activate(1); break;
- case('3'): r.activate(2); break;
- case('4'): r.activate(3); break;
- case('5'): r.activate(4); break;
- }
-
-}
-
-void controlEvent(ControlEvent theEvent) {
- if(theEvent.isFrom(r)) {
- print("got an event from "+theEvent.getName()+"\t");
- for(int i=0;i
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
RadioButton(ControlP5 theControlP5,
- ControllerGroup<?> theParent,
- java.lang.String theName,
- int theX,
- int theY) |
-
RadioButton(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend RadioButton.
- |
-
Modifier and Type | -Method and Description | -
---|---|
RadioButton |
-activate(int theIndex)
-Deactivates all active RadioButton items and only activates the item corresponding to
- theIndex.
- |
-
RadioButton |
-activate(java.lang.String theName)
-Actives an item of the Radio button by name.
- |
-
RadioButton |
-addItem(java.lang.String theName,
- float theValue) |
-
RadioButton |
-addItem(Toggle theToggle,
- float theValue) |
-
RadioButton |
-align(int[] a) |
-
RadioButton |
-align(int theX,
- int theY) |
-
RadioButton |
-alignX(int theX) |
-
RadioButton |
-alignY(int theY) |
-
void |
-controlEvent(ControlEvent theEvent)
-controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about
- value changes.
- |
-
RadioButton |
-deactivate(int theIndex) |
-
RadioButton |
-deactivate(java.lang.String theName)
-Deactivates a RadioButton by name and sets the value of the RadioButton to the default value
- -1.
- |
-
RadioButton |
-deactivateAll() |
-
int[] |
-getAlign() |
-
java.lang.String |
-getInfo() |
-
Toggle |
-getItem(int theIndex)
-Gets a radio button item by index.
- |
-
Toggle |
-getItem(java.lang.String theName) |
-
java.util.List<Toggle> |
-getItems() |
-
boolean |
-getState(int theIndex)
-Gets the state of an item - this can be true (for on) or false (for off) - by index.
- |
-
boolean |
-getState(java.lang.String theName)
-Gets the state of an item - this can be true (for on) or false (for off) - by name.
- |
-
RadioButton |
-hideLabels() |
-
RadioButton |
-plugTo(java.lang.Object theObject) |
-
RadioButton |
-plugTo(java.lang.Object theObject,
- java.lang.String thePlugName) |
-
RadioButton |
-removeItem(java.lang.String theName) |
-
RadioButton |
-setArrayValue(float[] theArray)
-Sets the value for all RadioButton items according to the values of the array passed on.
- |
-
RadioButton |
-setColorLabels(int theColor) |
-
RadioButton |
-setImage(processing.core.PImage theImage) |
-
RadioButton |
-setImage(processing.core.PImage theImage,
- int theState) |
-
RadioButton |
-setImages(processing.core.PImage theDefaultImage,
- processing.core.PImage theOverImage,
- processing.core.PImage theActiveImage) |
-
RadioButton |
-setItemHeight(int theItemHeight)
-set the height of a radioButton/checkBox item.
- |
-
RadioButton |
-setItemsPerRow(int theValue)
-Items of a radioButton or a checkBox are organized in columns and rows.
- |
-
RadioButton |
-setItemWidth(int theItemWidth)
-set the width of a radioButton/checkBox item.
- |
-
RadioButton |
-setLabelPadding(int thePaddingX,
- int thePaddingY) |
-
RadioButton |
-setNoneSelectedAllowed(boolean theValue)
-In order to always have 1 item selected, use setNoneSelectedAllowed(false), by default this
- is true.
- |
-
RadioButton |
-setSize(int theWidth,
- int theHeight) |
-
RadioButton |
-setSize(processing.core.PImage theImage) |
-
RadioButton |
-setSpacingColumn(int theSpacing)
-Sets the spacing in pixels between columns.
- |
-
RadioButton |
-setSpacingRow(int theSpacing)
-Sets the spacing in pixels between rows.
- |
-
RadioButton |
-showLabels() |
-
RadioButton |
-toggle(int theIndex) |
-
RadioButton |
-toUpperCase(boolean theValue) |
-
void |
-updateLayout() |
-
activateEvent, addListener, getBackgroundHeight, getBarHeight, listenerSize, mousePressed, removeListener, setBackgroundColor, setBackgroundHeight, setBarHeight, stringValue, toString, updateInternalEvents
absolutePosition, add, addCanvas, addCloseButton, addDrawable, arrayValue, bringToFront, bringToFront, close, color, continuousUpdateEvents, controller, disableCollapse, draw, enableCollapse, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getCaptionLabel, getColor, getController, getHeight, getId, getName, getParent, getPickingColor, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getWidth, getWindow, hide, hideArrow, hideBar, id, init, isBarVisible, isCollapse, isMouseOver, isMoveable, isOpen, isUpdate, isVisible, keyEvent, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, name, open, parent, position, registerProperty, registerProperty, remove, remove, remove, removeCanvas, removeCloseButton, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorForeground, setColorLabel, setColorValue, setGroup, setGroup, setHeight, setId, setLabel, setMouseOver, setMousePressed, setMoveable, setOpen, setPosition, setPosition, setStringValue, setTab, setTab, setTab, setTitle, setUpdate, setValue, setVisible, setWidth, show, showArrow, showBar, update, updateAbsolutePosition, updateEvents, value
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public RadioButton(ControlP5 theControlP5, - ControllerGroup<?> theParent, - java.lang.String theName, - int theX, - int theY)-
theControlP5
- theParent
- theName
- theX
- theY
- public RadioButton(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public RadioButton activate(int theIndex)-
theIndex
- public RadioButton activate(java.lang.String theName)-
theName
- public RadioButton addItem(java.lang.String theName, - float theValue)-
theName
- theValue
- public RadioButton addItem(Toggle theToggle, - float theValue)-
theToggle
- theValue
- public RadioButton align(int[] a)-
public RadioButton align(int theX, - int theY)-
public RadioButton alignX(int theX)-
public RadioButton alignY(int theY)-
public void controlEvent(ControlEvent theEvent)-
controlEvent
in interface ControlListener
controlEvent
in class ControlGroup<RadioButton>
theEvent
- ControlEventCallbackListener
,
-CallbackEvent
public RadioButton deactivate(int theIndex)-
theIndex
- public RadioButton deactivate(java.lang.String theName)-
theName
- public RadioButton deactivateAll()-
public int[] getAlign()-
public java.lang.String getInfo()-
ControlGroup
getInfo
in class ControlGroup<RadioButton>
public Toggle getItem(int theIndex)-
theIndex
- public Toggle getItem(java.lang.String theName)-
public java.util.List<Toggle> getItems()-
public boolean getState(int theIndex)-
theIndex
- public boolean getState(java.lang.String theName)-
theName
- public RadioButton hideLabels()-
public RadioButton plugTo(java.lang.Object theObject)-
public RadioButton plugTo(java.lang.Object theObject, - java.lang.String thePlugName)-
public RadioButton removeItem(java.lang.String theName)-
theName
- public RadioButton setArrayValue(float[] theArray)-
setArrayValue
in interface ControllerInterface<RadioButton>
setArrayValue
in class ControllerGroup<RadioButton>
public RadioButton setColorLabels(int theColor)-
public RadioButton setImage(processing.core.PImage theImage)-
theImage
- public RadioButton setImage(processing.core.PImage theImage, - int theState)-
theImage
- theState
- use Controller.DEFAULT (background), or Controller.OVER (foreground), or
- Controller.ACTIVE (active)public RadioButton setImages(processing.core.PImage theDefaultImage, - processing.core.PImage theOverImage, - processing.core.PImage theActiveImage)-
theDefaultImage
- theOverImage
- theActiveImage
- public RadioButton setItemHeight(int theItemHeight)-
theItemHeight
- public RadioButton setItemsPerRow(int theValue)-
theValue
- public RadioButton setItemWidth(int theItemWidth)-
theItemWidth
- public RadioButton setLabelPadding(int thePaddingX, - int thePaddingY)-
public RadioButton setNoneSelectedAllowed(boolean theValue)-
theValue
- public RadioButton setSize(int theWidth, - int theHeight)-
setSize
in class ControlGroup<RadioButton>
public RadioButton setSize(processing.core.PImage theImage)-
public RadioButton setSpacingColumn(int theSpacing)-
theSpacing
- public RadioButton setSpacingRow(int theSpacing)-
theSpacing
- public RadioButton showLabels()-
public RadioButton toggle(int theIndex)-
theIndex
- public RadioButton toUpperCase(boolean theValue)-
public void updateLayout()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Range.html b/reference/controlP5/Range.html deleted file mode 100644 index 32572af..0000000 --- a/reference/controlP5/Range.html +++ /dev/null @@ -1,1370 +0,0 @@ - - - - - -public class Range -extends Controller<Range>-
Slider
/**
-* ControlP5 Range
-*
-* find a list of public methods available for the Range 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 colorMin = 100;
-
-int colorMax = 100;
-
-Range range;
-
-void setup() {
- size(700,400);
- cp5 = new ControlP5(this);
- range = cp5.addRange("rangeController")
- // disable broadcasting since setRange and setRangeValues will trigger an event
- .setBroadcast(false)
- .setPosition(50,50)
- .setSize(400,40)
- .setHandleSize(20)
- .setRange(0,255)
- .setRangeValues(50,100)
- // after the initialization we turn broadcast back on again
- .setBroadcast(true)
- .setColorForeground(color(255,40))
- .setColorBackground(color(255,40))
- ;
-
- noStroke();
-}
-
-void draw() {
- background(colorMax);
- fill(colorMin);
- rect(0,0,width,height/2);
-}
-
-void controlEvent(ControlEvent theControlEvent) {
- if(theControlEvent.isFrom("rangeController")) {
- // min and max values are stored in an array.
- // access this array with controller().arrayValue().
- // min is at index 0, max is at index 1.
- colorMin = int(theControlEvent.getController().getArrayValue(0));
- colorMax = int(theControlEvent.getController().getArrayValue(1));
- println("range update, done.");
- }
-
-}
-
-
-void keyPressed() {
- switch(key) {
- case('1'):range.setLowValue(0);break;
- case('2'):range.setLowValue(100);break;
- case('3'):range.setHighValue(120);break;
- case('4'):range.setHighValue(200);break;
- case('5'):range.setRangeValues(40,60);break;
- }
-}
-
-
-/*
-a list of all methods available for the Range Controller
-use ControlP5.printPublicMethodsFor(Range.class);
-to print the following list into the console.
-
-You can find further details about class Range in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-
-controlP5.Range : Range setArrayValue(float[])
-controlP5.Range : Range setColorCaptionLabel(int)
-controlP5.Range : Range setColorTickMark(int)
-controlP5.Range : Range setColorValueLabel(int)
-controlP5.Range : Range setHandleSize(int)
-controlP5.Range : Range setHeight(int)
-controlP5.Range : Range setHighValue(float)
-controlP5.Range : Range setHighValueLabel(String)
-controlP5.Range : Range setLowValue(float)
-controlP5.Range : Range setLowValueLabel(String)
-controlP5.Range : Range setMax(float)
-controlP5.Range : Range setMin(float)
-controlP5.Range : Range setNumberOfTickMarks(int)
-controlP5.Range : Range setRange(float, float)
-controlP5.Range : Range setRangeValues(float, float)
-controlP5.Range : Range setWidth(int)
-controlP5.Range : Range showTickMarks(boolean)
-controlP5.Range : Range snapToTickMarks(boolean)
-controlP5.Range : ArrayList getTickMarks()
-controlP5.Range : float getHighValue()
-controlP5.Range : float getLowValue()
-controlP5.Range : float[] getArrayValue()
-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 : 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 : Range addCallback(CallbackListener)
-controlP5.Controller : Range addListener(ControlListener)
-controlP5.Controller : Range bringToFront()
-controlP5.Controller : Range bringToFront(ControllerInterface)
-controlP5.Controller : Range hide()
-controlP5.Controller : Range linebreak()
-controlP5.Controller : Range listen(boolean)
-controlP5.Controller : Range lock()
-controlP5.Controller : Range plugTo(Object)
-controlP5.Controller : Range plugTo(Object, String)
-controlP5.Controller : Range plugTo(Object[])
-controlP5.Controller : Range plugTo(Object[], String)
-controlP5.Controller : Range registerProperty(String)
-controlP5.Controller : Range registerProperty(String, String)
-controlP5.Controller : Range registerTooltip(String)
-controlP5.Controller : Range removeBehavior()
-controlP5.Controller : Range removeCallback()
-controlP5.Controller : Range removeCallback(CallbackListener)
-controlP5.Controller : Range removeListener(ControlListener)
-controlP5.Controller : Range removeProperty(String)
-controlP5.Controller : Range removeProperty(String, String)
-controlP5.Controller : Range setArrayValue(float[])
-controlP5.Controller : Range setArrayValue(int, float)
-controlP5.Controller : Range setBehavior(ControlBehavior)
-controlP5.Controller : Range setBroadcast(boolean)
-controlP5.Controller : Range setCaptionLabel(String)
-controlP5.Controller : Range setColor(CColor)
-controlP5.Controller : Range setColorActive(int)
-controlP5.Controller : Range setColorBackground(int)
-controlP5.Controller : Range setColorCaptionLabel(int)
-controlP5.Controller : Range setColorForeground(int)
-controlP5.Controller : Range setColorValueLabel(int)
-controlP5.Controller : Range setDecimalPrecision(int)
-controlP5.Controller : Range setDefaultValue(float)
-controlP5.Controller : Range setHeight(int)
-controlP5.Controller : Range setId(int)
-controlP5.Controller : Range setImages(PImage, PImage, PImage)
-controlP5.Controller : Range setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Range setLabelVisible(boolean)
-controlP5.Controller : Range setLock(boolean)
-controlP5.Controller : Range setMax(float)
-controlP5.Controller : Range setMin(float)
-controlP5.Controller : Range setMouseOver(boolean)
-controlP5.Controller : Range setMoveable(boolean)
-controlP5.Controller : Range setPosition(PVector)
-controlP5.Controller : Range setPosition(float, float)
-controlP5.Controller : Range setSize(PImage)
-controlP5.Controller : Range setSize(int, int)
-controlP5.Controller : Range setStringValue(String)
-controlP5.Controller : Range setUpdate(boolean)
-controlP5.Controller : Range setValueLabel(String)
-controlP5.Controller : Range setView(ControllerView)
-controlP5.Controller : Range setVisible(boolean)
-controlP5.Controller : Range setWidth(int)
-controlP5.Controller : Range show()
-controlP5.Controller : Range unlock()
-controlP5.Controller : Range unplugFrom(Object)
-controlP5.Controller : Range unplugFrom(Object[])
-controlP5.Controller : Range unregisterTooltip()
-controlP5.Controller : Range update()
-controlP5.Controller : Range updateSize()
-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)
-
-
-*/
-
-
-
-
Modifier and Type | -Field and Description | -
---|---|
int |
-alignValueLabel |
-
static int |
-autoHeight |
-
static processing.core.PVector |
-autoSpacing |
-
static int |
-autoWidth |
-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
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) |
-
Range(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend Range.
- |
-
Modifier and Type | -Method and Description | -
---|---|
float[] |
-arrayValue()
-Deprecated.
- |
-
float[] |
-getArrayValue()
-returns the current float array value of a controller.
- |
-
float |
-getHighValue() |
-
float |
-getLowValue() |
-
TickMark |
-getTickMark() |
-
java.util.ArrayList<TickMark> |
-getTickMarks() |
-
float |
-highValue()
-Deprecated.
- |
-
float |
-lowValue()
-Deprecated.
- |
-
void |
-mousePressed() |
-
void |
-mouseReleased() |
-
void |
-mouseReleasedOutside() |
-
void |
-onLeave() |
-
Range |
-setArrayValue(float[] theArray) |
-
Range |
-setColorCaptionLabel(int theColor) |
-
Range |
-setColorTickMark(int theColor) |
-
Range |
-setColorValueLabel(int theColor) |
-
Range |
-setDraggable(boolean theFlag) |
-
Range |
-setHandleSize(int theSize) |
-
Range |
-setHeight(int theValue) |
-
Range |
-setHighValue(float theValue) |
-
Range |
-setHighValueLabel(java.lang.String theLabel) |
-
Range |
-setLowValue(float theValue) |
-
Range |
-setLowValueLabel(java.lang.String theLabel) |
-
Range |
-setMax(float theValue)
-sets the maximum value of the Controller.
- |
-
Range |
-setMin(float theValue)
-sets the minimum value of the Controller.
- |
-
Range |
-setNumberOfTickMarks(int theNumber) |
-
Range |
-setRange(float theMinValue,
- float theMaxValue) |
-
Range |
-setRangeValues(float theLowValue,
- float theHighValue) |
-
Range |
-setSliderMode(int theMode) |
-
Range |
-setValue(float theValue)
-set the value of the range-slider.
- |
-
Range |
-setWidth(int theValue) |
-
Range |
-showTickMarks(boolean theFlag) |
-
Range |
-snapToTickMarks(boolean theFlag) |
-
java.lang.String |
-toString() |
-
Range |
-update()
-updates the value of the controller without having to set the value explicitly.
- |
-
Range |
-updateDisplayMode(int theMode) |
-
Range |
-updateInternalEvents(processing.core.PApplet theApplet)
-a method for putting input events like e.g.
- |
-
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, draw, getAbsolutePosition, getAddress, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getInfo, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorForeground, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, show, unlock, unplugFrom, unplugFrom, unregisterTooltip, updateAbsolutePosition, updateEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public int alignValueLabel-
public static int autoHeight-
public static processing.core.PVector autoSpacing-
public static int autoWidth-
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)-
theControlP5
- ControlP5theParent
- ControllerGrouptheName
- StringtheMin
- floattheMax
- floattheDefaultValue
- floattheX
- inttheY
- inttheWidth
- inttheHeight
- intpublic Range(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
@Deprecated -public float[] arrayValue()-
arrayValue
in class Controller<Range>
public float[] getArrayValue()-
Controller
getArrayValue
in interface ControllerInterface<Range>
getArrayValue
in class Controller<Range>
Controller.getValue()
,
-Controller.getStringValue()
public float getHighValue()-
public float getLowValue()-
public TickMark getTickMark()-
public java.util.ArrayList<TickMark> getTickMarks()-
@Deprecated -public float highValue()-
@Deprecated -public float lowValue()-
public void mousePressed()-
public void mouseReleased()-
public void mouseReleasedOutside()-
public void onLeave()-
public Range setArrayValue(float[] theArray)-
setArrayValue
in interface ControllerInterface<Range>
setArrayValue
in class Controller<Range>
public Range setColorCaptionLabel(int theColor)-
Controller
setColorCaptionLabel
in class Controller<Range>
public Range setColorTickMark(int theColor)-
public Range setColorValueLabel(int theColor)-
setColorValueLabel
in class Controller<Range>
public Range setDraggable(boolean theFlag)-
public Range setHandleSize(int theSize)-
public Range setHeight(int theValue)-
setHeight
in class Controller<Range>
public Range setHighValue(float theValue)-
public Range setHighValueLabel(java.lang.String theLabel)-
public Range setLowValue(float theValue)-
public Range setLowValueLabel(java.lang.String theLabel)-
public Range setMax(float theValue)-
Controller
setMax
in class Controller<Range>
theValue
- floatpublic Range setMin(float theValue)-
Controller
setMin
in class Controller<Range>
theValue
- floatpublic Range setNumberOfTickMarks(int theNumber)-
public Range setRange(float theMinValue, - float theMaxValue)-
public Range setRangeValues(float theLowValue, - float theHighValue)-
public Range setSliderMode(int theMode)-
public Range setValue(float theValue)-
setValue
in interface ControllerInterface<Range>
setValue
in class Controller<Range>
theValue
- floatsetLowValue(float)
,
-setHighValue(float)
,
-setRangeValues(float, float)
public Range setWidth(int theValue)-
setWidth
in class Controller<Range>
public Range showTickMarks(boolean theFlag)-
public Range snapToTickMarks(boolean theFlag)-
public java.lang.String toString()-
toString
in class Controller<Range>
public Range update()-
Controller
update
in interface ControllerInterface<Range>
update
in class Controller<Range>
Controller.setUpdate(boolean)
,
-Controller.isUpdate()
public Range updateDisplayMode(int theMode)-
public Range updateInternalEvents(processing.core.PApplet theApplet)-
ControllerInterface
updateInternalEvents
in interface ControllerInterface<Range>
updateInternalEvents
in class Controller<Range>
ControllerInterface.updateInternalEvents
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ScrollableList.ScrollableListView.html b/reference/controlP5/ScrollableList.ScrollableListView.html deleted file mode 100644 index 954deb1..0000000 --- a/reference/controlP5/ScrollableList.ScrollableListView.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - -public static class ScrollableList.ScrollableListView -extends java.lang.Object -implements ControllerView<ScrollableList>-
Constructor and Description | -
---|
ScrollableList.ScrollableListView() |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-display(processing.core.PGraphics g,
- ScrollableList c)
-draws your custom controllers.
- |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ScrollableList.ScrollableListView()-
public void display(processing.core.PGraphics g, - ScrollableList c)-
ControllerView
display
in interface ControllerView<ScrollableList>
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/ScrollableList.html b/reference/controlP5/ScrollableList.html deleted file mode 100644 index 1e1bdd8..0000000 --- a/reference/controlP5/ScrollableList.html +++ /dev/null @@ -1,842 +0,0 @@ - - - - - -public class ScrollableList -extends Controller<ScrollableList> -implements ControlListener-
/**
- * ControlP5 ScrollableList
- *
- * replaces DropdownList and and ListBox.
- * List can be scrolled by dragging the list or using the scroll-wheel.
- *
- * by Andreas Schlegel, 2014
- * www.sojamo.de/libraries/controlp5
- *
- */
-
-
-import controlP5.*;
-import java.util.*;
-
-
-ControlP5 cp5;
-
-void setup() {
- size(400, 400);
- cp5 = new ControlP5(this);
- List l = Arrays.asList("a", "b", "c", "d", "e", "f", "g", "h");
- /* add a ScrollableList, by default it behaves like a DropdownList */
- cp5.addScrollableList("dropdown").setPosition(100, 100).setSize(200, 100).setItemHeight(20).addItems(l);
-}
-
-void draw() {
- background(240);
-}
-
-void dropdown(int n) {
- println(n, cp5.get(ScrollableList.class, "dropdown").getItem(n).get("text"));
- List l = Arrays.asList("a-1", "b-1", "c-1", "d-1", "e-1", "f-1", "g-1", "h-1", "i-1", "j-1", "k-1");
- cp5.get(ScrollableList.class, "dropdown").setItems(l);
-}
-
-void keyPressed() {
- switch(key) {
- case('1'):
- /* make the ScrollableList behave like a ListBox */
- cp5.get(ScrollableList.class, "dropdown").setType(ControlP5.LIST);
- break;
- case('2'):
- /* make the ScrollableList behave like a DropdownList */
- cp5.get(ScrollableList.class, "dropdown").setType(ControlP5.DROPDOWN);
- break;
- }
-}
-
-
Modifier and Type | -Class and Description | -
---|---|
static class |
-ScrollableList.ScrollableListView |
-
Modifier and Type | -Field and Description | -
---|---|
static int |
-CHECKBOX |
-
static int |
-DROPDOWN |
-
static int |
-LIST |
-
static int |
-TREE |
-
autoHeight, autoSpacing, autoWidth
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
ScrollableList(ControlP5 theControlP5,
- java.lang.String theName) |
-
Modifier and Type | -Method and Description | -
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
-addItem(java.lang.String theName,
- java.lang.Object theValue)
-Adds an item to the ScrollableList.
- |
-
ScrollableList |
-addItems(java.util.List<?> theItems) |
-
ScrollableList |
-addItems(java.util.List<?> theItems,
- int theOffset) |
-
ScrollableList |
-addItems(java.lang.String[] theItems)
-adds a list of items from a string array.
- |
-
ScrollableList |
-clear() |
-
void |
-controlEvent(ControlEvent theEvent)
-controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about
- value changes.
- |
-
int |
-getBackgroundColor() |
-
int |
-getHeight() |
-
java.util.Map<java.lang.String,java.lang.Object> |
-getItem(int theIndex)
-returns a listBoxItem by index form the list of
- items.
- |
-
java.util.Map<java.lang.String,java.lang.Object> |
-getItem(java.lang.String theItemName)
-TODO faulty returns a listBoxItem by name.
- |
-
java.util.List |
-getItems() |
-
boolean |
-isBarVisible() |
-
boolean |
-isOpen() |
-
void |
-keyEvent(processing.event.KeyEvent theKeyEvent) |
-
ScrollableList |
-removeItem(java.lang.String theItemName)
-Removes an item from the ScrollableList using the
- unique name of the item given when added to the list.
- |
-
ScrollableList |
-setBackgroundColor(int theColor) |
-
ScrollableList |
-setBarHeight(int theHeight) |
-
ScrollableList |
-setBarVisible(boolean b) |
-
void |
-setDirection(int theDirection) |
-
ScrollableList |
-setItemHeight(int theHeight) |
-
ScrollableList |
-setItems(java.util.List<?> theItems) |
-
ScrollableList |
-setItems(java.util.List<?> theItems,
- int theOffset) |
-
ScrollableList |
-setItems(java.lang.String[] theItems) |
-
ScrollableList |
-setOpen(boolean b) |
-
ScrollableList |
-setScrollSensitivity(float theSensitivity) |
-
ScrollableList |
-setType(int theType) |
-
ScrollableList |
-updateDisplayMode(int theMode) |
-
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, draw, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getId, getInfo, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setHeight, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValue, setValueLabel, setValueSelf, setView, setView, setVisible, setWidth, show, toString, unlock, unplugFrom, unplugFrom, unregisterTooltip, update, updateAbsolutePosition, updateEvents, updateInternalEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public static final int CHECKBOX-
public static final int DROPDOWN-
public static final int LIST-
public static final int TREE-
public ScrollableList(ControlP5 theControlP5, - java.lang.String theName)-
public java.util.Map<java.lang.String,java.lang.Object> addItem(java.lang.String theName, - java.lang.Object theValue)-
theName
- StringtheValue
- intcontrolP5.ListBox#removeItem(String,int)
public ScrollableList addItems(java.util.List<?> theItems)-
public ScrollableList addItems(java.util.List<?> theItems, - int theOffset)-
public ScrollableList addItems(java.lang.String[] theItems)-
theItems
- public ScrollableList clear()-
public void controlEvent(ControlEvent theEvent)-
ControlListener
controlEvent
in interface ControlListener
theEvent
- ControlEventCallbackListener
,
-CallbackEvent
public int getBackgroundColor()-
public int getHeight()-
getHeight
in interface ControllerInterface<ScrollableList>
getHeight
in class Controller<ScrollableList>
public java.util.Map<java.lang.String,java.lang.Object> getItem(int theIndex)-
theIndex
- public java.util.Map<java.lang.String,java.lang.Object> getItem(java.lang.String theItemName)-
theItemName
- public java.util.List getItems()-
public boolean isBarVisible()-
public boolean isOpen()-
public void keyEvent(processing.event.KeyEvent theKeyEvent)-
keyEvent
in interface ControllerInterface<ScrollableList>
keyEvent
in class Controller<ScrollableList>
public ScrollableList removeItem(java.lang.String theItemName)-
theItemName
- StringListBox.addItem(String,int)
public ScrollableList setBackgroundColor(int theColor)-
public ScrollableList setBarHeight(int theHeight)-
public ScrollableList setBarVisible(boolean b)-
public void setDirection(int theDirection)-
public ScrollableList setItemHeight(int theHeight)-
public ScrollableList setItems(java.util.List<?> theItems)-
public ScrollableList setItems(java.util.List<?> theItems, - int theOffset)-
public ScrollableList setItems(java.lang.String[] theItems)-
public ScrollableList setOpen(boolean b)-
public ScrollableList setScrollSensitivity(float theSensitivity)-
public ScrollableList setType(int theType)-
public ScrollableList updateDisplayMode(int theMode)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Slider.html b/reference/controlP5/Slider.html deleted file mode 100644 index 7ac7826..0000000 --- a/reference/controlP5/Slider.html +++ /dev/null @@ -1,1453 +0,0 @@ - - - - - -public class Slider -extends Controller<Slider>-
/**
- * ControlP5 Slider. Horizontal and vertical sliders,
- * with and without tick marks and snap-to-tick behavior.
- * by andreas schlegel, 2010
- */
-
-/**
-* ControlP5 Slider
-*
-* Horizontal and vertical sliders,
-* With and without tick marks and snap-to-tick behavior.
-*
-* find a list of public methods available for the Slider Controller
-* at the bottom of this sketch.
-*
-* by Andreas Schlegel, 2012
-* www.sojamo.de/libraries/controlp5
-*
-*/
-
-import controlP5.*;
-
-ControlP5 cp5;
-int myColor = color(0,0,0);
-
-int sliderValue = 100;
-int sliderTicks1 = 100;
-int sliderTicks2 = 30;
-Slider abc;
-
-void setup() {
- size(700,400);
- noStroke();
- cp5 = new ControlP5(this);
-
- // add a horizontal sliders, the value of this slider will be linked
- // to variable 'sliderValue'
- cp5.addSlider("sliderValue")
- .setPosition(100,50)
- .setRange(0,255)
- ;
-
- // create another slider with tick marks, now without
- // default value, the initial value will be set according to
- // the value of variable sliderTicks2 then.
- cp5.addSlider("sliderTicks1")
- .setPosition(100,140)
- .setSize(20,100)
- .setRange(0,255)
- .setNumberOfTickMarks(5)
- ;
-
-
- // add a vertical slider
- cp5.addSlider("slider")
- .setPosition(100,305)
- .setSize(200,20)
- .setRange(0,200)
- .setValue(128)
- ;
-
- // reposition the Label for controller 'slider'
- cp5.getController("slider").getValueLabel().align(ControlP5.LEFT, ControlP5.BOTTOM_OUTSIDE).setPaddingX(0);
- cp5.getController("slider").getCaptionLabel().align(ControlP5.RIGHT, ControlP5.BOTTOM_OUTSIDE).setPaddingX(0);
-
-
- cp5.addSlider("sliderTicks2")
- .setPosition(100,370)
- .setWidth(400)
- .setRange(255,0) // values can range from big to small as well
- .setValue(128)
- .setNumberOfTickMarks(7)
- .setSliderMode(Slider.FLEXIBLE)
- ;
- // use Slider.FIX or Slider.FLEXIBLE to change the slider handle
- // by default it is Slider.FIX
-
-
-}
-
-void draw() {
- background(sliderTicks1);
-
- fill(sliderValue);
- rect(0,0,width,100);
-
- fill(myColor);
- rect(0,280,width,70);
-
- fill(sliderTicks2);
- rect(0,350,width,50);
-}
-
-void slider(float theColor) {
- myColor = color(theColor);
- println("a slider event. setting background to "+theColor);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-/**
-* ControlP5 Slider
-*
-*
-* find a list of public methods available for the Slider Controller
-* at the bottom of this sketch.
-*
-* by Andreas Schlegel, 2012
-* www.sojamo.de/libraries/controlp5
-*
-*/
-
-/*
-a list of all methods available for the Slider Controller
-use ControlP5.printPublicMethodsFor(Slider.class);
-to print the following list into the console.
-
-You can find further details about class Slider in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-controlP5.Slider : ArrayList getTickMarks()
-controlP5.Slider : Slider setColorTickMark(int)
-controlP5.Slider : Slider setHandleSize(int)
-controlP5.Slider : Slider setHeight(int)
-controlP5.Slider : Slider setMax(float)
-controlP5.Slider : Slider setMin(float)
-controlP5.Slider : Slider setNumberOfTickMarks(int)
-controlP5.Slider : Slider setRange(float, float)
-controlP5.Slider : Slider setScrollSensitivity(float)
-controlP5.Slider : Slider setSize(int, int)
-controlP5.Slider : Slider setSliderMode(int)
-controlP5.Slider : Slider setTriggerEvent(int)
-controlP5.Slider : Slider setValue(float)
-controlP5.Slider : Slider setWidth(int)
-controlP5.Slider : Slider showTickMarks(boolean)
-controlP5.Slider : Slider shuffle()
-controlP5.Slider : Slider snapToTickMarks(boolean)
-controlP5.Slider : Slider update()
-controlP5.Slider : TickMark getTickMark(int)
-controlP5.Slider : float getValue()
-controlP5.Slider : float getValuePosition()
-controlP5.Slider : int getDirection()
-controlP5.Slider : int getHandleSize()
-controlP5.Slider : int getNumberOfTickMarks()
-controlP5.Slider : int getSliderMode()
-controlP5.Slider : int getTriggerEvent()
-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 : 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 : Slider addCallback(CallbackListener)
-controlP5.Controller : Slider addListener(ControlListener)
-controlP5.Controller : Slider bringToFront()
-controlP5.Controller : Slider bringToFront(ControllerInterface)
-controlP5.Controller : Slider hide()
-controlP5.Controller : Slider linebreak()
-controlP5.Controller : Slider listen(boolean)
-controlP5.Controller : Slider lock()
-controlP5.Controller : Slider plugTo(Object)
-controlP5.Controller : Slider plugTo(Object, String)
-controlP5.Controller : Slider plugTo(Object[])
-controlP5.Controller : Slider plugTo(Object[], String)
-controlP5.Controller : Slider registerProperty(String)
-controlP5.Controller : Slider registerProperty(String, String)
-controlP5.Controller : Slider registerTooltip(String)
-controlP5.Controller : Slider removeBehavior()
-controlP5.Controller : Slider removeCallback()
-controlP5.Controller : Slider removeCallback(CallbackListener)
-controlP5.Controller : Slider removeListener(ControlListener)
-controlP5.Controller : Slider removeProperty(String)
-controlP5.Controller : Slider removeProperty(String, String)
-controlP5.Controller : Slider setArrayValue(float[])
-controlP5.Controller : Slider setArrayValue(int, float)
-controlP5.Controller : Slider setBehavior(ControlBehavior)
-controlP5.Controller : Slider setBroadcast(boolean)
-controlP5.Controller : Slider setCaptionLabel(String)
-controlP5.Controller : Slider setColor(CColor)
-controlP5.Controller : Slider setColorActive(int)
-controlP5.Controller : Slider setColorBackground(int)
-controlP5.Controller : Slider setColorCaptionLabel(int)
-controlP5.Controller : Slider setColorForeground(int)
-controlP5.Controller : Slider setColorValueLabel(int)
-controlP5.Controller : Slider setDecimalPrecision(int)
-controlP5.Controller : Slider setDefaultValue(float)
-controlP5.Controller : Slider setHeight(int)
-controlP5.Controller : Slider setId(int)
-controlP5.Controller : Slider setImages(PImage, PImage, PImage)
-controlP5.Controller : Slider setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Slider setLabelVisible(boolean)
-controlP5.Controller : Slider setLock(boolean)
-controlP5.Controller : Slider setMax(float)
-controlP5.Controller : Slider setMin(float)
-controlP5.Controller : Slider setMouseOver(boolean)
-controlP5.Controller : Slider setMoveable(boolean)
-controlP5.Controller : Slider setPosition(PVector)
-controlP5.Controller : Slider setPosition(float, float)
-controlP5.Controller : Slider setSize(PImage)
-controlP5.Controller : Slider setSize(int, int)
-controlP5.Controller : Slider setStringValue(String)
-controlP5.Controller : Slider setUpdate(boolean)
-controlP5.Controller : Slider setValueLabel(String)
-controlP5.Controller : Slider setView(ControllerView)
-controlP5.Controller : Slider setVisible(boolean)
-controlP5.Controller : Slider setWidth(int)
-controlP5.Controller : Slider show()
-controlP5.Controller : Slider unlock()
-controlP5.Controller : Slider unplugFrom(Object)
-controlP5.Controller : Slider unplugFrom(Object[])
-controlP5.Controller : Slider unregisterTooltip()
-controlP5.Controller : Slider update()
-controlP5.Controller : Slider updateSize()
-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)
-
-
-*/
-
-
-
-
Modifier and Type | -Field and Description | -
---|---|
static int |
-FIX |
-
static int |
-FLEXIBLE |
-
autoSpacing
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Slider(ControlP5 theControlP5,
- ControllerGroup<?> theParent,
- java.lang.String theName,
- float theMin,
- float theMax,
- float theDefaultValue,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
Slider(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend Slider.
- |
-
Modifier and Type | -Method and Description | -
---|---|
int |
-getDirection() |
-
int |
-getHandleSize() |
-
float |
-getMax()
-returns the maximum value of the controller.
- |
-
float |
-getMin()
-returns the minimum value of the controller.
- |
-
int |
-getNumberOfTickMarks()
-returns the amount of tickmarks available for a slider
- |
-
int |
-getSliderMode() |
-
TickMark |
-getTickMark(int theIndex)
-returns an instance of a tickmark by index.
- |
-
java.util.ArrayList<TickMark> |
-getTickMarks()
-returns an ArrayList of available tick marks for a slider.
- |
-
int |
-getTriggerEvent()
-returns the current trigger event which is either Slider.PRESSED or Slider.RELEASE
- |
-
float |
-getValue() |
-
float |
-getValuePosition() |
-
void |
-init() |
-
Slider |
-linebreak() |
-
Slider |
-scrolled(int theRotationValue)
-changes the value of the slider when hovering and using the mouse wheel or the scroll
- function of a multi-touch track pad.
- |
-
Slider |
-setColorTickMark(int theColor)
-sets the color of tick marks if enabled.
- |
-
Slider |
-setHandleSize(int theSize)
-sets the size of the Slider handle, by default it is set to either the width or height of the
- slider.
- |
-
Slider |
-setHeight(int theValue)
-set the height of the slider.
- |
-
Slider |
-setMax(float theValue)
-set the maximum value of the slider.
- |
-
Slider |
-setMin(float theValue)
-sets the minimum value of the slider.
- |
-
Slider |
-setNumberOfTickMarks(int theNumber)
-sets the number of tickmarks for a slider, by default tick marks are turned off.
- |
-
Slider |
-setRange(float theMin,
- float theMax) |
-
Slider |
-setScrollSensitivity(float theValue)
-sets the sensitivity for the scroll behavior when using the mouse wheel or the scroll
- function of a multi-touch track pad.
- |
-
Slider |
-setSensitivity(float theValue)
-Deprecated.
- |
-
Slider |
-setSize(int theWidth,
- int theHeight) |
-
void |
-setSliderBarSize(int theSize)
-Deprecated.
- |
-
Slider |
-setSliderMode(int theMode)
-use the slider mode to set the mode of the slider bar, which can be Slider.FLEXIBLE or
- Slider.FIX
- |
-
Slider |
-setTriggerEvent(int theEventID)
-the trigger event is set to Slider.PRESSED by default but can be changed to Slider.RELEASE so
- that events are triggered when the slider is released.
- |
-
Slider |
-setValue(float theValue)
-set the value of the slider.
- |
-
Slider |
-setWidth(int theValue)
-set the width of the slider.
- |
-
Slider |
-showTickMarks(boolean theFlag)
-shows or hides tickmarks for a slider
- |
-
Slider |
-shuffle()
-assigns a random value to the slider.
- |
-
Slider |
-snapToTickMarks(boolean theFlag)
-enables or disables snap to tick marks.
- |
-
Slider |
-update()
-updates the value of the controller without having to set the value explicitly.
- |
-
Slider |
-updateDisplayMode(int theMode) |
-
Slider |
-updateInternalEvents(processing.core.PApplet theApplet)
-a method for putting input events like e.g.
- |
-
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, draw, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getInfo, getLabel, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValueLabel, getView, getWidth, getWindow, hide, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, show, toString, unlock, unplugFrom, unplugFrom, unregisterTooltip, updateAbsolutePosition, updateEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public static final int FIX-
public static final int FLEXIBLE-
public Slider(ControlP5 theControlP5, - ControllerGroup<?> theParent, - java.lang.String theName, - float theMin, - float theMax, - float theDefaultValue, - int theX, - int theY, - int theWidth, - int theHeight)-
public Slider(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public int getDirection()-
public int getHandleSize()-
public float getMax()-
Controller
getMax
in class Controller<Slider>
public float getMin()-
Controller
getMin
in class Controller<Slider>
public int getNumberOfTickMarks()-
public int getSliderMode()-
public TickMark getTickMark(int theIndex)-
theIndex
- TickMark
public java.util.ArrayList<TickMark> getTickMarks()-
public int getTriggerEvent()-
public float getValue()-
getValue
in interface ControllerInterface<Slider>
getValue
in class Controller<Slider>
Controller.getStringValue()
,
-Controller.getArrayValue()
public float getValuePosition()-
public void init()-
init
in interface ControllerInterface<Slider>
init
in class Controller<Slider>
public Slider linebreak()-
linebreak
in class Controller<Slider>
public Slider scrolled(int theRotationValue)-
theRotationValue
- public Slider setColorTickMark(int theColor)-
theColor
- public Slider setHandleSize(int theSize)-
theSize
- public Slider setHeight(int theValue)-
setHeight
in class Controller<Slider>
theValue
- intpublic Slider setMax(float theValue)-
setMax
in class Controller<Slider>
theValue
- floatpublic Slider setMin(float theValue)-
setMin
in class Controller<Slider>
theValue
- floatpublic Slider setNumberOfTickMarks(int theNumber)-
theNumber
- public Slider setRange(float theMin, - float theMax)-
public Slider setScrollSensitivity(float theValue)-
theValue
- @Deprecated -public Slider setSensitivity(float theValue)-
theValue
- setScrollSensitivity(float)
public Slider setSize(int theWidth, - int theHeight)-
setSize
in class Controller<Slider>
@Deprecated -public void setSliderBarSize(int theSize)-
public Slider setSliderMode(int theMode)-
theMode
- intpublic Slider setTriggerEvent(int theEventID)-
theEventID
- public Slider setValue(float theValue)-
setValue
in interface ControllerInterface<Slider>
setValue
in class Controller<Slider>
theValue
- floatpublic Slider setWidth(int theValue)-
setWidth
in class Controller<Slider>
theValue
- intpublic Slider showTickMarks(boolean theFlag)-
theFlag
- public Slider shuffle()-
public Slider snapToTickMarks(boolean theFlag)-
theFlag
- public Slider update()-
Controller
update
in interface ControllerInterface<Slider>
update
in class Controller<Slider>
Controller.setUpdate(boolean)
,
-Controller.isUpdate()
public Slider updateDisplayMode(int theMode)-
public Slider updateInternalEvents(processing.core.PApplet theApplet)-
ControllerInterface
updateInternalEvents
in interface ControllerInterface<Slider>
updateInternalEvents
in class Controller<Slider>
ControllerInterface.updateInternalEvents
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Slider2D.html b/reference/controlP5/Slider2D.html deleted file mode 100644 index 647e4ee..0000000 --- a/reference/controlP5/Slider2D.html +++ /dev/null @@ -1,1058 +0,0 @@ - - - - - -public class Slider2D -extends Controller<Slider2D>-
/**
-* ControlP5 Slider2D
-*
-*
-* find a list of public methods available for the Slider2D Controller
-* at the bottom of this sketch.
-*
-* by Andreas Schlegel, 2012
-* www.sojamo.de/libraries/controlp5
-*
-*/
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-Slider2D s;
-
-void setup() {
- size(700,400);
- cp5 = new ControlP5(this);
- s = cp5.addSlider2D("wave")
- .setPosition(30,40)
- .setSize(100,100)
- .setArrayValue(new float[] {50, 50})
- //.disableCrosshair()
- ;
-
- smooth();
-}
-
-float cnt;
-void draw() {
- background(0);
- pushMatrix();
- translate(160,140);
- noStroke();
- fill(50);
- rect(0, -100, 400,200);
- strokeWeight(1);
- line(0,0,200, 0);
- stroke(255);
-
- for(int i=1;i<400;i++) {
- float y0 = cos(map(i-1,0,s.arrayValue()[0],-PI,PI)) * s.arrayValue()[1];
- float y1 = cos(map(i,0,s.arrayValue()[0],-PI,PI)) * s.arrayValue()[1];
- line((i-1),y0,i,y1);
- }
-
- popMatrix();
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/*
-a list of all methods available for the Slider2D Controller
-use ControlP5.printPublicMethodsFor(Slider2D.class);
-to print the following list into the console.
-
-You can find further details about class Slider2D in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-controlP5.Slider2D : Slider2D enableCrosshair()
-controlP5.Slider2D : Slider2D disableCrosshair()
-controlP5.Slider2D : Slider2D setArrayValue(float[])
-controlP5.Slider2D : Slider2D setMaxX(float)
-controlP5.Slider2D : Slider2D setMaxY(float)
-controlP5.Slider2D : Slider2D setMinX(float)
-controlP5.Slider2D : Slider2D setMinY(float)
-controlP5.Slider2D : Slider2D setValue(float)
-controlP5.Slider2D : Slider2D shuffle()
-controlP5.Slider2D : float getCursorHeight()
-controlP5.Slider2D : float getCursorWidth()
-controlP5.Slider2D : float getCursorX()
-controlP5.Slider2D : float getCursorY()
-controlP5.Slider2D : float getMaxX()
-controlP5.Slider2D : float getMaxY()
-controlP5.Slider2D : float getMinX()
-controlP5.Slider2D : float getMinY()
-controlP5.Slider2D : float[] getArrayValue()
-controlP5.Slider2D : void setValueLabelSeparator(String)
-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 : 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 : Slider2D addCallback(CallbackListener)
-controlP5.Controller : Slider2D addListener(ControlListener)
-controlP5.Controller : Slider2D bringToFront()
-controlP5.Controller : Slider2D bringToFront(ControllerInterface)
-controlP5.Controller : Slider2D hide()
-controlP5.Controller : Slider2D linebreak()
-controlP5.Controller : Slider2D listen(boolean)
-controlP5.Controller : Slider2D lock()
-controlP5.Controller : Slider2D plugTo(Object)
-controlP5.Controller : Slider2D plugTo(Object, String)
-controlP5.Controller : Slider2D plugTo(Object[])
-controlP5.Controller : Slider2D plugTo(Object[], String)
-controlP5.Controller : Slider2D registerProperty(String)
-controlP5.Controller : Slider2D registerProperty(String, String)
-controlP5.Controller : Slider2D registerTooltip(String)
-controlP5.Controller : Slider2D removeBehavior()
-controlP5.Controller : Slider2D removeCallback()
-controlP5.Controller : Slider2D removeCallback(CallbackListener)
-controlP5.Controller : Slider2D removeListener(ControlListener)
-controlP5.Controller : Slider2D removeProperty(String)
-controlP5.Controller : Slider2D removeProperty(String, String)
-controlP5.Controller : Slider2D setArrayValue(float[])
-controlP5.Controller : Slider2D setArrayValue(int, float)
-controlP5.Controller : Slider2D setBehavior(ControlBehavior)
-controlP5.Controller : Slider2D setBroadcast(boolean)
-controlP5.Controller : Slider2D setCaptionLabel(String)
-controlP5.Controller : Slider2D setColor(CColor)
-controlP5.Controller : Slider2D setColorActive(int)
-controlP5.Controller : Slider2D setColorBackground(int)
-controlP5.Controller : Slider2D setColorCaptionLabel(int)
-controlP5.Controller : Slider2D setColorForeground(int)
-controlP5.Controller : Slider2D setColorValueLabel(int)
-controlP5.Controller : Slider2D setDecimalPrecision(int)
-controlP5.Controller : Slider2D setDefaultValue(float)
-controlP5.Controller : Slider2D setHeight(int)
-controlP5.Controller : Slider2D setId(int)
-controlP5.Controller : Slider2D setImages(PImage, PImage, PImage)
-controlP5.Controller : Slider2D setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Slider2D setLabelVisible(boolean)
-controlP5.Controller : Slider2D setLock(boolean)
-controlP5.Controller : Slider2D setMax(float)
-controlP5.Controller : Slider2D setMin(float)
-controlP5.Controller : Slider2D setMouseOver(boolean)
-controlP5.Controller : Slider2D setMoveable(boolean)
-controlP5.Controller : Slider2D setPosition(PVector)
-controlP5.Controller : Slider2D setPosition(float, float)
-controlP5.Controller : Slider2D setSize(PImage)
-controlP5.Controller : Slider2D setSize(int, int)
-controlP5.Controller : Slider2D setStringValue(String)
-controlP5.Controller : Slider2D setUpdate(boolean)
-controlP5.Controller : Slider2D setValueLabel(String)
-controlP5.Controller : Slider2D setView(ControllerView)
-controlP5.Controller : Slider2D setVisible(boolean)
-controlP5.Controller : Slider2D setWidth(int)
-controlP5.Controller : Slider2D show()
-controlP5.Controller : Slider2D unlock()
-controlP5.Controller : Slider2D unplugFrom(Object)
-controlP5.Controller : Slider2D unplugFrom(Object[])
-controlP5.Controller : Slider2D unregisterTooltip()
-controlP5.Controller : Slider2D update()
-controlP5.Controller : Slider2D updateSize()
-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)
-
-
-*/
-
-
-
-
Modifier and Type | -Field and Description | -
---|---|
boolean |
-isCrosshairs |
-
autoHeight, autoSpacing, autoWidth
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Slider2D(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend Slider2D.
- |
-
Modifier and Type | -Method and Description | -
---|---|
Slider2D |
-disableCrosshair() |
-
Slider2D |
-enableCrosshair() |
-
float[] |
-getArrayValue()
-returns the current float array value of a controller.
- |
-
float |
-getCursorHeight() |
-
float |
-getCursorWidth() |
-
float |
-getCursorX() |
-
float |
-getCursorY() |
-
float |
-getMaxX() |
-
float |
-getMaxY() |
-
float |
-getMinX() |
-
float |
-getMinY() |
-
Slider2D |
-setArrayValue(float[] theArray) |
-
Slider2D |
-setCursorX(float theValue) |
-
Slider2D |
-setCursorY(float theValue) |
-
Slider2D |
-setMaxX(float theMaxX)
-sets the maximum value for the x-axis
- |
-
Slider2D |
-setMaxY(float theMaxY)
-sets the maximum value for the y-axis
- |
-
Slider2D |
-setMinX(float theMinX)
-sets the minimum value for the x-axis
- |
-
Slider2D |
-setMinY(float theMinY)
-sets the minimum value for the y-axis
- |
-
Slider2D |
-setValue(float theValue) |
-
void |
-setValueLabelSeparator(java.lang.String theSeparator) |
-
Slider2D |
-shuffle()
-assigns a random value to the controller.
- |
-
Slider2D |
-updateDisplayMode(int theMode) |
-
Slider2D |
-updateInternalEvents(processing.core.PApplet theApplet)
-a method for putting input events like e.g.
- |
-
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, draw, getAbsolutePosition, getAddress, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getInfo, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setHeight, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, setWidth, show, toString, unlock, unplugFrom, unplugFrom, unregisterTooltip, update, updateAbsolutePosition, updateEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public Slider2D(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public Slider2D disableCrosshair()-
public Slider2D enableCrosshair()-
public float[] getArrayValue()-
Controller
getArrayValue
in interface ControllerInterface<Slider2D>
getArrayValue
in class Controller<Slider2D>
Controller.getValue()
,
-Controller.getStringValue()
public float getCursorHeight()-
public float getCursorWidth()-
public float getCursorX()-
public float getCursorY()-
public float getMaxX()-
public float getMaxY()-
public float getMinX()-
public float getMinY()-
public Slider2D setArrayValue(float[] theArray)-
setArrayValue
in interface ControllerInterface<Slider2D>
setArrayValue
in class Controller<Slider2D>
public Slider2D setCursorX(float theValue)-
public Slider2D setCursorY(float theValue)-
public Slider2D setMaxX(float theMaxX)-
theMaxX
- public Slider2D setMaxY(float theMaxY)-
theMaxY
- public Slider2D setMinX(float theMinX)-
theMinX
- public Slider2D setMinY(float theMinY)-
theMinY
- public Slider2D setValue(float theValue)-
setValue
in interface ControllerInterface<Slider2D>
setValue
in class Controller<Slider2D>
theValue
- floatpublic void setValueLabelSeparator(java.lang.String theSeparator)-
public Slider2D shuffle()-
public Slider2D updateDisplayMode(int theMode)-
public Slider2D updateInternalEvents(processing.core.PApplet theApplet)-
ControllerInterface
updateInternalEvents
in interface ControllerInterface<Slider2D>
updateInternalEvents
in class Controller<Slider2D>
ControllerInterface.updateInternalEvents
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Tab.html b/reference/controlP5/Tab.html deleted file mode 100644 index 48ad097..0000000 --- a/reference/controlP5/Tab.html +++ /dev/null @@ -1,833 +0,0 @@ - - - - - -public class Tab -extends ControllerGroup<Tab>-
ControlWindow.setPositionOfTabs(int, int)
/**
-* ControlP5 Tab
-*
-*
-* find a list of public methods available for the Tab Controller
-* at the bottom of this sketch.
-*
-* by Andreas Schlegel, 2012
-* www.sojamo.de/libraries/controlp5
-*
-*/
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-int myColorBackground = color(128);
-
-int sliderValue = 100;
-
-void setup() {
- size(700,400);
- noStroke();
- cp5 = new ControlP5(this);
-
- // By default all controllers are stored inside Tab 'default'
- // add a second tab with name 'extra'
-
- cp5.addTab("extra")
- .setColorBackground(color(0, 160, 100))
- .setColorLabel(color(255))
- .setColorActive(color(255,128,0))
- ;
-
- // if you want to receive a controlEvent when
- // a tab is clicked, use activeEvent(true)
-
- cp5.getTab("default")
- .activateEvent(true)
- .setLabel("my default tab")
- .setId(1)
- ;
-
- cp5.getTab("extra")
- .activateEvent(true)
- .setId(2)
- ;
-
-
- // create a few controllers
-
- cp5.addButton("button")
- .setBroadcast(false)
- .setPosition(100,100)
- .setSize(80,40)
- .setValue(1)
- .setBroadcast(true)
- .getCaptionLabel().align(CENTER,CENTER)
- ;
-
- cp5.addButton("buttonValue")
- .setBroadcast(false)
- .setPosition(220,100)
- .setSize(80,40)
- .setValue(2)
- .setBroadcast(true)
- .getCaptionLabel().align(CENTER,CENTER)
- ;
-
- cp5.addSlider("slider")
- .setBroadcast(false)
- .setRange(100,200)
- .setValue(128)
- .setPosition(100,160)
- .setSize(200,20)
- .setBroadcast(true)
- ;
-
- cp5.addSlider("sliderValue")
- .setBroadcast(false)
- .setRange(0,255)
- .setValue(128)
- .setPosition(100,200)
- .setSize(200,20)
- .setBroadcast(true)
- ;
-
- // arrange controller in separate tabs
-
- cp5.getController("sliderValue").moveTo("extra");
- cp5.getController("slider").moveTo("global");
-
- // Tab 'global' is a tab that lies on top of any
- // other tab and is always visible
-
-}
-
-void draw() {
- background(myColorBackground);
- fill(sliderValue);
- rect(0,0,width,100);
-}
-
-void controlEvent(ControlEvent theControlEvent) {
- if (theControlEvent.isTab()) {
- println("got an event from tab : "+theControlEvent.getTab().getName()+" with id "+theControlEvent.getTab().getId());
- }
-}
-
-void slider(int theColor) {
- myColorBackground = color(theColor);
- println("a slider event. setting background to "+theColor);
-}
-
-
-void keyPressed() {
- if(keyCode==TAB) {
- cp5.getTab("extra").bringToFront();
- }
-}
-
-/*
-a list of all methods available for the Tab Controller
-use ControlP5.printPublicMethodsFor(Tab.class);
-to print the following list into the console.
-
-You can find further details about class Tab in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-controlP5.Tab : String getStringValue()
-controlP5.Tab : Tab activateEvent(boolean)
-controlP5.Tab : Tab bringToFront()
-controlP5.Tab : Tab moveTo(ControlWindow)
-controlP5.Tab : Tab setActive(boolean)
-controlP5.Tab : Tab setHeight(int)
-controlP5.Tab : Tab setLabel(String)
-controlP5.Tab : Tab setValue(float)
-controlP5.Tab : Tab setWidth(int)
-controlP5.Tab : float getValue()
-controlP5.ControllerGroup : CColor getColor()
-controlP5.ControllerGroup : ControlWindow getWindow()
-controlP5.ControllerGroup : ControlWindowCanvas addCanvas(ControlWindowCanvas)
-controlP5.ControllerGroup : Controller getController(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String, String)
-controlP5.ControllerGroup : Label getCaptionLabel()
-controlP5.ControllerGroup : Label getValueLabel()
-controlP5.ControllerGroup : PVector getPosition()
-controlP5.ControllerGroup : String getAddress()
-controlP5.ControllerGroup : String getInfo()
-controlP5.ControllerGroup : String getName()
-controlP5.ControllerGroup : String getStringValue()
-controlP5.ControllerGroup : String toString()
-controlP5.ControllerGroup : Tab add(ControllerInterface)
-controlP5.ControllerGroup : Tab bringToFront()
-controlP5.ControllerGroup : Tab bringToFront(ControllerInterface)
-controlP5.ControllerGroup : Tab close()
-controlP5.ControllerGroup : Tab disableCollapse()
-controlP5.ControllerGroup : Tab enableCollapse()
-controlP5.ControllerGroup : Tab getTab()
-controlP5.ControllerGroup : Tab hide()
-controlP5.ControllerGroup : Tab moveTo(ControlWindow)
-controlP5.ControllerGroup : Tab moveTo(PApplet)
-controlP5.ControllerGroup : Tab open()
-controlP5.ControllerGroup : Tab registerProperty(String)
-controlP5.ControllerGroup : Tab registerProperty(String, String)
-controlP5.ControllerGroup : Tab remove(CDrawable)
-controlP5.ControllerGroup : Tab remove(ControllerInterface)
-controlP5.ControllerGroup : Tab removeCanvas(ControlWindowCanvas)
-controlP5.ControllerGroup : Tab removeProperty(String)
-controlP5.ControllerGroup : Tab removeProperty(String, String)
-controlP5.ControllerGroup : Tab setAddress(String)
-controlP5.ControllerGroup : Tab setArrayValue(float[])
-controlP5.ControllerGroup : Tab setColor(CColor)
-controlP5.ControllerGroup : Tab setColorActive(int)
-controlP5.ControllerGroup : Tab setColorBackground(int)
-controlP5.ControllerGroup : Tab setColorForeground(int)
-controlP5.ControllerGroup : Tab setColorLabel(int)
-controlP5.ControllerGroup : Tab setColorValue(int)
-controlP5.ControllerGroup : Tab setHeight(int)
-controlP5.ControllerGroup : Tab setId(int)
-controlP5.ControllerGroup : Tab setLabel(String)
-controlP5.ControllerGroup : Tab setMouseOver(boolean)
-controlP5.ControllerGroup : Tab setMoveable(boolean)
-controlP5.ControllerGroup : Tab setOpen(boolean)
-controlP5.ControllerGroup : Tab setPosition(PVector)
-controlP5.ControllerGroup : Tab setPosition(float, float)
-controlP5.ControllerGroup : Tab setStringValue(String)
-controlP5.ControllerGroup : Tab setUpdate(boolean)
-controlP5.ControllerGroup : Tab setValue(float)
-controlP5.ControllerGroup : Tab setVisible(boolean)
-controlP5.ControllerGroup : Tab setWidth(int)
-controlP5.ControllerGroup : Tab show()
-controlP5.ControllerGroup : Tab update()
-controlP5.ControllerGroup : Tab updateAbsolutePosition()
-controlP5.ControllerGroup : boolean isCollapse()
-controlP5.ControllerGroup : boolean isMouseOver()
-controlP5.ControllerGroup : boolean isMoveable()
-controlP5.ControllerGroup : boolean isOpen()
-controlP5.ControllerGroup : boolean isUpdate()
-controlP5.ControllerGroup : boolean isVisible()
-controlP5.ControllerGroup : boolean setMousePressed(boolean)
-controlP5.ControllerGroup : float getValue()
-controlP5.ControllerGroup : float[] getArrayValue()
-controlP5.ControllerGroup : int getHeight()
-controlP5.ControllerGroup : int getId()
-controlP5.ControllerGroup : int getWidth()
-controlP5.ControllerGroup : void remove()
-java.lang.Object : String toString()
-java.lang.Object : boolean equals(Object)
-
-
-*/
-
-
-
-
-
-
Modifier and Type | -Field and Description | -
---|---|
boolean |
-autoWidth |
-
static int |
-padding |
-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Tab(ControlP5 theControlP5,
- ControlWindow theControlWindow,
- java.lang.String theName) |
-
Modifier and Type | -Method and Description | -
---|---|
Tab |
-activateEvent(boolean theFlag)
-activates or deactivates the Event status of a tab, When activated a tab will send a
- controlEvent to the main application.
- |
-
Tab |
-bringToFront() |
-
java.lang.String |
-getStringValue() |
-
float |
-getValue() |
-
boolean |
-isActive()
-checks if a tab is active.
- |
-
boolean |
-isAlwaysActive() |
-
void |
-mousePressed() |
-
Tab |
-moveTo(ControlWindow theWindow) |
-
Tab |
-setActive(boolean theFlag)
-Activates a tab.
- |
-
Tab |
-setAlwaysActive(boolean theFlag) |
-
Tab |
-setHeight(int theHeight) |
-
Tab |
-setLabel(java.lang.String theLabel)
-set the label of the group.
- |
-
Tab |
-setValue(float theValue) |
-
Tab |
-setWidth(int theWidth) |
-
java.lang.String |
-stringValue()
-Deprecated.
- |
-
float |
-value()
-Deprecated.
- |
-
absolutePosition, add, addCanvas, addCloseButton, addDrawable, addListener, arrayValue, bringToFront, close, color, continuousUpdateEvents, controlEvent, controller, disableCollapse, draw, enableCollapse, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getCaptionLabel, getColor, getController, getHeight, getId, getInfo, getName, getParent, getPickingColor, getPosition, getProperty, getProperty, getTab, getValueLabel, getWidth, getWindow, hide, hideArrow, hideBar, id, init, isBarVisible, isCollapse, isMouseOver, isMoveable, isOpen, isUpdate, isVisible, keyEvent, listenerSize, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, name, open, parent, position, registerProperty, registerProperty, remove, remove, remove, removeCanvas, removeCloseButton, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorForeground, setColorLabel, setColorValue, setGroup, setGroup, setId, setMouseOver, setMousePressed, setMoveable, setOpen, setPosition, setPosition, setSize, setStringValue, setTab, setTab, setTab, setTitle, setUpdate, setVisible, show, showArrow, showBar, toString, update, updateAbsolutePosition, updateEvents, updateInternalEvents
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public boolean autoWidth-
public static int padding-
public Tab(ControlP5 theControlP5, - ControlWindow theControlWindow, - java.lang.String theName)-
theControlP5
- ControlP5theControlWindow
- ControlWindowtheName
- Stringpublic Tab activateEvent(boolean theFlag)-
theFlag
- booleanpublic Tab bringToFront()-
bringToFront
in interface ControllerInterface<Tab>
bringToFront
in class ControllerGroup<Tab>
public java.lang.String getStringValue()-
getStringValue
in interface ControllerInterface<Tab>
getStringValue
in class ControllerGroup<Tab>
public float getValue()-
getValue
in interface ControllerInterface<Tab>
getValue
in class ControllerGroup<Tab>
public boolean isActive()-
public boolean isAlwaysActive()-
public void mousePressed()-
public Tab moveTo(ControlWindow theWindow)-
moveTo
in class ControllerGroup<Tab>
public Tab setActive(boolean theFlag)-
theFlag
- booleanpublic Tab setAlwaysActive(boolean theFlag)-
public Tab setHeight(int theHeight)-
setHeight
in class ControllerGroup<Tab>
public Tab setLabel(java.lang.String theLabel)-
setLabel
in interface ControllerInterface<Tab>
setLabel
in class ControllerGroup<Tab>
theLabel
- Stringpublic Tab setValue(float theValue)-
setValue
in interface ControllerInterface<Tab>
setValue
in class ControllerGroup<Tab>
public Tab setWidth(int theWidth)-
setWidth
in class ControllerGroup<Tab>
theWidth
- @Deprecated -public java.lang.String stringValue()-
stringValue
in interface ControllerInterface<Tab>
stringValue
in class ControllerGroup<Tab>
@Deprecated -public float value()-
value
in class ControllerGroup<Tab>
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Textarea.html b/reference/controlP5/Textarea.html deleted file mode 100644 index 0c35c03..0000000 --- a/reference/controlP5/Textarea.html +++ /dev/null @@ -1,1229 +0,0 @@ - - - - - -public class Textarea -extends ControllerGroup<Textarea> -implements ControlListener-
/**
-* ControlP5 Textarea
-*
-*
-* find a list of public methods available for the Textarea Controller
-* at the bottom of this sketch.
-*
-* by Andreas Schlegel, 2012
-* www.sojamo.de/libraries/controlp5
-*
-*/
-
-import controlP5.*;
-
-ControlP5 cp5;
-Textarea myTextarea;
-
-void setup() {
- size(700,400);
- cp5 = new ControlP5(this);
-
- myTextarea = cp5.addTextarea("txt")
- .setPosition(100,100)
- .setSize(200,200)
- .setFont(createFont("arial",12))
- .setLineHeight(14)
- .setColor(color(128))
- .setColorBackground(color(255,100))
- .setColorForeground(color(255,100));
- ;
- myTextarea.setText("Lorem Ipsum is simply dummy text of the printing and typesetting"
- +" industry. Lorem Ipsum has been the industry's standard dummy text"
- +" ever since the 1500s, when an unknown printer took a galley of type"
- +" and scrambled it to make a type specimen book. It has survived not"
- +" only five centuries, but also the leap into electronic typesetting,"
- +" remaining essentially unchanged. It was popularised in the 1960s"
- +" with the release of Letraset sheets containing Lorem Ipsum passages,"
- +" and more recently with desktop publishing software like Aldus"
- +" PageMaker including versions of Lorem Ipsum."
- );
-
- cp5.addSlider("changeWidth")
- .setRange(100,400)
- .setValue(200)
- .setPosition(100,20)
- .setSize(100,19)
- ;
-
- cp5.addSlider("changeHeight")
- .setRange(100,400)
- .setValue(200)
- .setPosition(100,40)
- .setSize(100,19)
- ;
-
-}
-
-
-void keyPressed() {
- if(key=='r') {
- myTextarea.setText("Lorem ipsum dolor sit amet, consectetur adipiscing elit."
- +" Quisque sed velit nec eros scelerisque adipiscing vitae eu sem."
- +" Quisque malesuada interdum lectus. Pellentesque pellentesque molestie"
- +" vestibulum. Maecenas ultricies, neque at porttitor lacinia, tellus enim"
- +" suscipit tortor, ut dapibus orci lorem non ipsum. Mauris ut velit velit."
- +" Fusce at purus in augue semper tincidunt imperdiet sit amet eros."
- +" Vestibulum nunc diam, fringilla vitae tristique ut, viverra ut felis."
- +" Proin aliquet turpis ornare leo aliquam dapibus. Integer dui nisi, condimentum"
- +" ut sagittis non, fringilla vestibulum sapien. Sed ullamcorper libero et massa"
- +" congue in facilisis mauris lobortis. Fusce cursus risus sit amet leo imperdiet"
- +" lacinia faucibus turpis tempus. Pellentesque pellentesque augue sed purus varius"
- +" sed volutpat dui rhoncus. Lorem ipsum dolor sit amet, consectetur adipiscing elit"
- );
-
- } else if(key=='c') {
- myTextarea.setColor(0xffffffff);
- }
-}
-void draw() {
- background(0);
- if(keyPressed && key==' ') {
- myTextarea.scroll((float)mouseX/(float)width);
- }
- if(keyPressed && key=='l') {
- myTextarea.setLineHeight(mouseY);
- }
-}
-
-void changeWidth(int theValue) {
- myTextarea.setWidth(theValue);
-}
-
-void changeHeight(int theValue) {
- myTextarea.setHeight(theValue);
-}
-
-
-
-
-/*
-a list of all methods available for the Textarea Controller
-use ControlP5.printPublicMethodsFor(Textarea.class);
-to print the following list into the console.
-
-You can find further details about class Textarea in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-controlP5.Textarea : Label getValueLabel()
-controlP5.Textarea : String getStringValue()
-controlP5.Textarea : String getText()
-controlP5.Textarea : Textarea disableColorBackground()
-controlP5.Textarea : Textarea enableColorBackground()
-controlP5.Textarea : Textarea hideScrollbar()
-controlP5.Textarea : Textarea scroll(float)
-controlP5.Textarea : Textarea setBorderColor(int)
-controlP5.Textarea : Textarea setColor(int)
-controlP5.Textarea : Textarea setColorBackground(int)
-controlP5.Textarea : Textarea setFont(ControlFont)
-controlP5.Textarea : Textarea setFont(PFont)
-controlP5.Textarea : Textarea setFont(int)
-controlP5.Textarea : Textarea setHeight(int)
-controlP5.Textarea : Textarea setLineHeight(int)
-controlP5.Textarea : Textarea setScrollActive(int)
-controlP5.Textarea : Textarea setScrollBackground(int)
-controlP5.Textarea : Textarea setScrollForeground(int)
-controlP5.Textarea : Textarea setSize(int, int)
-controlP5.Textarea : Textarea setText(String)
-controlP5.Textarea : Textarea setWidth(int)
-controlP5.Textarea : Textarea showScrollbar()
-controlP5.Textarea : boolean isScrollable()
-controlP5.Textarea : float getValue()
-controlP5.Textarea : void controlEvent(ControlEvent)
-controlP5.ControllerGroup : CColor getColor()
-controlP5.ControllerGroup : ControlWindow getWindow()
-controlP5.ControllerGroup : ControlWindowCanvas addCanvas(ControlWindowCanvas)
-controlP5.ControllerGroup : Controller getController(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String, String)
-controlP5.ControllerGroup : Label getCaptionLabel()
-controlP5.ControllerGroup : Label getValueLabel()
-controlP5.ControllerGroup : PVector getPosition()
-controlP5.ControllerGroup : String getAddress()
-controlP5.ControllerGroup : String getInfo()
-controlP5.ControllerGroup : String getName()
-controlP5.ControllerGroup : String getStringValue()
-controlP5.ControllerGroup : String toString()
-controlP5.ControllerGroup : Tab getTab()
-controlP5.ControllerGroup : Textarea add(ControllerInterface)
-controlP5.ControllerGroup : Textarea bringToFront()
-controlP5.ControllerGroup : Textarea bringToFront(ControllerInterface)
-controlP5.ControllerGroup : Textarea close()
-controlP5.ControllerGroup : Textarea disableCollapse()
-controlP5.ControllerGroup : Textarea enableCollapse()
-controlP5.ControllerGroup : Textarea hide()
-controlP5.ControllerGroup : Textarea moveTo(ControlWindow)
-controlP5.ControllerGroup : Textarea moveTo(PApplet)
-controlP5.ControllerGroup : Textarea open()
-controlP5.ControllerGroup : Textarea registerProperty(String)
-controlP5.ControllerGroup : Textarea registerProperty(String, String)
-controlP5.ControllerGroup : Textarea remove(CDrawable)
-controlP5.ControllerGroup : Textarea remove(ControllerInterface)
-controlP5.ControllerGroup : Textarea removeCanvas(ControlWindowCanvas)
-controlP5.ControllerGroup : Textarea removeProperty(String)
-controlP5.ControllerGroup : Textarea removeProperty(String, String)
-controlP5.ControllerGroup : Textarea setAddress(String)
-controlP5.ControllerGroup : Textarea setArrayValue(float[])
-controlP5.ControllerGroup : Textarea setColor(CColor)
-controlP5.ControllerGroup : Textarea setColorActive(int)
-controlP5.ControllerGroup : Textarea setColorBackground(int)
-controlP5.ControllerGroup : Textarea setColorForeground(int)
-controlP5.ControllerGroup : Textarea setColorLabel(int)
-controlP5.ControllerGroup : Textarea setColorValue(int)
-controlP5.ControllerGroup : Textarea setHeight(int)
-controlP5.ControllerGroup : Textarea setId(int)
-controlP5.ControllerGroup : Textarea setLabel(String)
-controlP5.ControllerGroup : Textarea setMouseOver(boolean)
-controlP5.ControllerGroup : Textarea setMoveable(boolean)
-controlP5.ControllerGroup : Textarea setOpen(boolean)
-controlP5.ControllerGroup : Textarea setPosition(PVector)
-controlP5.ControllerGroup : Textarea setPosition(float, float)
-controlP5.ControllerGroup : Textarea setStringValue(String)
-controlP5.ControllerGroup : Textarea setUpdate(boolean)
-controlP5.ControllerGroup : Textarea setValue(float)
-controlP5.ControllerGroup : Textarea setVisible(boolean)
-controlP5.ControllerGroup : Textarea setWidth(int)
-controlP5.ControllerGroup : Textarea show()
-controlP5.ControllerGroup : Textarea update()
-controlP5.ControllerGroup : Textarea updateAbsolutePosition()
-controlP5.ControllerGroup : boolean isCollapse()
-controlP5.ControllerGroup : boolean isMouseOver()
-controlP5.ControllerGroup : boolean isMoveable()
-controlP5.ControllerGroup : boolean isOpen()
-controlP5.ControllerGroup : boolean isUpdate()
-controlP5.ControllerGroup : boolean isVisible()
-controlP5.ControllerGroup : boolean setMousePressed(boolean)
-controlP5.ControllerGroup : float getValue()
-controlP5.ControllerGroup : float[] getArrayValue()
-controlP5.ControllerGroup : int getHeight()
-controlP5.ControllerGroup : int getId()
-controlP5.ControllerGroup : int getWidth()
-controlP5.ControllerGroup : void remove()
-java.lang.Object : String toString()
-java.lang.Object : boolean equals(Object)
-
-
-*/
-
-
-
-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Textarea(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend Textarea.
- |
-
Textarea(java.lang.String theText,
- int theX,
- int theY) |
-
Modifier and Type | -Method and Description | -
---|---|
Textarea |
-append(java.lang.String theText) |
-
Textarea |
-append(java.lang.String theText,
- int max) |
-
Textarea |
-clear() |
-
void |
-controlEvent(ControlEvent theEvent)
-controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about
- value changes.
- |
-
Textarea |
-disableColorBackground() |
-
Textarea |
-enableColorBackground() |
-
float |
-getScrollPosition() |
-
java.lang.String |
-getStringValue() |
-
java.lang.String |
-getText()
-returns the text content of the textarea.
- |
-
float |
-getValue() |
-
Label |
-getValueLabel()
-returns the instance of the textarea's label.
- |
-
Textarea |
-hideScrollbar() |
-
boolean |
-isScrollable() |
-
Textarea |
-scroll(float theValue)
-scroll the Textarea remotely.
- |
-
void |
-scrolled(int theStep) |
-
Textarea |
-setBorderColor(int theColor) |
-
Textarea |
-setColor(int theColor)
-set the text color of the textarea.
- |
-
Textarea |
-setColorBackground(int theColor) |
-
Textarea |
-setFont(ControlFont theFont) |
-
Textarea |
-setFont(int theFontIndex) |
-
Textarea |
-setFont(processing.core.PFont thePFont) |
-
Textarea |
-setHeight(int theValue)
-set the height of the textarea.
- |
-
Textarea |
-setLineHeight(int theLineHeight)
-set the lineheight of the textarea.
- |
-
Textarea |
-setScrollActive(int theColor) |
-
Textarea |
-setScrollBackground(int theColor) |
-
Textarea |
-setScrollForeground(int theColor) |
-
Textarea |
-setSize(int theWidth,
- int theHeight) |
-
Textarea |
-setText(java.lang.String theText)
-set the text of the textarea.
- |
-
Textarea |
-setWidth(int theValue)
-set the width of the textarea.
- |
-
Textarea |
-showScrollbar() |
-
java.lang.String |
-stringValue()
-Deprecated.
- |
-
float |
-value()
-Deprecated.
- |
-
Label |
-valueLabel()
-Deprecated.
- |
-
absolutePosition, add, addCanvas, addCloseButton, addDrawable, addListener, arrayValue, bringToFront, bringToFront, close, color, continuousUpdateEvents, controller, disableCollapse, draw, enableCollapse, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getCaptionLabel, getColor, getController, getHeight, getId, getInfo, getName, getParent, getPickingColor, getPosition, getProperty, getProperty, getTab, getWidth, getWindow, hide, hideArrow, hideBar, id, init, isBarVisible, isCollapse, isMouseOver, isMoveable, isOpen, isUpdate, isVisible, keyEvent, listenerSize, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, name, open, parent, position, registerProperty, registerProperty, remove, remove, remove, removeCanvas, removeCloseButton, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setCaptionLabel, setColor, setColorActive, setColorForeground, setColorLabel, setColorValue, setGroup, setGroup, setId, setLabel, setMouseOver, setMousePressed, setMoveable, setOpen, setPosition, setPosition, setStringValue, setTab, setTab, setTab, setTitle, setUpdate, setValue, setVisible, show, showArrow, showBar, toString, update, updateAbsolutePosition, updateEvents, updateInternalEvents
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public Textarea(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public Textarea(java.lang.String theText, - int theX, - int theY)-
theText
- StringtheX
- inttheY
- intpublic Textarea append(java.lang.String theText)-
public Textarea append(java.lang.String theText, - int max)-
public Textarea clear()-
public void controlEvent(ControlEvent theEvent)-
ControlListener
controlEvent
in interface ControlListener
controlEvent
in class ControllerGroup<Textarea>
theEvent
- ControlEventCallbackListener
,
-CallbackEvent
public Textarea disableColorBackground()-
public Textarea enableColorBackground()-
public float getScrollPosition()-
public java.lang.String getStringValue()-
ControllerGroup
getStringValue
in interface ControllerInterface<Textarea>
getStringValue
in class ControllerGroup<Textarea>
public java.lang.String getText()-
public float getValue()-
getValue
in interface ControllerInterface<Textarea>
getValue
in class ControllerGroup<Textarea>
public Label getValueLabel()-
getValueLabel
in class ControllerGroup<Textarea>
public Textarea hideScrollbar()-
public boolean isScrollable()-
public Textarea scroll(float theValue)-
theValue
- public void scrolled(int theStep)-
public Textarea setBorderColor(int theColor)-
theColor
- public Textarea setColor(int theColor)-
theColor
- intpublic Textarea setColorBackground(int theColor)-
ControllerGroup
setColorBackground
in interface ControllerInterface<Textarea>
setColorBackground
in class ControllerGroup<Textarea>
public Textarea setFont(ControlFont theFont)-
public Textarea setFont(int theFontIndex)-
public Textarea setFont(processing.core.PFont thePFont)-
public Textarea setHeight(int theValue)-
setHeight
in class ControllerGroup<Textarea>
theValue
- intpublic Textarea setLineHeight(int theLineHeight)-
theLineHeight
- intpublic Textarea setScrollActive(int theColor)-
theColor
- public Textarea setScrollBackground(int theColor)-
theColor
- public Textarea setScrollForeground(int theColor)-
theColor
- public Textarea setSize(int theWidth, - int theHeight)-
setSize
in class ControllerGroup<Textarea>
public Textarea setText(java.lang.String theText)-
theText
- Stringpublic Textarea setWidth(int theValue)-
setWidth
in class ControllerGroup<Textarea>
theValue
- intpublic Textarea showScrollbar()-
@Deprecated -public java.lang.String stringValue()-
stringValue
in interface ControllerInterface<Textarea>
stringValue
in class ControllerGroup<Textarea>
@Deprecated -public float value()-
value
in class ControllerGroup<Textarea>
@Deprecated -public Label valueLabel()-
valueLabel
in class ControllerGroup<Textarea>
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Textfield.InputFilter.html b/reference/controlP5/Textfield.InputFilter.html deleted file mode 100644 index dc30182..0000000 --- a/reference/controlP5/Textfield.InputFilter.html +++ /dev/null @@ -1,344 +0,0 @@ - - - - - -public static enum Textfield.InputFilter -extends java.lang.Enum<Textfield.InputFilter>-
Enum Constant and Description | -
---|
BITFONT |
-
DEFAULT |
-
FLOAT |
-
INTEGER |
-
Modifier and Type | -Method and Description | -
---|---|
static Textfield.InputFilter |
-valueOf(java.lang.String name)
-Returns the enum constant of this type with the specified name.
- |
-
static Textfield.InputFilter[] |
-values()
-Returns an array containing the constants of this enum type, in
-the order they are declared.
- |
-
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final Textfield.InputFilter BITFONT-
public static final Textfield.InputFilter DEFAULT-
public static final Textfield.InputFilter FLOAT-
public static final Textfield.InputFilter INTEGER-
public static Textfield.InputFilter valueOf(java.lang.String name)-
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
-with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static Textfield.InputFilter[] values()-
-for (Textfield.InputFilter c : Textfield.InputFilter.values()) - System.out.println(c); -
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Textfield.html b/reference/controlP5/Textfield.html deleted file mode 100644 index d045719..0000000 --- a/reference/controlP5/Textfield.html +++ /dev/null @@ -1,1114 +0,0 @@ - - - - - -public class Textfield -extends Controller<Textfield>-
/**
-* ControlP5 Textfield
-*
-*
-* find a list of public methods available for the Textfield Controller
-* at the bottom of this sketch.
-*
-* by Andreas Schlegel, 2012
-* www.sojamo.de/libraries/controlp5
-*
-*/
-
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-String textValue = "";
-
-void setup() {
- size(700,400);
-
- PFont font = createFont("arial",20);
-
- cp5 = new ControlP5(this);
-
- cp5.addTextfield("input")
- .setPosition(20,100)
- .setSize(200,40)
- .setFont(font)
- .setFocus(true)
- .setColor(color(255,0,0))
- ;
-
- cp5.addTextfield("textValue")
- .setPosition(20,170)
- .setSize(200,40)
- .setFont(createFont("arial",20))
- .setAutoClear(false)
- ;
-
- cp5.addBang("clear")
- .setPosition(240,170)
- .setSize(80,40)
- .getCaptionLabel().align(ControlP5.CENTER, ControlP5.CENTER)
- ;
-
- cp5.addTextfield("default")
- .setPosition(20,350)
- .setAutoClear(false)
- ;
-
- textFont(font);
-}
-
-void draw() {
- background(0);
- fill(255);
- text(cp5.get(Textfield.class,"input").getText(), 360,130);
- text(textValue, 360,180);
-}
-
-public void clear() {
- cp5.get(Textfield.class,"textValue").clear();
-}
-
-void controlEvent(ControlEvent theEvent) {
- if(theEvent.isAssignableFrom(Textfield.class)) {
- println("controlEvent: accessing a string from controller '"
- +theEvent.getName()+"': "
- +theEvent.getStringValue()
- );
- }
-}
-
-
-public void input(String theText) {
- // automatically receives results from controller input
- println("a textfield event for controller 'input' : "+theText);
-}
-
-
-
-
-/*
-a list of all methods available for the Textfield Controller
-use ControlP5.printPublicMethodsFor(Textfield.class);
-to print the following list into the console.
-
-You can find further details about class Textfield in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-controlP5.Textfield : String getText()
-controlP5.Textfield : Textfield clear()
-controlP5.Textfield : Textfield keepFocus(boolean)
-controlP5.Textfield : Textfield setAutoClear(boolean)
-controlP5.Textfield : Textfield setFocus(boolean)
-controlP5.Textfield : Textfield setFont(ControlFont)
-controlP5.Textfield : Textfield setFont(PFont)
-controlP5.Textfield : Textfield setFont(int)
-controlP5.Textfield : Textfield setText(String)
-controlP5.Textfield : Textfield setValue(String)
-controlP5.Textfield : Textfield setValue(float)
-controlP5.Textfield : boolean isAutoClear()
-controlP5.Textfield : int getIndex()
-controlP5.Textfield : void draw(PApplet)
-controlP5.Textfield : void keyEvent(KeyEvent)
-controlP5.Textfield : void setInputFilter(int)
-controlP5.Textfield : void setPasswordMode(boolean)
-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 : 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 : Textfield addCallback(CallbackListener)
-controlP5.Controller : Textfield addListener(ControlListener)
-controlP5.Controller : Textfield bringToFront()
-controlP5.Controller : Textfield bringToFront(ControllerInterface)
-controlP5.Controller : Textfield hide()
-controlP5.Controller : Textfield linebreak()
-controlP5.Controller : Textfield listen(boolean)
-controlP5.Controller : Textfield lock()
-controlP5.Controller : Textfield plugTo(Object)
-controlP5.Controller : Textfield plugTo(Object, String)
-controlP5.Controller : Textfield plugTo(Object[])
-controlP5.Controller : Textfield plugTo(Object[], String)
-controlP5.Controller : Textfield registerProperty(String)
-controlP5.Controller : Textfield registerProperty(String, String)
-controlP5.Controller : Textfield registerTooltip(String)
-controlP5.Controller : Textfield removeBehavior()
-controlP5.Controller : Textfield removeCallback()
-controlP5.Controller : Textfield removeCallback(CallbackListener)
-controlP5.Controller : Textfield removeListener(ControlListener)
-controlP5.Controller : Textfield removeProperty(String)
-controlP5.Controller : Textfield removeProperty(String, String)
-controlP5.Controller : Textfield setArrayValue(float[])
-controlP5.Controller : Textfield setArrayValue(int, float)
-controlP5.Controller : Textfield setBehavior(ControlBehavior)
-controlP5.Controller : Textfield setBroadcast(boolean)
-controlP5.Controller : Textfield setCaptionLabel(String)
-controlP5.Controller : Textfield setColor(CColor)
-controlP5.Controller : Textfield setColorActive(int)
-controlP5.Controller : Textfield setColorBackground(int)
-controlP5.Controller : Textfield setColorCaptionLabel(int)
-controlP5.Controller : Textfield setColorForeground(int)
-controlP5.Controller : Textfield setColorValueLabel(int)
-controlP5.Controller : Textfield setDecimalPrecision(int)
-controlP5.Controller : Textfield setDefaultValue(float)
-controlP5.Controller : Textfield setHeight(int)
-controlP5.Controller : Textfield setId(int)
-controlP5.Controller : Textfield setImages(PImage, PImage, PImage)
-controlP5.Controller : Textfield setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Textfield setLabelVisible(boolean)
-controlP5.Controller : Textfield setLock(boolean)
-controlP5.Controller : Textfield setMax(float)
-controlP5.Controller : Textfield setMin(float)
-controlP5.Controller : Textfield setMouseOver(boolean)
-controlP5.Controller : Textfield setMoveable(boolean)
-controlP5.Controller : Textfield setPosition(PVector)
-controlP5.Controller : Textfield setPosition(float, float)
-controlP5.Controller : Textfield setSize(PImage)
-controlP5.Controller : Textfield setSize(int, int)
-controlP5.Controller : Textfield setStringValue(String)
-controlP5.Controller : Textfield setUpdate(boolean)
-controlP5.Controller : Textfield setValueLabel(String)
-controlP5.Controller : Textfield setView(ControllerView)
-controlP5.Controller : Textfield setVisible(boolean)
-controlP5.Controller : Textfield setWidth(int)
-controlP5.Controller : Textfield show()
-controlP5.Controller : Textfield unlock()
-controlP5.Controller : Textfield unplugFrom(Object)
-controlP5.Controller : Textfield unplugFrom(Object[])
-controlP5.Controller : Textfield unregisterTooltip()
-controlP5.Controller : Textfield update()
-controlP5.Controller : Textfield updateSize()
-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)
-
-
-*/
-
Modifier and Type | -Class and Description | -
---|---|
static class |
-Textfield.InputFilter |
-
Modifier and Type | -Field and Description | -
---|---|
static int |
-cursorWidth |
-
autoHeight, autoSpacing, autoWidth
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Textfield(ControlP5 theControlP5,
- ControllerGroup<?> theParent,
- java.lang.String theName,
- java.lang.String theDefaultValue,
- int theX,
- int theY,
- int theWidth,
- int theHeight) |
-
Textfield(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend Textfield.
- |
-
Modifier and Type | -Method and Description | -
---|---|
Textfield |
-clear() |
-
void |
-draw(processing.core.PGraphics theGraphics)
-the default draw function for each controller extending superclass Controller.
- |
-
int |
-getIndex() |
-
java.lang.String |
-getText() |
-
java.lang.String[] |
-getTextList() |
-
boolean |
-isAutoClear() |
-
boolean |
-isFocus()
-check if the textfield is active and in focus.
- |
-
Textfield |
-keepFocus(boolean theValue) |
-
void |
-keyEvent(processing.event.KeyEvent theKeyEvent) |
-
Textfield |
-setAutoClear(boolean theValue) |
-
Textfield |
-setColor(int theColor) |
-
Textfield |
-setColorCursor(int theColor) |
-
Textfield |
-setFocus(boolean theValue) |
-
Textfield |
-setFont(ControlFont theFont) |
-
Textfield |
-setFont(int theFont) |
-
Textfield |
-setFont(processing.core.PFont thePFont) |
-
Textfield |
-setHeight(int theHeight) |
-
Textfield |
-setInputFilter(int theInputType) |
-
Textfield |
-setPasswordMode(boolean theFlag) |
-
Textfield |
-setText(java.lang.String theText) |
-
Textfield |
-setValue(float theValue) |
-
Textfield |
-setValue(java.lang.String theText) |
-
Textfield |
-setWidth(int theWidth) |
-
Textfield |
-submit()
-make the controller execute a return event.
- |
-
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getInfo, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, show, toString, unlock, unplugFrom, unplugFrom, unregisterTooltip, update, updateAbsolutePosition, updateEvents, updateInternalEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public Textfield(ControlP5 theControlP5, - ControllerGroup<?> theParent, - java.lang.String theName, - java.lang.String theDefaultValue, - int theX, - int theY, - int theWidth, - int theHeight)-
public Textfield(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public Textfield clear()-
public void draw(processing.core.PGraphics theGraphics)-
Controller
draw
in interface CDrawable
draw
in interface ControllerInterface<Textfield>
draw
in class Controller<Textfield>
ControllerView
public int getIndex()-
public java.lang.String getText()-
public java.lang.String[] getTextList()-
public boolean isAutoClear()-
public boolean isFocus()-
public Textfield keepFocus(boolean theValue)-
public void keyEvent(processing.event.KeyEvent theKeyEvent)-
keyEvent
in interface ControllerInterface<Textfield>
keyEvent
in class Controller<Textfield>
public Textfield setAutoClear(boolean theValue)-
public Textfield setColor(int theColor)-
public Textfield setColorCursor(int theColor)-
public Textfield setFocus(boolean theValue)-
public Textfield setFont(ControlFont theFont)-
public Textfield setFont(int theFont)-
public Textfield setFont(processing.core.PFont thePFont)-
public Textfield setHeight(int theHeight)-
setHeight
in class Controller<Textfield>
public Textfield setInputFilter(int theInputType)-
public Textfield setPasswordMode(boolean theFlag)-
public Textfield setText(java.lang.String theText)-
public Textfield setValue(float theValue)-
setValue
in interface ControllerInterface<Textfield>
setValue
in class Controller<Textfield>
theValue
- floatpublic Textfield setValue(java.lang.String theText)-
public Textfield setWidth(int theWidth)-
setWidth
in class Controller<Textfield>
public Textfield submit()-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Textlabel.html b/reference/controlP5/Textlabel.html deleted file mode 100644 index 89e4972..0000000 --- a/reference/controlP5/Textlabel.html +++ /dev/null @@ -1,948 +0,0 @@ - - - - - -public class Textlabel -extends Controller<Textlabel>-
/**
-* ControlP5 Textlabel
-*
-*
-* find a list of public methods available for the Textlabel Controller
-* at the bottom of this sketch.
-*
-* by Andreas Schlegel, 2012
-* www.sojamo.de/libraries/controlp5
-*
-*/
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-Textlabel myTextlabelA;
-Textlabel myTextlabelB;
-
-void setup() {
- size(700,400);
- cp5 = new ControlP5(this);
-
- myTextlabelA = cp5.addTextlabel("label")
- .setText("A single ControlP5 textlabel, in yellow.")
- .setPosition(100,50)
- .setColorValue(0xffffff00)
- .setFont(createFont("Georgia",20))
- ;
-
- myTextlabelB = new Textlabel(cp5,"Another textlabel, not created through ControlP5 needs to be rendered separately by calling Textlabel.draw(PApplet).",100,100,400,200);
-
-}
-
-
-
-void draw() {
- background(0);
- myTextlabelB.draw(this);
-}
-
-
-
-/*
-a list of all methods available for the Textlabel Controller
-use ControlP5.printPublicMethodsFor(Textlabel.class);
-to print the following list into the console.
-
-You can find further details about class Textlabel in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-controlP5.Textlabel : Label get()
-controlP5.Textlabel : Textlabel setColor(int)
-controlP5.Textlabel : Textlabel setFont(ControlFont)
-controlP5.Textlabel : Textlabel setFont(PFont)
-controlP5.Textlabel : Textlabel setFont(int)
-controlP5.Textlabel : Textlabel setHeight(int)
-controlP5.Textlabel : Textlabel setLetterSpacing(int)
-controlP5.Textlabel : Textlabel setMultiline(boolean)
-controlP5.Textlabel : Textlabel setStringValue(String)
-controlP5.Textlabel : Textlabel setText(String)
-controlP5.Textlabel : Textlabel setValue(String)
-controlP5.Textlabel : Textlabel setValue(float)
-controlP5.Textlabel : Textlabel setWidth(int)
-controlP5.Textlabel : void draw()
-controlP5.Textlabel : void draw(PApplet)
-controlP5.Textlabel : void draw(int, int)
-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 : 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 : Textlabel addCallback(CallbackListener)
-controlP5.Controller : Textlabel addListener(ControlListener)
-controlP5.Controller : Textlabel bringToFront()
-controlP5.Controller : Textlabel bringToFront(ControllerInterface)
-controlP5.Controller : Textlabel hide()
-controlP5.Controller : Textlabel linebreak()
-controlP5.Controller : Textlabel listen(boolean)
-controlP5.Controller : Textlabel lock()
-controlP5.Controller : Textlabel plugTo(Object)
-controlP5.Controller : Textlabel plugTo(Object, String)
-controlP5.Controller : Textlabel plugTo(Object[])
-controlP5.Controller : Textlabel plugTo(Object[], String)
-controlP5.Controller : Textlabel registerProperty(String)
-controlP5.Controller : Textlabel registerProperty(String, String)
-controlP5.Controller : Textlabel registerTooltip(String)
-controlP5.Controller : Textlabel removeBehavior()
-controlP5.Controller : Textlabel removeCallback()
-controlP5.Controller : Textlabel removeCallback(CallbackListener)
-controlP5.Controller : Textlabel removeListener(ControlListener)
-controlP5.Controller : Textlabel removeProperty(String)
-controlP5.Controller : Textlabel removeProperty(String, String)
-controlP5.Controller : Textlabel setArrayValue(float[])
-controlP5.Controller : Textlabel setArrayValue(int, float)
-controlP5.Controller : Textlabel setBehavior(ControlBehavior)
-controlP5.Controller : Textlabel setBroadcast(boolean)
-controlP5.Controller : Textlabel setCaptionLabel(String)
-controlP5.Controller : Textlabel setColor(CColor)
-controlP5.Controller : Textlabel setColorActive(int)
-controlP5.Controller : Textlabel setColorBackground(int)
-controlP5.Controller : Textlabel setColorCaptionLabel(int)
-controlP5.Controller : Textlabel setColorForeground(int)
-controlP5.Controller : Textlabel setColorValueLabel(int)
-controlP5.Controller : Textlabel setDecimalPrecision(int)
-controlP5.Controller : Textlabel setDefaultValue(float)
-controlP5.Controller : Textlabel setHeight(int)
-controlP5.Controller : Textlabel setId(int)
-controlP5.Controller : Textlabel setImages(PImage, PImage, PImage)
-controlP5.Controller : Textlabel setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Textlabel setLabelVisible(boolean)
-controlP5.Controller : Textlabel setLock(boolean)
-controlP5.Controller : Textlabel setMax(float)
-controlP5.Controller : Textlabel setMin(float)
-controlP5.Controller : Textlabel setMouseOver(boolean)
-controlP5.Controller : Textlabel setMoveable(boolean)
-controlP5.Controller : Textlabel setPosition(PVector)
-controlP5.Controller : Textlabel setPosition(float, float)
-controlP5.Controller : Textlabel setSize(PImage)
-controlP5.Controller : Textlabel setSize(int, int)
-controlP5.Controller : Textlabel setStringValue(String)
-controlP5.Controller : Textlabel setUpdate(boolean)
-controlP5.Controller : Textlabel setValueLabel(String)
-controlP5.Controller : Textlabel setView(ControllerView)
-controlP5.Controller : Textlabel setVisible(boolean)
-controlP5.Controller : Textlabel setWidth(int)
-controlP5.Controller : Textlabel show()
-controlP5.Controller : Textlabel unlock()
-controlP5.Controller : Textlabel unplugFrom(Object)
-controlP5.Controller : Textlabel unplugFrom(Object[])
-controlP5.Controller : Textlabel unregisterTooltip()
-controlP5.Controller : Textlabel update()
-controlP5.Controller : Textlabel updateSize()
-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)
-
-
-*/
-
-
-
-
autoHeight, autoSpacing, autoWidth
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Textlabel(ControlP5 theControlP5,
- java.lang.String theValue,
- int theX,
- int theY) |
-
Textlabel(ControlP5 theControlP5,
- java.lang.String theValue,
- int theX,
- int theY,
- int theW,
- int theH) |
-
Textlabel(ControlP5 theControlP5,
- java.lang.String theValue,
- int theX,
- int theY,
- int theW,
- int theH,
- int theColor,
- int theFont)
-Deprecated.
- |
-
Textlabel(processing.core.PApplet theComponent,
- java.lang.String theValue,
- int theX,
- int theY)
-Deprecated.
- |
-
Textlabel(processing.core.PApplet theComponent,
- java.lang.String theValue,
- int theX,
- int theY,
- int theW,
- int theH)
-Deprecated.
- |
-
Textlabel(processing.core.PApplet theComponent,
- java.lang.String theValue,
- int theX,
- int theY,
- int theW,
- int theH,
- int theColor,
- int theFont)
-Deprecated.
- |
-
Modifier and Type | -Method and Description | -
---|---|
Textlabel |
-append(java.lang.String theText,
- int max) |
-
void |
-draw() |
-
void |
-draw(int theX,
- int theY) |
-
void |
-draw(processing.core.PApplet theApplet) |
-
void |
-draw(processing.core.PGraphics theGraphics)
-the default draw function for each controller extending superclass Controller.
- |
-
Label |
-get() |
-
int |
-getLineHeight() |
-
Textlabel |
-setColor(int theColor) |
-
Textlabel |
-setFont(ControlFont theControlFont) |
-
Textlabel |
-setFont(int theFont)
-Deprecated.
- |
-
Textlabel |
-setFont(processing.core.PFont thePFont) |
-
Textlabel |
-setHeight(int theValue) |
-
Textlabel |
-setLetterSpacing(int theValue)
-set the letter spacing of the font.
- |
-
Textlabel |
-setLineHeight(int theValue) |
-
Textlabel |
-setMultiline(boolean theFlag) |
-
Textlabel |
-setStringValue(java.lang.String theValue) |
-
Textlabel |
-setText(java.lang.String theText) |
-
Textlabel |
-setValue(float theValue) |
-
Textlabel |
-setValue(java.lang.String theText)
-set the text of the textlabel.
- |
-
Textlabel |
-setWidth(int theValue) |
-
Label |
-valueLabel()
-Deprecated.
- |
-
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getInfo, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setId, setImage, setImage, setImages, setImages, setImages, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, show, toString, unlock, unplugFrom, unplugFrom, unregisterTooltip, update, updateAbsolutePosition, updateEvents, updateInternalEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public Textlabel(ControlP5 theControlP5, - java.lang.String theValue, - int theX, - int theY)-
public Textlabel(ControlP5 theControlP5, - java.lang.String theValue, - int theX, - int theY, - int theW, - int theH)-
@Deprecated -public Textlabel(ControlP5 theControlP5, - java.lang.String theValue, - int theX, - int theY, - int theW, - int theH, - int theColor, - int theFont)-
@Deprecated -public Textlabel(processing.core.PApplet theComponent, - java.lang.String theValue, - int theX, - int theY)-
@Deprecated -public Textlabel(processing.core.PApplet theComponent, - java.lang.String theValue, - int theX, - int theY, - int theW, - int theH)-
@Deprecated -public Textlabel(processing.core.PApplet theComponent, - java.lang.String theValue, - int theX, - int theY, - int theW, - int theH, - int theColor, - int theFont)-
public Textlabel append(java.lang.String theText, - int max)-
public void draw()-
public void draw(int theX, - int theY)-
public void draw(processing.core.PApplet theApplet)-
public void draw(processing.core.PGraphics theGraphics)-
Controller
draw
in interface CDrawable
draw
in interface ControllerInterface<Textlabel>
draw
in class Controller<Textlabel>
ControllerView
public Label get()-
public int getLineHeight()-
public Textlabel setColor(int theColor)-
public Textlabel setFont(ControlFont theControlFont)-
@Deprecated -public Textlabel setFont(int theFont)-
theFont
- intpublic Textlabel setFont(processing.core.PFont thePFont)-
public Textlabel setHeight(int theValue)-
setHeight
in class Controller<Textlabel>
public Textlabel setLetterSpacing(int theValue)-
theValue
- intpublic Textlabel setLineHeight(int theValue)-
public Textlabel setMultiline(boolean theFlag)-
public Textlabel setStringValue(java.lang.String theValue)-
setStringValue
in interface ControllerInterface<Textlabel>
setStringValue
in class Controller<Textlabel>
public Textlabel setText(java.lang.String theText)-
public Textlabel setValue(float theValue)-
setValue
in interface ControllerInterface<Textlabel>
setValue
in class Controller<Textlabel>
theValue
- floatpublic Textlabel setValue(java.lang.String theText)-
theText
- Stringpublic Textlabel setWidth(int theValue)-
setWidth
in class Controller<Textlabel>
@Deprecated -public Label valueLabel()-
valueLabel
in class Controller<Textlabel>
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/TickMark.html b/reference/controlP5/TickMark.html deleted file mode 100644 index 6c81a3d..0000000 --- a/reference/controlP5/TickMark.html +++ /dev/null @@ -1,315 +0,0 @@ - - - - - -Constructor and Description | -
---|
TickMark(Controller<?> theController) |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-draw(processing.core.PGraphics theGraphics) |
-
void |
-draw(processing.core.PGraphics theGraphics,
- int theDirection) |
-
Label |
-getLabel() |
-
Label |
-setLabel(java.lang.String theLabeltext) |
-
void |
-setLength(int theLength) |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public TickMark(Controller<?> theController)-
public void draw(processing.core.PGraphics theGraphics)- -
public void draw(processing.core.PGraphics theGraphics, - int theDirection)-
public Label getLabel()-
public Label setLabel(java.lang.String theLabeltext)-
public void setLength(int theLength)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Toggle.html b/reference/controlP5/Toggle.html deleted file mode 100644 index 06f73f6..0000000 --- a/reference/controlP5/Toggle.html +++ /dev/null @@ -1,970 +0,0 @@ - - - - - -public class Toggle -extends Controller<Toggle>-
-/**
-* ControlP5 Toggle
-*
-*
-* find a list of public methods available for the Toggle Controller
-* at the bottom of this sketch.
-*
-* by Andreas Schlegel, 2011
-* www.sojamo.de/libraries/controlp5
-*
-*/
-
-
-import controlP5.*;
-
-ControlP5 cp5;
-
-int col = color(255);
-
-boolean toggleValue = false;
-
-void setup() {
- size(400,400);
- smooth();
- cp5 = new ControlP5(this);
-
- // create a toggle
- cp5.addToggle("toggleValue")
- .setPosition(40,100)
- .setSize(50,20)
- ;
-
- // create a toggle and change the default look to a (on/off) switch look
- cp5.addToggle("toggle")
- .setPosition(40,250)
- .setSize(50,20)
- .setValue(true)
- .setMode(ControlP5.SWITCH)
- ;
-
-}
-
-
-void draw() {
- background(0);
-
- pushMatrix();
-
- if(toggleValue==true) {
- fill(255,255,220);
- } else {
- fill(128,128,110);
- }
- translate(280,100);
- ellipse(0,0,100,100);
-
-
- translate(0,150);
- fill(col);
- ellipse(0,0,40,40);
-
- popMatrix();
-}
-
-
-
-void toggle(boolean theFlag) {
- if(theFlag==true) {
- col = color(255);
- } else {
- col = color(100);
- }
- println("a toggle event.");
-}
-
-
-
-
-
-
-/*
-a list of all methods available for the Toggle Controller
-use ControlP5.printPublicMethodsFor(Toggle.class);
-to print the following list into the console.
-
-You can find further details about class Toggle in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-
-controlP5.Toggle : Toggle setMode(int)
-controlP5.Toggle : Toggle setState(boolean)
-controlP5.Toggle : Toggle setValue(boolean)
-controlP5.Toggle : Toggle setValue(float)
-controlP5.Toggle : Toggle toggle()
-controlP5.Toggle : Toggle update()
-controlP5.Toggle : boolean getState()
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : Controller addCallback(CallbackListener)
-controlP5.Controller : Controller addListener(ControlListener)
-controlP5.Controller : Controller hide()
-controlP5.Controller : Controller linebreak()
-controlP5.Controller : Controller listen(boolean)
-controlP5.Controller : Controller lock()
-controlP5.Controller : Controller plugTo(Object)
-controlP5.Controller : Controller plugTo(Object, String)
-controlP5.Controller : Controller plugTo(Object[])
-controlP5.Controller : Controller plugTo(Object[], String)
-controlP5.Controller : Controller registerProperty(String)
-controlP5.Controller : Controller registerProperty(String, String)
-controlP5.Controller : Controller registerTooltip(String)
-controlP5.Controller : Controller removeBehavior()
-controlP5.Controller : Controller removeCallback()
-controlP5.Controller : Controller removeCallback(CallbackListener)
-controlP5.Controller : Controller removeListener(ControlListener)
-controlP5.Controller : Controller removeProperty(String)
-controlP5.Controller : Controller removeProperty(String, String)
-controlP5.Controller : Controller setArrayValue(float[])
-controlP5.Controller : Controller setArrayValue(int, float)
-controlP5.Controller : Controller setBehavior(ControlBehavior)
-controlP5.Controller : Controller setBroadcast(boolean)
-controlP5.Controller : Controller setCaptionLabel(String)
-controlP5.Controller : Controller setColor(CColor)
-controlP5.Controller : Controller setColorActive(int)
-controlP5.Controller : Controller setColorBackground(int)
-controlP5.Controller : Controller setColorCaptionLabel(int)
-controlP5.Controller : Controller setColorForeground(int)
-controlP5.Controller : Controller setColorValueLabel(int)
-controlP5.Controller : Controller setDecimalPrecision(int)
-controlP5.Controller : Controller setDefaultValue(float)
-controlP5.Controller : Controller setDisplay(ControllerDisplay)
-controlP5.Controller : Controller setHeight(int)
-controlP5.Controller : Controller setId(int)
-controlP5.Controller : Controller setImages(PImage, PImage, PImage)
-controlP5.Controller : Controller setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Controller setLabelVisible(boolean)
-controlP5.Controller : Controller setLock(boolean)
-controlP5.Controller : Controller setMax(float)
-controlP5.Controller : Controller setMin(float)
-controlP5.Controller : Controller setMoveable(boolean)
-controlP5.Controller : Controller setPosition(PVector)
-controlP5.Controller : Controller setPosition(float, float)
-controlP5.Controller : Controller setSize(PImage)
-controlP5.Controller : Controller setSize(int, int)
-controlP5.Controller : Controller setStringValue(String)
-controlP5.Controller : Controller setUpdate(boolean)
-controlP5.Controller : Controller setValueLabel(String)
-controlP5.Controller : Controller setVisible(boolean)
-controlP5.Controller : Controller setWidth(int)
-controlP5.Controller : Controller show()
-controlP5.Controller : Controller unlock()
-controlP5.Controller : Controller unplugFrom(Object)
-controlP5.Controller : Controller unplugFrom(Object[])
-controlP5.Controller : Controller unregisterTooltip()
-controlP5.Controller : Controller update()
-controlP5.Controller : Controller updateSize()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-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 getLabel()
-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 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 getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setDisplay(ControllerDisplay, int)
-java.lang.Object : String toString()
-java.lang.Object : boolean equals(Object)
-
-
-*/
-
-
-
Modifier and Type | -Field and Description | -
---|---|
static int |
-autoHeight |
-
static int |
-autoWidth |
-
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description | -
---|
Toggle(ControlP5 theControlP5,
- java.lang.String theName)
-Convenience constructor to extend Toggle.
- |
-
Toggle(ControlP5 theControlP5,
- Tab theParent,
- java.lang.String theName,
- float theValue,
- float theX,
- float theY,
- int theWidth,
- int theHeight) |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-draw(processing.core.PGraphics theGraphics)
-the default draw function for each controller extending superclass Controller.
- |
-
boolean |
-getState() |
-
float |
-internalValue() |
-
Toggle |
-linebreak() |
-
void |
-mousePressed() |
-
Toggle |
-setImages(processing.core.PImage... theImages) |
-
void |
-setInternalValue(float theInternalValue)
-by default a toggle returns 0 (for off) and 1 (for on).
- |
-
Toggle |
-setMode(int theMode)
-set the visual mode of a Toggle.
- |
-
Toggle |
-setState(boolean theFlag)
-sets the state of the toggle, this can be true or false.
- |
-
Toggle |
-setValue(boolean theValue) |
-
Toggle |
-setValue(float theValue) |
-
Toggle |
-toggle()
-switch the state of a toggle.
- |
-
Toggle |
-update()
-updates the value of the controller without having to set the value explicitly.
- |
-
Toggle |
-updateDisplayMode(int theState) |
-
add, addCallback, addListener, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, getId, getInfo, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, keyEvent, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeProperty, removeProperty, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setHeight, setId, setImage, setImage, setImages, setImages, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, setWidth, show, toString, unlock, unplugFrom, unplugFrom, unregisterTooltip, updateAbsolutePosition, updateEvents, updateInternalEvents, updateSize
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
parent, setColorLabel, setColorValue, setLabel
public static int autoHeight-
public static int autoWidth-
public Toggle(ControlP5 theControlP5, - java.lang.String theName)-
theControlP5
- theName
- /**
- * 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,
-// is an indicator for the super class about the type of
-// custom controller to be created.
-
-class MyButton extends Controller {
-
- 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;
- }
-}
-
-
public void draw(processing.core.PGraphics theGraphics)-
Controller
draw
in interface CDrawable
draw
in interface ControllerInterface<Toggle>
draw
in class Controller<Toggle>
theApplet
- PAppletControllerView
public boolean getState()-
public float internalValue()-
public Toggle linebreak()-
linebreak
in class Controller<Toggle>
public void mousePressed()-
public Toggle setImages(processing.core.PImage... theImages)-
setImages
in class Controller<Toggle>
public void setInternalValue(float theInternalValue)-
theInternalValue
- public Toggle setMode(int theMode)-
theMode
- public Toggle setState(boolean theFlag)-
theFlag
- booleanpublic Toggle setValue(boolean theValue)-
theValue
- public Toggle setValue(float theValue)-
setValue
in interface ControllerInterface<Toggle>
setValue
in class Controller<Toggle>
theValue
- floatpublic Toggle toggle()-
public Toggle update()-
update
in interface ControllerInterface<Toggle>
update
in class Controller<Toggle>
Controller.setUpdate(boolean)
,
-Controller.isUpdate()
public Toggle updateDisplayMode(int theState)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/Tooltip.html b/reference/controlP5/Tooltip.html deleted file mode 100644 index 701f954..0000000 --- a/reference/controlP5/Tooltip.html +++ /dev/null @@ -1,684 +0,0 @@ - - - - - -public class Tooltip
-extends java.lang.Object
- /**
-* ControlP5 Tooltip
-*
-* add a tooltip to a controller.
-* hover your mouse on top of a slider in the example and wait
-* for 1 second for the tooltip to appear.
-*
-* find a list of public methods available for the Tooltip Controller
-* at the bottom of this sketch.
-*
-* NOTE: currently does not work for custom PGraphics context
-*
-* by Andreas Schlegel, 2011
-* www.sojamo.de/libraries/controlp5
-*
-*/
-
-import controlP5.*;
-
-
-ControlP5 cp5;
-
-float s1 = 20, s2 = 100;
-
-void setup() {
- size(700,400);
- smooth();
- noStroke();
- cp5 = new ControlP5(this);
- cp5.begin(100,100);
- cp5.addSlider("s1",10,200).linebreak();
- cp5.addSlider("s2",0,150);
- cp5.end();
-
- cp5.getTooltip().setDelay(500);
- cp5.getTooltip().register("s1","Changes the size of the ellipse.");
- cp5.getTooltip().register("s2","Changes the Background");
-
-}
-
-
-void keyPressed() {
- println("unregistering the tooltip for s2");
- cp5.getTooltip().unregister("s2");
-}
-void draw() {
- background(s2);
- fill(255,100);
- ellipse(width/2, height/2, s1,s1);
-}
-
-
-
-/*
-a list of all methods available for the Tooltip Controller
-use ControlP5.printPublicMethodsFor(Tooltip.class);
-to print the following list into the console.
-
-You can find further details about class Tooltip in the javadoc.
-
-Format:
-ClassName : returnType methodName(parameter type)
-
-
-controlP5.Tooltip : Label getLabel()
-controlP5.Tooltip : Tooltip disable()
-controlP5.Tooltip : Tooltip enable()
-controlP5.Tooltip : Tooltip register(Controller, String)
-controlP5.Tooltip : Tooltip register(String, String)
-controlP5.Tooltip : Tooltip setAlpha(int)
-controlP5.Tooltip : Tooltip setBorder(int)
-controlP5.Tooltip : Tooltip setColorBackground(int)
-controlP5.Tooltip : Tooltip setColorLabel(int)
-controlP5.Tooltip : Tooltip setDelay(long)
-controlP5.Tooltip : Tooltip setDisplay(ControllerDisplay)
-controlP5.Tooltip : Tooltip setHeight(int)
-controlP5.Tooltip : Tooltip setLabel(Label)
-controlP5.Tooltip : Tooltip setPositionOffset(float, float)
-controlP5.Tooltip : Tooltip setWidth(int)
-controlP5.Tooltip : Tooltip unregister(Controller)
-controlP5.Tooltip : Tooltip unregister(String)
-controlP5.Tooltip : boolean isEnabled()
-controlP5.Tooltip : int getBorder()
-java.lang.Object : String toString()
-java.lang.Object : boolean equals(Object)
-
-*/
-
-
-
-
Modifier and Type | -Method and Description | -
---|---|
Tooltip |
-disable()
-disables the Tooltip on a global level, when
- disabled, tooltip will not respond to any registered
- controller.
- |
-
Tooltip |
-enable()
-in case the tooltip is disabled, use enable() to turn
- the tooltip back on.
- |
-
int |
-getBorder()
-returns the value of the border
- |
-
Label |
-getLabel()
-returns the current Label
- |
-
int |
-getWidth() |
-
boolean |
-isEnabled()
-check if the tooltip is enabled or disabled
- |
-
Tooltip |
-register(Controller<?> theController,
- java.lang.String theText)
-registers a controller with the Tooltip, when
- activating the tooltip for a particular controller,
- the registered text (second parameter) will be
- displayed.
- |
-
Tooltip |
-register(java.lang.String theControllerName,
- java.lang.String theText) |
-
Tooltip |
-setAlpha(int theValue)
-sets the transparency of the default background,
- default value is 200
- |
-
Tooltip |
-setBorder(int theValue)
-sets the border of the tooltip, the default border is
- 4px.
- |
-
Tooltip |
-setColorBackground(int theColor)
-sets the background color of the tooltip, the default
- color is a dark grey
- |
-
Tooltip |
-setColorLabel(int theColor)
-sets the text color of the tooltip's label, the
- default color is a white
- |
-
Tooltip |
-setDelay(long theMillis)
-A tooltip is activated when entered by the mouse,
- after a given delay time the Tooltip starts to fade
- in.
- |
-
Tooltip |
-setHeight(int theHeight) |
-
Tooltip |
-setLabel(Label theLabel)
-sets the Label to a custom label and replaces the
- default label.
- |
-
Tooltip |
-setPositionOffset(float theX,
- float theY)
-adds an offset to the position of the controller
- relative to the mouse cursor's position.
- |
-
Tooltip |
-setView(ControllerView<?> theDisplay)
-A custom view can be set for a Tooltip.
- |
-
Tooltip |
-setWidth(int theWidth)
-with the default display, the width of the tooltip is
- set automatically, therefore setWidth() does not have
- any effect without changing the default display to a
- custom ControllerView.
- |
-
Tooltip |
-unregister(Controller<?> theController)
-removes a controller from the tooltip
- |
-
Tooltip |
-unregister(java.lang.String theControllerName) |
-
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Tooltip disable()-
unregister(Controller)
public Tooltip enable()-
public int getBorder()-
public Label getLabel()-
public int getWidth()-
public boolean isEnabled()-
public Tooltip register(Controller<?> theController, - java.lang.String theText)-
theController
- theText
- public Tooltip register(java.lang.String theControllerName, - java.lang.String theText)-
public Tooltip setAlpha(int theValue)-
theValue
- public Tooltip setBorder(int theValue)-
theValue
- public Tooltip setColorBackground(int theColor)-
theColor
- public Tooltip setColorLabel(int theColor)-
theColor
- public Tooltip setDelay(long theMillis)-
theMillis
- public Tooltip setHeight(int theHeight)-
theHeight
- setWidth(int)
public Tooltip setLabel(Label theLabel)-
theLabel
- public Tooltip setPositionOffset(float theX, - float theY)-
theX
- theY
- public Tooltip setView(ControllerView<?> theDisplay)-
theDisplay
- ControllerView
public Tooltip setWidth(int theWidth)-
ControllerView
,
-controlP5.Tooltip#setDisplay(ControllerView)
public Tooltip unregister(Controller<?> theController)-
theController
- public Tooltip unregister(java.lang.String theControllerName)-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/package-frame.html b/reference/controlP5/package-frame.html deleted file mode 100644 index ebb0ac4..0000000 --- a/reference/controlP5/package-frame.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - -Interface | -Description | -
---|---|
CallbackListener | -
-
- Use a CallbackListener to listen for controller related actions such as pressed, released, etc.
- |
-
CDrawable | -
- The CDrawable interface is used to draw controllers, primarily for internal use.
- |
-
ControlKey | -- |
ControllerInterface<T> | -
- The ControllerInterface is inherited by all ControllerGroup and Controller classes.
- |
-
ControllerView<T> | -
- The interface ControllerView can be used to define custom displays for controllers.
- |
-
ControlListener | -
- ControlListener is an interface that can be implemented by a custom class to be notified when
- controller values change.
- |
-
ControlP5Constants | -
- Constant variables used with ControlP5 are stored here.
- |
-
Pointer | -- |
Class | -Description | -
---|---|
Accordion | -
-
- The Accordion is a list of ControlGroups which can be expanded and collapsed.
- |
-
Bang | -
-
- The Bang controller triggers an event when pressed.
- |
-
BitFont | -- |
BoundingBox | -- |
Button | -
-
- A button triggers an event after it has been release.
- |
-
CallbackEvent | -
-
- A CallbackEvent is send when a controller action such as enter, leave, press, etc has occurs.
- |
-
Canvas | -
- Use a Canvas to draw custom graphics into a control
- window or the default sketch window.
- |
-
CColor | -
- A CColor instance contains the colors of a controller including the foreground-, background-,
- active-, captionlabel- and valuelabel-colors.
- |
-
Chart | -
- Use charts to display float array data as line chart, yet experimental, but see the
- ControlP5chart example for more details.
- |
-
ChartData | -
- Used by Chart, single chart data is stored here including value, (label) text, and color.
- |
-
ChartDataSet | -
- Used by Chart, a chart data set is a container to store chart data.
- |
-
CheckBox | -
- A multiple-choice radioButton.
- |
-
ColorPicker | -
- A simple color picker using sliders to adjust RGBA values.
- |
-
ColorWheel | -- |
ControlBehavior | -
- The abstract class control behavior allows you to add custom behavior to controllers.
- |
-
ControlBroadcaster | -
- The ControlBroadcaster handles all controller value changes and distributes them accordingly to
- its listeners.
- |
-
ControlEvent | -
- A controlEvent is sent to a PApplet or a ControlListener whenever a controller value has changed.
- |
-
ControlFont | -
- A ControlFont is a container for a PFont that can be used to customize the font of a label.
- |
-
ControlGroup<T> | -
-
- In previous versions you would use the ControlGroup class to bundle controllers in a group.
- |
-
Controller<T> | -
-
- Controller is an abstract class that is extended by any available controller within controlP5.
- |
-
ControllerGroup<T> | -
- ControllerGroup is an abstract class and is extended by class ControlGroup, Tab, or the ListBox.
- |
-
ControllerList | -
- Stores objects of type ControllerInterface and CDrawable, mainly for internal use.
- |
-
ControllerPlug | -
- The ControllerPlug is used to do all the reflection procedures to link a controller to a variable
- or function inside your main application.
- |
-
ControllerProperties | -
- Values of controllers can be stored inside properties files which can be saved to file or memory.
- |
-
ControllerProperty | -
- A controller property saves the value, address, getter and setter of a registered controller.
- |
-
ControllerStyle | -
- Labels use the ControllerStyle class to store margin and padding information.
- |
-
ControlP5 | -
-
- controlP5 is a processing and java library for creating
- simple control GUIs.
- |
-
ControlP5Base | -
- The ControlP5Base supports the ControlP5 class and
- implements all adder methods to add controllers to
- controlP5.
- |
-
ControlP5Legacy | -- |
ControlTimer | -
- control timer is a timer that can be used for example as a stop watch or a duration timer.
- |
-
ControlWindow | -- |
CP | -- |
DropdownList | -- |
FrameRate | -- |
Group | -- |
Knob | -
- A knob is a circular slider which can be used with a limited and unlimited range.
- |
-
Label | -
- A custom label using controlP5's BitFonts or PFont based ControlFonts.
- |
-
ListBox | -
- A ListBox is a list of vertically aligned items which can be scrolled if required.
- |
-
ListBoxItem | -
- Used by the ListBox class.
- |
-
Matrix | -
- A matrix is a 2d array with a pointer that traverses through the matrix in a timed interval.
- |
-
MultiList | -
- A Multilist is a multi-menu-tree controller.
- |
-
MultiListButton | -
- Used by MultiList.
- |
-
Numberbox | -
- Click and drag the mouse inside a numberbox and move up and down to change the value of a
- numberbox.
- |
-
Println | -- |
Radio | -- |
RadioButton | -
- A radioButton is a list of toggles that can be turned on or off.
- |
-
Range | -
- A range slider works just like a slider but can be adjusted on both ends.
- |
-
ScrollableList | -
- A ScrollableList is a list of vertically aligned items
- which can be scrolled if required.
- |
-
ScrollableList.ScrollableListView | -- |
Slider | -
- A slider is either used horizontally or vertically.
- |
-
Slider2D | -
- The Slider2D allows to control a handle within a 2D area.
- |
-
Tab | -
- Tabs are used to organize controllers.
- |
-
Textarea | -
- a textarea can be used to leave notes, it uses the controlP5 BitFont to render text.
- |
-
Textfield | -
- A singleline input textfield, use arrow keys to go back and forth, use backspace to delete
- characters.
- |
-
Textlabel | -- |
TickMark | -
- Tickmarks are used by the Slider and Knob controller.
- |
-
Toggle | -
- a toggle can have two states, true and false, where true has the value 1 and false is 0.
- |
-
Tooltip | -
- A tooltip can be registered for individual controllers
- and is activated on rollover.
- |
-
Enum | -Description | -
---|---|
Textfield.InputFilter | -- |
Annotation Type | -Description | -
---|---|
ControlElement | -
- Used for automated controller creation using annotations.
- |
-
ControlP5 (www.sojamo.de/libraries/controlP5) is a library written by Andreas Schlegel for the programming environment processing. ControlP5 is a GUI and controller library for processing that can be used in authoring, application mode. Controllers including Sliders, Buttons, Toggles, Knobs, Textfields, RadioButtons, Checkboxes amongst others can be easily added to a processing sketch and can be arranged in separate control windows, or can be organized in tabs or groups. The controlP5 source code repository is available on github at github.com/sojamo/controlp5. -
-Currently there is no javascript version of ControlP5, though I had started implementing a slimmed down version for processing.js but since it is currently unclear which javascript version, processing.js or p5.js, will become the default js version of processing, controlP5.js is on hold.
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/controlP5/package-tree.html b/reference/controlP5/package-tree.html deleted file mode 100644 index ed65be3..0000000 --- a/reference/controlP5/package-tree.html +++ /dev/null @@ -1,249 +0,0 @@ - - - - - -processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/help-doc.html b/reference/help-doc.html deleted file mode 100644 index 9932f04..0000000 --- a/reference/help-doc.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - -Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
-Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
-Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
-Each annotation type has its own separate page with the following sections:
-Each enum has its own separate page with the following sections:
-There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
-These links take you to the next or previous class, interface, package, or related page.
-These links show and hide the HTML frames. All pages are available with or without frames.
-The All Classes link shows all classes and interfaces except non-static nested types.
-Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
-The Constant Field Values page lists the static final fields and their values.
-processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/index-all.html b/reference/index-all.html deleted file mode 100644 index 96f5252..0000000 --- a/reference/index-all.html +++ /dev/null @@ -1,5165 +0,0 @@ - - - - - -processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/index.html b/reference/index.html deleted file mode 100644 index 20f23a9..0000000 --- a/reference/index.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - -processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/package-list b/reference/package-list deleted file mode 100644 index 73e660c..0000000 --- a/reference/package-list +++ /dev/null @@ -1 +0,0 @@ -controlP5 diff --git a/reference/resources/background.gif b/reference/resources/background.gif deleted file mode 100644 index f471940..0000000 Binary files a/reference/resources/background.gif and /dev/null differ diff --git a/reference/resources/tab.gif b/reference/resources/tab.gif deleted file mode 100644 index 1a73a83..0000000 Binary files a/reference/resources/tab.gif and /dev/null differ diff --git a/reference/resources/titlebar.gif b/reference/resources/titlebar.gif deleted file mode 100644 index 17443b3..0000000 Binary files a/reference/resources/titlebar.gif and /dev/null differ diff --git a/reference/resources/titlebar_end.gif b/reference/resources/titlebar_end.gif deleted file mode 100644 index 3ad78d4..0000000 Binary files a/reference/resources/titlebar_end.gif and /dev/null differ diff --git a/reference/serialized-form.html b/reference/serialized-form.html deleted file mode 100644 index 1d9068d..0000000 --- a/reference/serialized-form.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - -int colorBackground-
int colorForeground-
int colorActive-
int colorCaptionLabel-
int colorValueLabel-
int colorBackgroundAlpha-
int colorForegroundAlpha-
int colorActiveAlpha-
int colorCaptionLabelAlpha-
int colorValueLabelAlpha-
int alpha-
int maskA-
int maskR-
int maskG-
int maskB-
java.lang.String setter-
java.lang.String getter-
java.lang.Class<T> type-
java.lang.Object value-
java.lang.String address-
int id-
int paddingTop-
int paddingRight-
int paddingBottom-
int paddingLeft-
int marginTop-
int marginRight-
int marginBottom-
int marginLeft-
int background-
int backgroundWidth-
int backgroundHeight-
int color-
processing library controlP5 by Andreas Schlegel. (c) 2006-2014
- - diff --git a/reference/stylesheet.css b/reference/stylesheet.css deleted file mode 100644 index f605b49..0000000 --- a/reference/stylesheet.css +++ /dev/null @@ -1,561 +0,0 @@ -/* Javadoc style sheet */ -/* -Overall document style -*/ -body { - background-color:#f4f4f4; - color:#111111; - font-family:Arial, Helvetica, sans-serif; - font-size:76%; - padding:0; - margin:0; - margin-top:20px; -} -a:link, a:visited { - text-decoration:none; - color:#0074D9; /* OK */ -} -a:hover, a:focus { - text-decoration:none; - color:#2ECC40; /* OK */ -} -a:active { - text-decoration:none; - color:#2ECC40; /* OK */ -} -a[name] { - color:#ffff00; -} -a[name]:hover { - text-decoration:none; - color:#2ECC40; -} -pre { - font-size:1.3em; -} -h1 { - font-size:1.8em; -} -h2 { - font-size:1.5em; -} -h3 { - font-size:1.4em; -} -h4 { - font-size:1.3em; -} -h5 { - font-size:1.2em; -} -h6 { - font-size:1.1em; -} -ul { - list-style-type:disc; -} -code, tt { - font-size:1.2em; -} -dt code { - font-size:1.2em; -} -table tr td dt code { - font-size:1.2em; - vertical-align:top; -} -sup { - font-size:.6em; -} -/* -Document title and Copyright styles -*/ -.clear { - clear:both; - height:0px; - overflow:hidden; -} -.aboutLanguage { - float:right; - padding:0px 21px; - font-size:.8em; - z-index:200; - margin-top:-7px; -} -.legalCopy { - margin-left:20px; - margin-bottom:100px; - width:200px; -} -p.legalCopy small { - font-size:1em; - -} -.bar a, .bar a:link, .bar a:visited, .bar a:active { - color:#ff0000; - text-decoration:none; -} -.bar a:hover, .bar a:focus { - color:#ff0000; -} -.tab { - background-color:#ff0000; - background-position:left top; - background-repeat:no-repeat; - color:#ffff00; - padding:8px; - width:5em; - font-weight:bold; -} -/* -Navigation bar styles -*/ -.bar { - background-repeat:repeat-x; - color:#0074D9; /* OK */ - padding:.8em .5em .4em .8em; - height:auto;/*height:1.8em;*/ - font-size:1em; - margin:0; -} -.topNav { - color:#2ECC40; - float:left; - padding:0; - clear:right; - height:2.8em; - padding-top:10px; - padding-left:10px; - overflow:hidden; -} -.bottomNav { - margin-top:10px; - color:#2ECC40; - float:left; - padding:0; - clear:right; - height:2.8em; - padding-top:10px; - padding-left:10px; - overflow:hidden; -} -.subNav { - background-color:#f4f4f4; - padding:20px 10px; - margin:10px 0px; - clear:left; - float:left; - overflow:hidden; -} -.subNav div { - clear:left; - float:left; -} - -ul.navList, ul.subNavList { - float:left; - margin:0 0 0 0px; - padding:0 0 0 0px; -} - -ul.subNavList { - border-bottom:1px solid black; - margin-left:10px; - padding-top:10px; -} -ul.navList li{ - list-style:none; - float:left; - padding:6px 10px; -} -ul.subNavList li{ - list-style:none; - float:left; - font-size:90%; -} -.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { - color:#0074D9; /* OK */ - text-decoration:none; -} -.topNav a:hover, .bottomNav a:hover { - text-decoration:none; - color:#2ECC40; /* OK */ -} - -/* -Page header and footer styles -*/ -.header, .footer { - clear:both; - margin:0 20px; - padding:5px 0 0 0; -} -.indexHeader { - margin:10px; - position:relative; -} -.indexHeader h1 { - font-size:1.3em; -} -.title { - color:#001F3F; - margin:10px 0; - font-weight: normal; -} -.subTitle { - margin:5px 0 0 0; -} -.header ul { - margin:0 0 25px 0; - padding:0; -} -.footer ul { - margin:20px 0 5px 0; -} -.header ul li, .footer ul li { - list-style:none; - font-size:1.2em; -} -/* -Heading styles -*/ -div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { - background-color:#DDDDDD; /* OK, method-details */ - margin:0 0 6px -8px; - padding:10px 5px; - border-top:1px solid #0074D9; /* OK */ -} -ul.blockList ul.blockList ul.blockList li.blockList h3 { - background-color:#DDDDDD; /* OK, method summary */ - margin:0 0 6px -8px; - padding:12px 5px; - border-top:1px solid #0074D9; /* OK */ -} -ul.blockList ul.blockList li.blockList h3 { - padding:0; - margin:15px 0; -} -ul.blockList li.blockList h2 { - padding:0px 0 20px 0; -} -/* -Page layout container styles -*/ -.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { - clear:both; - padding:50px 20px; - position:relative; -} -.indexContainer { - margin:10px; - position:relative; - font-size:1.0em; -} -.indexContainer h2 { - font-size:1.1em; - padding:0 0 3px 0; -} -.indexContainer ul { - margin:0; - padding:0; -} -.indexContainer ul li { - list-style:none; -} -.contentContainer dl dt { - border-top:1px solid #0074D9; - padding-top:5px; -} - -.contentContainer dl dd { - margin-bottom:10px; -} - - -.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { - font-size:1.1em; - font-weight:bold; - margin:10px 0 0 0; - color:#001F3F; /* OK */ -} -.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { - margin:10px 0 10px 20px; -} -.serializedFormContainer dl.nameValue dt { - margin-left:1px; - font-size:1.1em; - display:inline; - font-weight:bold; -} -.serializedFormContainer dl.nameValue dd { - margin:0 0 0 1px; - font-size:1.1em; - display:inline; -} -/* -List styles -*/ -ul.horizontal li { - display:inline; - font-size:0.9em; -} -ul.inheritance { - margin:0; - padding:0; -} -ul.inheritance li { - display:inline; - list-style:none; -} -ul.inheritance li ul.inheritance { - margin-left:15px; - padding-left:15px; - padding-top:1px; -} -ul.blockList, ul.blockListLast { - margin:10px 0 10px 0; - padding:0; - -} -ul.blockList li.blockList, ul.blockListLast li.blockList { - list-style:none; - margin-bottom:25px; - -} -ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { - padding:0px 20px 5px 10px; - border:1px solid #0074D9; /* OK */ - background-color:#ffffff; -} - -ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { - padding:0 0 5px 8px; - border:1px solid #0074D9; /* OK */ - background-color:#ffffff; - border-top:none; -} -ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { - margin-left:0; - padding-left:0; - padding-bottom:15px; - border:none; - border-bottom:1px solid #0074D9; -} -ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { - list-style:none; - border-bottom:none; - padding-bottom:0; -} -table tr td dl, table tr td dl dt, table tr td dl dd { - margin-top:0px; - margin-bottom:1px; -} -/* -Table styles -*/ -.contentContainer table, .classUseContainer table, .constantValuesContainer table { - border-bottom:1px solid #0074D9; - width:100%; -} -.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table { - width:100%; -} -.contentContainer .description table, .contentContainer .details table { - border-bottom:none; -} -.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{ - vertical-align:top; - padding-right:20px; -} -.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast, -.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast, -.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne, -.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne { - padding-right:3px; -} -.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption { - position:relative; - text-align:left; - background-repeat:no-repeat; - color:#ff0000; - font-weight:bold; - clear:none; - overflow:hidden; - padding:0px; - margin:0px; - padding:20px 20px; -} -caption a:link, caption a:hover, caption a:active, caption a:visited { - color:#ff0000; -} -.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span { - white-space:nowrap; - padding-top:8px; - padding-left:0px; - display:block; - float:left; - height:18px; - color:#001F3F; - font-size:1.4em; - font-weight:normal; -} -.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd { - width:10px; - position:relative; - float:left; -} -ul.blockList ul.blockList li.blockList table { - margin:0 0 12px 0px; - width:100%; -} -.tableSubHeadingColor { - background-color: #ffff00; -} - -.altColor { - background-color:#ffffff; -} -.rowColor { - background-color:#f0f0f0; -} -.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td { - text-align:left; - padding:3px 3px 3px 7px; -} -th.colFirst, th.colLast, th.colOne, .constantValuesContainer th { - background:#01FF70; - border-top:1px solid #0074D9; - border-bottom:1px solid #0074D9; - text-align:left; - padding:12px 3px 12px 7px; -} -td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { - font-weight:normal; -} -td.colFirst, th.colFirst { - border-left:1px solid #0074D9; - white-space:nowrap; -} -td.colLast, th.colLast { - border-right:1px solid #0074D9; -} -td.colOne, th.colOne { - border-right:1px solid #0074D9; - border-left:1px solid #0074D9; -} -table.overviewSummary { - padding:0px; - margin-left:0px; -} -table.overviewSummary td.colFirst, table.overviewSummary th.colFirst, -table.overviewSummary td.colOne, table.overviewSummary th.colOne { - width:25%; - vertical-align:middle; -} -table.packageSummary td.colFirst, table.overviewSummary th.colFirst { - width:25%; - vertical-align:middle; -} -/* -Content styles -*/ -.description pre { - margin-top:0; -} -.deprecatedContent { - margin:0; - padding:10px 0; -} -.docSummary { - padding:0; -} -/* -Formatting effect styles -*/ -.sourceLineNo { - color:green; - padding:0 30px 0 0; -} -h1.hidden { - visibility:hidden; - overflow:hidden; - font-size:.9em; -} -.block { - display:block; - margin:3px 0 0 0; -} -.strong { - font-weight:bold; -} - - - -.toggleList { - padding:0; - margin:0; - margin-top:12px; - border:0; -} - -.toggleList dt { - background:#01FF70; - color:#333; - display:inline-block; - padding:8px 16px; - margin:10px 0px 10px 0px; - -moz-border-radius: 20px; /* Firefox */ - -webkit-border-radius: 20px; /* Safari, Chrome */ - border-radius: 20px; /* CSS3 */ - border-top:0; -} - -.toggleList dt:hover { - cursor:pointer; -} - -.toggleList dt span { - border-top:0; - font-family: monospace; - padding:0; - margin:0; -} - - -.toggleList dd { - margin:0; - padding:0; - border:0; -} - -html.isjs .toggleList dd { - border:0; - display: none; -} - -.toggleList pre { - padding: 4px 4px 4px 4px; -} - - - - -.navBarCell1Rev { - background-color:#0074D9; - color:#ffffff; - -moz-border-radius: 20px; /* Firefox */ - -webkit-border-radius: 20px; /* Safari, Chrome */ - border-radius: 20px; /* CSS3 */ - display:inline-block; - margin:0px 10px 0px 10px; -} - -pre { - - font-size:1em; -} - - -p { - width:80%; -}