Permalink
Browse files

2.2.6 release

  • Loading branch information...
1 parent 665b0c1 commit 1f7cb649865eb8657495b5cfeddd0dbe85d70cac @sojamo committed Apr 14, 2016
Showing with 1,291 additions and 645 deletions.
  1. +1 −1 LICENSE.md
  2. +3 −5 examples/controllers/ControlP5colorPicker/ControlP5colorPicker.pde
  3. +82 −68 examples/extra/ControlP5frame/ControlP5frame.pde
  4. +82 −83 resources/build.xml
  5. +1 −1 resources/jar.sh
  6. +2 −2 resources/library.properties
  7. +1 −1 src/controlP5/Accordion.java
  8. +25 −0 src/controlP5/Background.java
  9. +1 −1 src/controlP5/Bang.java
  10. +9 −9 src/controlP5/BitFont.java
  11. +1 −1 src/controlP5/Button.java
  12. +27 −0 src/controlP5/ButtonBar.java
  13. +1 −1 src/controlP5/CColor.java
  14. +1 −1 src/controlP5/CDrawable.java
  15. +26 −6 src/controlP5/CP.java
  16. +1 −1 src/controlP5/CallbackEvent.java
  17. +1 −1 src/controlP5/CallbackListener.java
  18. +25 −0 src/controlP5/Canvas.java
  19. +25 −0 src/controlP5/Chart.java
  20. +25 −0 src/controlP5/ChartData.java
  21. +25 −0 src/controlP5/ChartDataSet.java
  22. +8 −8 src/controlP5/CheckBox.java
  23. +25 −0 src/controlP5/ColorPalette.java
  24. +14 −12 src/controlP5/ColorPicker.java
  25. +28 −3 src/controlP5/ColorWheel.java
  26. +9 −9 src/controlP5/ControlBehavior.java
  27. +1 −1 src/controlP5/ControlBroadcaster.java
  28. +25 −0 src/controlP5/ControlElement.java
  29. +1 −1 src/controlP5/ControlEvent.java
  30. +9 −9 src/controlP5/ControlFont.java
  31. +12 −14 src/controlP5/ControlGroup.java
  32. +25 −0 src/controlP5/ControlKey.java
  33. +9 −9 src/controlP5/ControlListener.java
  34. +25 −21 src/controlP5/ControlP5.java
  35. +12 −15 src/controlP5/ControlP5Base.java
  36. +13 −14 src/controlP5/ControlP5Constants.java
  37. +25 −0 src/controlP5/ControlP5Legacy.java
  38. +1 −1 src/controlP5/ControlTimer.java
  39. +23 −34 src/controlP5/ControlWindow.java
  40. +1 −1 src/controlP5/ControlWindowCanvas.java
  41. +28 −19 src/controlP5/Controller.java
  42. +12 −12 src/controlP5/ControllerAutomator.java
  43. +9 −9 src/controlP5/ControllerDisplay.java
  44. +16 −3 src/controlP5/ControllerGroup.java
  45. +9 −4 src/controlP5/ControllerInterface.java
  46. +25 −2 src/controlP5/ControllerLayout.java
  47. +25 −0 src/controlP5/ControllerLayoutElement.java
  48. +9 −9 src/controlP5/ControllerList.java
  49. +9 −9 src/controlP5/ControllerPlug.java
  50. +40 −15 src/controlP5/ControllerProperties.java
  51. +29 −16 src/controlP5/ControllerProperty.java
  52. +16 −13 src/controlP5/ControllerStyle.java
  53. +9 −9 src/controlP5/ControllerView.java
  54. +21 −19 src/controlP5/DropdownList.java
  55. +25 −0 src/controlP5/FieldChangedListener.java
  56. +25 −0 src/controlP5/FrameRate.java
  57. +24 −0 src/controlP5/Group.java
  58. +25 −0 src/controlP5/Icon.java
  59. +1 −1 src/controlP5/Knob.java
  60. +13 −2 src/controlP5/Label.java
  61. +1 −1 src/controlP5/ListBox.java
  62. +1 −1 src/controlP5/Matrix.java
  63. +1 −1 src/controlP5/MultiList.java
  64. +1 −1 src/controlP5/MultiListButton.java
  65. +1 −1 src/controlP5/MultiListInterface.java
  66. +9 −9 src/controlP5/Numberbox.java
  67. +25 −0 src/controlP5/Pad.java
  68. +25 −0 src/controlP5/Pointer.java
  69. +25 −0 src/controlP5/Println.java
  70. +25 −0 src/controlP5/Radio.java
  71. +1 −1 src/controlP5/RadioButton.java
  72. +13 −3 src/controlP5/Range.java
  73. +25 −27 src/controlP5/ScrollableList.java
  74. +1 −1 src/controlP5/Slider.java
  75. +25 −0 src/controlP5/Slider2D.java
  76. +25 −0 src/controlP5/Spacer.java
  77. +1 −1 src/controlP5/Tab.java
  78. +1 −1 src/controlP5/Textarea.java
  79. +24 −23 src/controlP5/Textfield.java
  80. +1 −1 src/controlP5/Textlabel.java
  81. +9 −10 src/controlP5/TickMark.java
  82. +1 −1 src/controlP5/Toggle.java
  83. +40 −86 src/controlP5/Tooltip.java
  84. +9 −0 src/controlP5/changeLog.txt
View
@@ -471,7 +471,7 @@ convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
controlP5 is a processing gui library.
- Copyright (C) 2006-2014 andreas schlegel
+ Copyright (C) 2006-2015 andreas schlegel
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -42,13 +42,13 @@ public void controlEvent(ControlEvent c) {
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);
+ 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);
+ println("picker\talpha:"+int(alpha(col))+"\tred:"+int(red(col))+"\tgreen:"+int(green(col))+"\tblue:"+int(blue(col))+"\tcol"+col);
}
@@ -183,6 +183,4 @@ java.lang.Object : boolean equals(Object)
created: 2015/03/24 12:20:58
-*/
-
-
+*/
@@ -1,98 +1,112 @@
/**
* ControlP5 Controlframe
- * with controlP5 2.0 all java.awt dependencies have been removed
- * as a consequence the option to display controllers in a separate
- * window had to be removed as well.
- * this example shows you how to create a java.awt.frame and use controlP5
*
- * by Andreas Schlegel, 2012
+ * this example shows you how to create separate window to
+ * display and use controllers with processing 3
+ *
+ * by Andreas Schlegel, 2016
* www.sojamo.de/libraries/controlp5
*
*/
-import java.awt.Frame;
-import java.awt.BorderLayout;
import controlP5.*;
-private ControlP5 cp5;
-
ControlFrame cf;
-int def;
+float speed;
+float pos;
+float c0, c1, c2, c3;
+boolean auto;
-void setup() {
- size(400, 400);
- cp5 = new ControlP5(this);
-
- // by calling function addControlFrame() a
- // new frame is created and an instance of class
- // ControlFrame is instanziated.
- cf = addControlFrame("extra", 200,200);
+void settings() {
+ size(400, 400, P3D);
+}
- // add Controllers to the 'extra' Frame inside
- // the ControlFrame class setup() method below.
-
-
+void setup() {
+ cf = new ControlFrame(this, 400, 800, "Controls");
+ surface.setLocation(420, 10);
+ noStroke();
}
void draw() {
- background(def);
+ if (auto) pos += speed;
+ background(0);
+ translate(width/2, height/2);
+ rotateY(pos);
+ lights();
+ fill(c0, c1, c2, c3);
+ box(100);
}
-ControlFrame addControlFrame(String theName, int theWidth, int theHeight) {
- Frame f = new Frame(theName);
- ControlFrame p = new ControlFrame(this, theWidth, theHeight);
- f.add(p);
- p.init();
- f.setTitle(theName);
- f.setSize(p.w, p.h);
- f.setLocation(100, 100);
- f.setResizable(false);
- f.setVisible(true);
- return p;
-}
-// the ControlFrame class extends PApplet, so we
-// are creating a new processing applet inside a
-// new frame with a controlP5 object loaded
-public class ControlFrame extends PApplet {
+
+class ControlFrame extends PApplet {
int w, h;
+ PApplet parent;
+ ControlP5 cp5;
- int abc = 100;
-
- public void setup() {
- size(w, h);
- frameRate(25);
- cp5 = new ControlP5(this);
- cp5.addSlider("abc").setRange(0, 255).setPosition(10,10);
- cp5.addSlider("def").plugTo(parent,"def").setRange(0, 255).setPosition(10,30);
+ public ControlFrame(PApplet _parent, int _w, int _h, String _name) {
+ super();
+ parent = _parent;
+ w=_w;
+ h=_h;
+ PApplet.runSketch(new String[]{this.getClass().getName()}, this);
}
- public void draw() {
- background(abc);
- }
-
- private ControlFrame() {
+ public void settings() {
+ size(w, h);
}
- public ControlFrame(Object theParent, int theWidth, int theHeight) {
- parent = theParent;
- w = theWidth;
- h = theHeight;
+ public void setup() {
+ surface.setLocation(10, 10);
+ cp5 = new ControlP5(this);
+
+ cp5.addToggle("auto")
+ .plugTo(parent, "auto")
+ .setPosition(10, 70)
+ .setSize(50, 50)
+ .setValue(true);
+
+ cp5.addKnob("blend")
+ .plugTo(parent, "c3")
+ .setPosition(100, 300)
+ .setSize(200, 200)
+ .setRange(0, 255)
+ .setValue(200);
+
+ cp5.addNumberbox("color-red")
+ .plugTo(parent, "c0")
+ .setRange(0, 255)
+ .setValue(255)
+ .setPosition(100, 10)
+ .setSize(100, 20);
+
+ cp5.addNumberbox("color-green")
+ .plugTo(parent, "c1")
+ .setRange(0, 255)
+ .setValue(128)
+ .setPosition(100, 70)
+ .setSize(100, 20);
+
+ cp5.addNumberbox("color-blue")
+ .plugTo(parent, "c2")
+ .setRange(0, 255)
+ .setValue(0)
+ .setPosition(100, 130)
+ .setSize(100, 20);
+
+ cp5.addSlider("speed")
+ .plugTo(parent, "speed")
+ .setRange(0, 0.1)
+ .setValue(0.01)
+ .setPosition(100, 240)
+ .setSize(200, 30);
+
}
-
- public ControlP5 control() {
- return cp5;
+ void draw() {
+ background(190);
}
-
-
- ControlP5 cp5;
-
- Object parent;
-
-
-}
-
+}
Oops, something went wrong.

0 comments on commit 1f7cb64

Please sign in to comment.