From 388b13569b153afbe4e7a8878b2d302e69cb10ec Mon Sep 17 00:00:00 2001 From: sojamo Date: Tue, 24 Mar 2015 12:27:05 +0800 Subject: [PATCH] 2.2.3 release --- .gitignore | 1 - README.md | 2 +- .../ControlP5ButtonBar/ControlP5ButtonBar.pde | 2 +- .../ControlP5ColorWheel.pde | 2 +- .../ControlP5accordion/ControlP5accordion.pde | 2 +- .../ControlP5background.pde | 2 +- .../ControlP5bang/ControlP5bang.pde | 2 +- .../ControlP5button/ControlP5button.pde | 2 +- .../ControlP5canvas/ControlP5canvas.pde | 2 +- .../ControlP5chart/ControlP5chart.pde | 2 +- .../ControlP5checkBox/ControlP5checkBox.pde | 2 +- .../ControlP5colorPicker.pde | 2 +- .../ControlP5controlTimer.pde | 2 +- .../ControlP5controllerProperties.pde | 2 +- .../ControlP5dropdownList.pde | 2 +- .../ControlP5group/ControlP5group.pde | 2 +- .../ControlP5icon/ControlP5icon.pde | 2 +- .../ControlP5knob/ControlP5knob.pde | 2 +- .../ControlP5listBox/ControlP5listBox.pde | 2 +- .../ControlP5matrix/ControlP5matrix.pde | 2 +- .../ControlP5numberbox/ControlP5numberbox.pde | 2 +- .../ControlP5radioButton.pde | 2 +- .../ControlP5range/ControlP5range.pde | 2 +- .../ControlP5scrollableList.pde | 2 +- .../ControlP5slider/ControlP5slider.pde | 2 +- .../ControlP5slider2D/ControlP5slider2D.pde | 2 +- .../controllers/ControlP5tab/ControlP5tab.pde | 2 +- .../ControlP5textarea/ControlP5textarea.pde | 2 +- .../ControlP5textfield/ControlP5textfield.pde | 2 +- .../ControlP5textlabel/ControlP5Textlabel.pde | 2 +- .../ControlP5toggle/ControlP5toggle.pde | 3 +- .../ControlP5tooltip/ControlP5tooltip.pde | 2 +- .../ControlP5frameRate/ControlP5frameRate.pde | 2 +- .../ControlP5pointer/ControlP5pointer.pde | 2 +- .../ControlP5controlEvent.pde | 2 +- .../ControlP5controlFont.pde | 2 +- resources/build.xml | 6 +- resources/library.properties | 6 +- src/controlP5/CColor.java | 13 ----- src/controlP5/ControlBroadcaster.java | 12 ---- src/controlP5/ControlP5.java | 56 ++++++++++++++++++- src/controlP5/ControlP5Constants.java | 5 ++ src/controlP5/ControlWindow.java | 15 ++--- src/controlP5/ControllerPlug.java | 9 --- src/controlP5/DropdownList.java | 5 +- src/controlP5/ScrollableList.java | 6 +- src/controlP5/TODO | 4 ++ src/controlP5/Toggle.java | 4 ++ 48 files changed, 125 insertions(+), 88 deletions(-) diff --git a/.gitignore b/.gitignore index f91f530..37752ba 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,3 @@ .buildpath .classpath .project - diff --git a/README.md b/README.md index 0c9ca70..a37f0a9 100644 --- a/README.md +++ b/README.md @@ -366,4 +366,4 @@ If you want to help improve ControlP5, the first place for me to do so would be If you have used ControlP5 in any of your projects, let me know, send me details, send me links, send me screeshots. -Copyright 2006-2014 Andreas Schlegel +Copyright 2006-2015 Andreas Schlegel diff --git a/examples/controllers/ControlP5ButtonBar/ControlP5ButtonBar.pde b/examples/controllers/ControlP5ButtonBar/ControlP5ButtonBar.pde index f0a7582..8b9f07a 100644 --- a/examples/controllers/ControlP5ButtonBar/ControlP5ButtonBar.pde +++ b/examples/controllers/ControlP5ButtonBar/ControlP5ButtonBar.pde @@ -200,7 +200,7 @@ controlP5.Controller : void setView(ControllerView, int) java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:18:39 +created: 2015/03/24 12:20:51 */ diff --git a/examples/controllers/ControlP5ColorWheel/ControlP5ColorWheel.pde b/examples/controllers/ControlP5ColorWheel/ControlP5ColorWheel.pde index e8e784d..b802311 100644 --- a/examples/controllers/ControlP5ColorWheel/ControlP5ColorWheel.pde +++ b/examples/controllers/ControlP5ColorWheel/ControlP5ColorWheel.pde @@ -196,7 +196,7 @@ controlP5.Controller : void setView(ControllerView, int) java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:18:40 +created: 2015/03/24 12:21:00 */ diff --git a/examples/controllers/ControlP5accordion/ControlP5accordion.pde b/examples/controllers/ControlP5accordion/ControlP5accordion.pde index 98323c4..81d395d 100644 --- a/examples/controllers/ControlP5accordion/ControlP5accordion.pde +++ b/examples/controllers/ControlP5accordion/ControlP5accordion.pde @@ -279,7 +279,7 @@ controlP5.ControllerGroup : void remove() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:18:42 +created: 2015/03/24 12:25:32 */ diff --git a/examples/controllers/ControlP5background/ControlP5background.pde b/examples/controllers/ControlP5background/ControlP5background.pde index 57a2724..11a974c 100644 --- a/examples/controllers/ControlP5background/ControlP5background.pde +++ b/examples/controllers/ControlP5background/ControlP5background.pde @@ -181,7 +181,7 @@ controlP5.ControllerGroup : void remove() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:18:44 +created: 2015/03/24 12:25:35 */ diff --git a/examples/controllers/ControlP5bang/ControlP5bang.pde b/examples/controllers/ControlP5bang/ControlP5bang.pde index 3f7c728..c84e786 100644 --- a/examples/controllers/ControlP5bang/ControlP5bang.pde +++ b/examples/controllers/ControlP5bang/ControlP5bang.pde @@ -224,7 +224,7 @@ controlP5.Controller : void setView(ControllerView, int) java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:18:45 +created: 2015/03/24 12:25:36 */ diff --git a/examples/controllers/ControlP5button/ControlP5button.pde b/examples/controllers/ControlP5button/ControlP5button.pde index dab3c45..08f1d3f 100644 --- a/examples/controllers/ControlP5button/ControlP5button.pde +++ b/examples/controllers/ControlP5button/ControlP5button.pde @@ -260,7 +260,7 @@ controlP5.Controller : void setView(ControllerView, int) java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:18:47 +created: 2015/03/24 12:20:49 */ diff --git a/examples/controllers/ControlP5canvas/ControlP5canvas.pde b/examples/controllers/ControlP5canvas/ControlP5canvas.pde index 23e2814..7bfa71b 100644 --- a/examples/controllers/ControlP5canvas/ControlP5canvas.pde +++ b/examples/controllers/ControlP5canvas/ControlP5canvas.pde @@ -82,7 +82,7 @@ controlP5.Canvas : void update(PApplet) java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:18:48 +created: 2015/03/24 12:20:53 */ diff --git a/examples/controllers/ControlP5chart/ControlP5chart.pde b/examples/controllers/ControlP5chart/ControlP5chart.pde index 964aa70..7d97672 100644 --- a/examples/controllers/ControlP5chart/ControlP5chart.pde +++ b/examples/controllers/ControlP5chart/ControlP5chart.pde @@ -236,7 +236,7 @@ controlP5.Controller : void setView(ControllerView, int) java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:18:50 +created: 2015/03/24 12:20:54 */ diff --git a/examples/controllers/ControlP5checkBox/ControlP5checkBox.pde b/examples/controllers/ControlP5checkBox/ControlP5checkBox.pde index b63a346..e29e710 100644 --- a/examples/controllers/ControlP5checkBox/ControlP5checkBox.pde +++ b/examples/controllers/ControlP5checkBox/ControlP5checkBox.pde @@ -235,7 +235,7 @@ controlP5.ControllerGroup : void remove() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:18:51 +created: 2015/03/24 12:20:56 */ diff --git a/examples/controllers/ControlP5colorPicker/ControlP5colorPicker.pde b/examples/controllers/ControlP5colorPicker/ControlP5colorPicker.pde index b51524d..5d3dc62 100644 --- a/examples/controllers/ControlP5colorPicker/ControlP5colorPicker.pde +++ b/examples/controllers/ControlP5colorPicker/ControlP5colorPicker.pde @@ -181,7 +181,7 @@ controlP5.ControllerGroup : void remove() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:18:53 +created: 2015/03/24 12:20:58 */ diff --git a/examples/controllers/ControlP5controlTimer/ControlP5controlTimer.pde b/examples/controllers/ControlP5controlTimer/ControlP5controlTimer.pde index e0a9dba..7f4c583 100644 --- a/examples/controllers/ControlP5controlTimer/ControlP5controlTimer.pde +++ b/examples/controllers/ControlP5controlTimer/ControlP5controlTimer.pde @@ -56,7 +56,7 @@ controlP5.ControlTimer : void update() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:18:55 +created: 2015/03/24 12:21:02 */ diff --git a/examples/controllers/ControlP5controllerProperties/ControlP5controllerProperties.pde b/examples/controllers/ControlP5controllerProperties/ControlP5controllerProperties.pde index c92c3d8..b6e293c 100644 --- a/examples/controllers/ControlP5controllerProperties/ControlP5controllerProperties.pde +++ b/examples/controllers/ControlP5controllerProperties/ControlP5controllerProperties.pde @@ -158,7 +158,7 @@ controlP5.ControllerProperties : void setFormat(String) java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:18:56 +created: 2015/03/24 12:21:03 */ diff --git a/examples/controllers/ControlP5dropdownList/ControlP5dropdownList.pde b/examples/controllers/ControlP5dropdownList/ControlP5dropdownList.pde index 19cd7e5..73e644a 100644 --- a/examples/controllers/ControlP5dropdownList/ControlP5dropdownList.pde +++ b/examples/controllers/ControlP5dropdownList/ControlP5dropdownList.pde @@ -304,7 +304,7 @@ controlP5.DropdownList : void updateItemIndexOffset() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:18:58 +created: 2015/03/24 12:21:05 */ diff --git a/examples/controllers/ControlP5group/ControlP5group.pde b/examples/controllers/ControlP5group/ControlP5group.pde index 915d0be..bdece31 100644 --- a/examples/controllers/ControlP5group/ControlP5group.pde +++ b/examples/controllers/ControlP5group/ControlP5group.pde @@ -228,7 +228,7 @@ controlP5.ControllerGroup : void remove() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:00 +created: 2015/03/24 12:21:07 */ diff --git a/examples/controllers/ControlP5icon/ControlP5icon.pde b/examples/controllers/ControlP5icon/ControlP5icon.pde index e9b2f56..ad686a6 100644 --- a/examples/controllers/ControlP5icon/ControlP5icon.pde +++ b/examples/controllers/ControlP5icon/ControlP5icon.pde @@ -211,7 +211,7 @@ controlP5.Icon : int getFontIcon(int) java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:01 +created: 2015/03/24 12:21:09 */ diff --git a/examples/controllers/ControlP5knob/ControlP5knob.pde b/examples/controllers/ControlP5knob/ControlP5knob.pde index 700a635..d7578f5 100644 --- a/examples/controllers/ControlP5knob/ControlP5knob.pde +++ b/examples/controllers/ControlP5knob/ControlP5knob.pde @@ -253,7 +253,7 @@ controlP5.Knob : int getViewStyle() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:02 +created: 2015/03/24 12:21:10 */ diff --git a/examples/controllers/ControlP5listBox/ControlP5listBox.pde b/examples/controllers/ControlP5listBox/ControlP5listBox.pde index 1d5388f..f3cc80a 100644 --- a/examples/controllers/ControlP5listBox/ControlP5listBox.pde +++ b/examples/controllers/ControlP5listBox/ControlP5listBox.pde @@ -312,7 +312,7 @@ controlP5.ListBox : void updateItemIndexOffset() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:04 +created: 2015/03/24 12:21:12 */ diff --git a/examples/controllers/ControlP5matrix/ControlP5matrix.pde b/examples/controllers/ControlP5matrix/ControlP5matrix.pde index 1f2c2e8..cdd0628 100644 --- a/examples/controllers/ControlP5matrix/ControlP5matrix.pde +++ b/examples/controllers/ControlP5matrix/ControlP5matrix.pde @@ -289,7 +289,7 @@ controlP5.Matrix : void remove() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:06 +created: 2015/03/24 12:21:14 */ diff --git a/examples/controllers/ControlP5numberbox/ControlP5numberbox.pde b/examples/controllers/ControlP5numberbox/ControlP5numberbox.pde index 4ebe7c4..cc84d09 100644 --- a/examples/controllers/ControlP5numberbox/ControlP5numberbox.pde +++ b/examples/controllers/ControlP5numberbox/ControlP5numberbox.pde @@ -207,7 +207,7 @@ controlP5.Numberbox : float getMultiplier() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:09 +created: 2015/03/24 12:25:44 */ diff --git a/examples/controllers/ControlP5radioButton/ControlP5radioButton.pde b/examples/controllers/ControlP5radioButton/ControlP5radioButton.pde index dd8a23b..9777072 100644 --- a/examples/controllers/ControlP5radioButton/ControlP5radioButton.pde +++ b/examples/controllers/ControlP5radioButton/ControlP5radioButton.pde @@ -231,7 +231,7 @@ controlP5.RadioButton : void updateLayout() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:11 +created: 2015/03/24 12:21:19 */ diff --git a/examples/controllers/ControlP5range/ControlP5range.pde b/examples/controllers/ControlP5range/ControlP5range.pde index e2be638..9f4ee2a 100644 --- a/examples/controllers/ControlP5range/ControlP5range.pde +++ b/examples/controllers/ControlP5range/ControlP5range.pde @@ -237,7 +237,7 @@ controlP5.Range : float[] getArrayValue() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:12 +created: 2015/03/24 12:21:20 */ diff --git a/examples/controllers/ControlP5scrollableList/ControlP5scrollableList.pde b/examples/controllers/ControlP5scrollableList/ControlP5scrollableList.pde index 2c5282f..6f132a4 100644 --- a/examples/controllers/ControlP5scrollableList/ControlP5scrollableList.pde +++ b/examples/controllers/ControlP5scrollableList/ControlP5scrollableList.pde @@ -254,7 +254,7 @@ controlP5.ScrollableList : void updateItemIndexOffset() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:14 +created: 2015/03/24 12:21:22 */ diff --git a/examples/controllers/ControlP5slider/ControlP5slider.pde b/examples/controllers/ControlP5slider/ControlP5slider.pde index 275e17e..32ca3e7 100644 --- a/examples/controllers/ControlP5slider/ControlP5slider.pde +++ b/examples/controllers/ControlP5slider/ControlP5slider.pde @@ -290,7 +290,7 @@ controlP5.Slider : int getTriggerEvent() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:16 +created: 2015/03/24 12:25:46 */ diff --git a/examples/controllers/ControlP5slider2D/ControlP5slider2D.pde b/examples/controllers/ControlP5slider2D/ControlP5slider2D.pde index da9d113..bf3062d 100644 --- a/examples/controllers/ControlP5slider2D/ControlP5slider2D.pde +++ b/examples/controllers/ControlP5slider2D/ControlP5slider2D.pde @@ -231,7 +231,7 @@ controlP5.Slider2D : void setValueLabelSeparator(String) java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:18 +created: 2015/03/24 12:25:47 */ diff --git a/examples/controllers/ControlP5tab/ControlP5tab.pde b/examples/controllers/ControlP5tab/ControlP5tab.pde index a17f582..15f1a10 100644 --- a/examples/controllers/ControlP5tab/ControlP5tab.pde +++ b/examples/controllers/ControlP5tab/ControlP5tab.pde @@ -229,7 +229,7 @@ controlP5.Tab : float getValue() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:19 +created: 2015/03/24 12:25:49 */ diff --git a/examples/controllers/ControlP5textarea/ControlP5textarea.pde b/examples/controllers/ControlP5textarea/ControlP5textarea.pde index eb349af..696846f 100644 --- a/examples/controllers/ControlP5textarea/ControlP5textarea.pde +++ b/examples/controllers/ControlP5textarea/ControlP5textarea.pde @@ -222,7 +222,7 @@ controlP5.Textarea : void controlEvent(ControlEvent) java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:21 +created: 2015/03/24 12:21:29 */ diff --git a/examples/controllers/ControlP5textfield/ControlP5textfield.pde b/examples/controllers/ControlP5textfield/ControlP5textfield.pde index 86e37f9..8de4528 100644 --- a/examples/controllers/ControlP5textfield/ControlP5textfield.pde +++ b/examples/controllers/ControlP5textfield/ControlP5textfield.pde @@ -250,7 +250,7 @@ controlP5.Textfield : void keyEvent(KeyEvent) java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:23 +created: 2015/03/24 12:21:31 */ diff --git a/examples/controllers/ControlP5textlabel/ControlP5Textlabel.pde b/examples/controllers/ControlP5textlabel/ControlP5Textlabel.pde index c4e61ac..9ceaeac 100644 --- a/examples/controllers/ControlP5textlabel/ControlP5Textlabel.pde +++ b/examples/controllers/ControlP5textlabel/ControlP5Textlabel.pde @@ -204,7 +204,7 @@ controlP5.Textlabel : void draw(int, int) java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:24 +created: 2015/03/24 12:21:33 */ diff --git a/examples/controllers/ControlP5toggle/ControlP5toggle.pde b/examples/controllers/ControlP5toggle/ControlP5toggle.pde index 630acac..72f8d01 100644 --- a/examples/controllers/ControlP5toggle/ControlP5toggle.pde +++ b/examples/controllers/ControlP5toggle/ControlP5toggle.pde @@ -228,10 +228,11 @@ controlP5.Toggle : Toggle toggle() controlP5.Toggle : Toggle update() controlP5.Toggle : boolean getBooleanValue() controlP5.Toggle : boolean getState() +controlP5.Toggle : int getMode() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:26 +created: 2015/03/24 12:21:35 */ diff --git a/examples/controllers/ControlP5tooltip/ControlP5tooltip.pde b/examples/controllers/ControlP5tooltip/ControlP5tooltip.pde index 74ca904..435b5a4 100644 --- a/examples/controllers/ControlP5tooltip/ControlP5tooltip.pde +++ b/examples/controllers/ControlP5tooltip/ControlP5tooltip.pde @@ -109,7 +109,7 @@ controlP5.Tooltip : int getWidth() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:27 +created: 2015/03/24 12:21:36 */ diff --git a/examples/extra/ControlP5frameRate/ControlP5frameRate.pde b/examples/extra/ControlP5frameRate/ControlP5frameRate.pde index 18f530c..85aed00 100644 --- a/examples/extra/ControlP5frameRate/ControlP5frameRate.pde +++ b/examples/extra/ControlP5frameRate/ControlP5frameRate.pde @@ -192,7 +192,7 @@ controlP5.Textlabel : void draw(int, int) java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:19:51 +created: 2015/03/24 12:22:02 */ diff --git a/examples/extra/ControlP5pointer/ControlP5pointer.pde b/examples/extra/ControlP5pointer/ControlP5pointer.pde index b8476e7..a278691 100644 --- a/examples/extra/ControlP5pointer/ControlP5pointer.pde +++ b/examples/extra/ControlP5pointer/ControlP5pointer.pde @@ -68,7 +68,7 @@ ClassName : returnType methodName(parameter type) -created: 2014/09/08 01:20:02 +created: 2015/03/24 12:22:14 */ diff --git a/examples/use/ControlP5controlEvent/ControlP5controlEvent.pde b/examples/use/ControlP5controlEvent/ControlP5controlEvent.pde index 6196dc4..5f7a909 100644 --- a/examples/use/ControlP5controlEvent/ControlP5controlEvent.pde +++ b/examples/use/ControlP5controlEvent/ControlP5controlEvent.pde @@ -112,7 +112,7 @@ controlP5.ControlEvent : int getType() java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:20:21 +created: 2015/03/24 12:22:35 */ diff --git a/examples/use/ControlP5controlFont/ControlP5controlFont.pde b/examples/use/ControlP5controlFont/ControlP5controlFont.pde index 1aeb156..35df35c 100644 --- a/examples/use/ControlP5controlFont/ControlP5controlFont.pde +++ b/examples/use/ControlP5controlFont/ControlP5controlFont.pde @@ -127,7 +127,7 @@ controlP5.ControlFont : void setSize(int) java.lang.Object : String toString() java.lang.Object : boolean equals(Object) -created: 2014/09/08 01:20:23 +created: 2015/03/24 12:22:36 */ diff --git a/resources/build.xml b/resources/build.xml index d5fc29d..0c01d3b 100644 --- a/resources/build.xml +++ b/resources/build.xml @@ -13,13 +13,13 @@ - + - + - + diff --git a/resources/library.properties b/resources/library.properties index ce09e6e..badcae1 100644 --- a/resources/library.properties +++ b/resources/library.properties @@ -22,7 +22,7 @@ category = GUI # shown from inside the PDE when the library is being installed. Avoid repeating # the name of your library here. Also, avoid saying anything redundant like # mentioning that its a library. -sentence = A GUI library with a range of controllers to build custom user interfaces for desktop and android mode. +sentence = A GUI library to build custom user interfaces for desktop and android mode. # Additional information suitable for the Processing website. The value of # 'sentence' always will be prepended, so you should start by writing the @@ -38,7 +38,7 @@ paragraph = Includes interface elements such as slider, button, knob, toggle, te # is used to compare different versions of the same library, and # check if an update is available. You should think of it as a # counter, counting the total number of releases you've had. -version = 81 # This must be parsable as an int +version = 82 # This must be parsable as an int # The version as the user will see it. If blank, the version attribute will be used here -prettyVersion = 2.2.2 # This is treated as a String +prettyVersion = 2.2.3 # This is treated as a String diff --git a/src/controlP5/CColor.java b/src/controlP5/CColor.java index 91c5702..ba2ff06 100755 --- a/src/controlP5/CColor.java +++ b/src/controlP5/CColor.java @@ -34,33 +34,20 @@ public class CColor implements Serializable { private int colorBackground = 0xff003652; - private int colorForeground = 0xff00698c; - private int colorActive = 0xff08a2cf; // 0699C4; - private int colorCaptionLabel = 0xffffffff; - private int colorValueLabel = 0xffffffff; - private int colorBackgroundAlpha = 0xff; - private int colorForegroundAlpha = 0xff; - private int colorActiveAlpha = 0xff; // 0699C4; - private int colorCaptionLabelAlpha = 0xff; - private int colorValueLabelAlpha = 0xff; private int alpha = 0xff; - private int maskA = 0x00ffffff; - int maskR = 0xff00ffff; - int maskG = 0xffff00ff; - int maskB = 0xffffff00; protected CColor set( CColor theColor ) { diff --git a/src/controlP5/ControlBroadcaster.java b/src/controlP5/ControlBroadcaster.java index d6ab0fa..dc9d364 100755 --- a/src/controlP5/ControlBroadcaster.java +++ b/src/controlP5/ControlBroadcaster.java @@ -47,29 +47,17 @@ public class ControlBroadcaster { private int _myControlEventType = ControlP5Constants.INVALID; - private ControllerPlug _myControlEventPlug = null; - private ControllerPlug _myControllerCallbackEventPlug = null; - private ControlP5 cp5; - private String _myEventMethod = "controlEvent"; - private String _myControllerCallbackEventMethod = "controlEvent"; - private ArrayList< ControlListener > _myControlListeners; - private Set< Entry< CallbackListener , Controller< ? >>> _myControllerCallbackListeners; - private static boolean setPrintStackTrace = true; - private static boolean ignoreErrorMessage = false; - private static Map< Class< ? > , Field[] > fieldcache = new HashMap< Class< ? > , Field[] >( ); - private static Map< Class< ? > , Method[] > methodcache = new HashMap< Class< ? > , Method[] >( ); - boolean broadcast = true; protected ControlBroadcaster( ControlP5 theControlP5 ) { diff --git a/src/controlP5/ControlP5.java b/src/controlP5/ControlP5.java index 064598a..dd8acdf 100755 --- a/src/controlP5/ControlP5.java +++ b/src/controlP5/ControlP5.java @@ -33,11 +33,14 @@ import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; +import java.util.Date; import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -87,12 +90,15 @@ public class ControlP5 extends ControlP5Base { */ @ControlP5.Invisible PGraphics pg; int pgx = 0 , pgy = 0 , pgw = 0 , pgh = 0; + int ox = 0; + int oy = 0; + boolean isGraphics = false; /** * @exclude */ - @ControlP5.Invisible public static final String VERSION = "2.2.2";// "##version##"; + @ControlP5.Invisible public static final String VERSION = "2.2.3";// "##version##"; /** * @exclude @@ -256,6 +262,12 @@ public ControlP5 setGraphics( PGraphics theGraphics , int theX , int theY ) { return this; } + public ControlP5 setPosition( int theX , int theY ) { + ox = theX; + oy = theY; + return this; + } + /** * By default event originating from tabs are disabled, * use setTabEventsActive(true) to receive controlEvents @@ -1359,14 +1371,44 @@ static public boolean isNumeric( String str ) { return str.matches( "(-|\\+)?\\d+(\\.\\d+)?" ); } + static public List toList( final Object ... args ) { + List l = new ArrayList( ); + Collections.addAll( l , args ); + return l; + } + static public List toList( Object o ) { return o != null ? ( o instanceof List ) ? ( List ) o : ( o instanceof String ) ? toList( o.toString( ) ) : Collections.EMPTY_LIST : Collections.EMPTY_LIST; } + static public Map toMap( final String s ) { + /* similar to mapFrom(Object ... args) but with type + * (Number,String) sensitivity */ + String[] arr = s.trim( ).split( delimiter ); + Map m = new LinkedHashMap( ); + if ( arr.length % 2 == 0 ) { + for ( int i = 0 ; i < arr.length ; i += 2 ) { + String s1 = arr[ i + 1 ]; + m.put( arr[ i ] , isNumeric( s1 ) ? s1.indexOf( "." ) == -1 ? i( s1 ) : f( s1 ) : s1 ); + } + } + return m; + } + static public Map toMap( Object o ) { return o != null ? ( o instanceof Map ) ? ( Map ) o : Collections.EMPTY_MAP : Collections.EMPTY_MAP; } + static public Map toMap( final Object ... args ) { + Map m = new LinkedHashMap( ); + if ( args.length % 2 == 0 ) { + for ( int i = 0 ; i < args.length ; i += 2 ) { + m.put( args[ i ] , args[ i + 1 ] ); + } + } + return m; + } + static public String s( String o ) { return ( o != null ) ? o : ""; } @@ -1382,6 +1424,18 @@ static public String s( String o ) { } }; + static public void sleep( long theMillis ) { + try { + Thread.sleep( theMillis ); + } catch ( Exception e ) { + + } + } + + static public String timestamp( ) { + return new SimpleDateFormat( "yyyyMMdd-HHmmss" ).format( new Date( ) ); + } + /* add Objects with Annotation */ public static Logger logger( ) { diff --git a/src/controlP5/ControlP5Constants.java b/src/controlP5/ControlP5Constants.java index fe7664f..5414d92 100755 --- a/src/controlP5/ControlP5Constants.java +++ b/src/controlP5/ControlP5Constants.java @@ -169,6 +169,8 @@ public interface ControlP5Constants { public final static CColor THEME_GREY = new CColor( 0xffeeeeee, 0xffbbbbbb , 0xffffffff , 0xff555555 , 0xff555555 ); public final static CColor THEME_A = new CColor( 0xff00FFC8 , 0xff00D7FF , 0xffffff00 , 0xff00B0FF , 0xff00B0FF ); + // other colors: #ff3838 red-salmon; #08ffb4 turquoise; #40afff light-blue; #f3eddb beige; + public static final int standard58 = 0; public static final int standard56 = 1; public static final int synt24 = 2; @@ -180,4 +182,7 @@ public interface ControlP5Constants { public final static String JSON = "JSON"; public final static String SERIALIZED = "SERIALIZED"; + static public final String delimiter = " "; + static public final String pathdelimiter = "/"; + } diff --git a/src/controlP5/ControlWindow.java b/src/controlP5/ControlWindow.java index 0d47a2f..5c329ca 100755 --- a/src/controlP5/ControlWindow.java +++ b/src/controlP5/ControlWindow.java @@ -195,7 +195,7 @@ public Tab getTab( String theTabName ) { /** * Sets the position of the tab bar which is set to 0,0 * by default. to move the tabs to y-position 100, use - * cp5.window().setPositionOfTabs(new PVector(0,100,0)); + * cp5.getWindow().setPositionOfTabs(new PVector(0,100,0)); * * @param thePVector */ @@ -413,8 +413,8 @@ public ControlWindow pre( ) { */ public void mouseEvent( int theX , int theY , boolean pressed ) { - mouseX = theX - cp5.pgx; - mouseY = theY - cp5.pgy; + mouseX = theX - cp5.pgx - cp5.ox; + mouseY = theY - cp5.pgy - cp5.oy; if ( pressed && !pmousePressed ) { updateEvents( ); @@ -451,8 +451,8 @@ public void mouseEvent( int theX , int theY , boolean pressed ) { */ public void mouseEvent( MouseEvent theMouseEvent ) { if ( isMouse ) { - mouseX = theMouseEvent.getX( ) - cp5.pgx; - mouseY = theMouseEvent.getY( ) - cp5.pgy; + mouseX = theMouseEvent.getX( ) - cp5.pgx - cp5.ox; + mouseY = theMouseEvent.getY( ) - cp5.pgy - cp5.oy; if ( theMouseEvent.getAction( ) == MouseEvent.PRESS ) { mousePressedEvent( ); } @@ -526,7 +526,8 @@ public void draw( ) { } public void draw( PGraphics pg ) { - + pg.pushMatrix( ); + pg.translate( cp5.ox , cp5.oy ); if ( cp5.blockDraw == false ) { if ( cp5.isAndroid ) { mouseEvent( cp5.papplet.mouseX , cp5.papplet.mouseY , cp5.papplet.mousePressed ); @@ -625,7 +626,7 @@ public void draw( PGraphics pg ) { } } } - + pg.popMatrix( ); } /** diff --git a/src/controlP5/ControllerPlug.java b/src/controlP5/ControllerPlug.java index 9b063bd..2bd66be 100755 --- a/src/controlP5/ControllerPlug.java +++ b/src/controlP5/ControllerPlug.java @@ -38,23 +38,14 @@ public class ControllerPlug { private Object _myObject; - private String _myName; - private Method _myMethod; - private Field _myField; - private int _myType = ControlP5Constants.INVALID; - private Class< ? > _myParameterClass; - private int _myParameterType = -1; - private Object _myValue = null; - private Class< ? >[] _myAcceptClassList; - private Class< ? > _myEventMethodParameter = ControlEvent.class; public ControllerPlug( final Object theObject , final String theName , final int theType , final int theParameterType , Class< ? >[] theAcceptClassList ) { diff --git a/src/controlP5/DropdownList.java b/src/controlP5/DropdownList.java index 726920f..4276467 100755 --- a/src/controlP5/DropdownList.java +++ b/src/controlP5/DropdownList.java @@ -67,6 +67,7 @@ protected DropdownList( ControlP5 theControlP5 , ControllerGroup< ? > theGroup , super( theControlP5 , theGroup , theName , theX , theY , theW , theH ); items = new ArrayList< Map< String , Object > >( ); updateHeight( ); + getValueLabel( ).align( PApplet.LEFT , PApplet.CENTER ); } public boolean isOpen( ) { @@ -389,7 +390,7 @@ public void display( PGraphics g , DropdownList c ) { } g.popMatrix( ); - c.getCaptionLabel( ).align( PApplet.LEFT , PApplet.CENTER ).draw( g , 4 , c.barHeight / 2 ); + c.getCaptionLabel( ).draw( g , 4 , c.barHeight / 2 ); } if ( c.isOpen( ) ) { @@ -411,7 +412,7 @@ public void display( PGraphics g , DropdownList c ) { CColor color = ( CColor ) item.get( "color" ); g.fill( ( b( item.get( "state" ) ) ) ? color.getActive( ) : ( i == c.itemHover ) ? ( c.isMousePressed ? color.getActive( ) : color.getForeground( ) ) : color.getBackground( ) ); g.rect( 0 , 0 , c.getWidth( ) , c.itemHeight - 1 ); - c.getValueLabel( ).align( PApplet.LEFT , PApplet.CENTER ).set( item.get( "text" ).toString( ) ).draw( g , 4 , c.itemHeight / 2 ); + c.getValueLabel( ).set( item.get( "text" ).toString( ) ).draw( g , 4 , c.itemHeight / 2 ); g.translate( 0 , c.itemHeight ); } g.popMatrix( ); diff --git a/src/controlP5/ScrollableList.java b/src/controlP5/ScrollableList.java index e2ced6c..9bb9576 100644 --- a/src/controlP5/ScrollableList.java +++ b/src/controlP5/ScrollableList.java @@ -75,6 +75,7 @@ protected ScrollableList( ControlP5 theControlP5 , ControllerGroup< ? > theGroup super( theControlP5 , theGroup , theName , theX , theY , theW , theH ); items = new ArrayList< Map< String , Object > >( ); updateHeight( ); + getValueLabel( ).align( PApplet.LEFT , PApplet.CENTER ); } public boolean isOpen( ) { @@ -397,7 +398,8 @@ public void display( PGraphics g , ScrollableList c ) { } g.popMatrix( ); - c.getCaptionLabel( ).align( PApplet.LEFT , PApplet.CENTER ).draw( g , 4 , c.barHeight / 2 ); + c.getCaptionLabel( ).draw( g , 4 , c.barHeight / 2 ); + } if ( c.isOpen( ) ) { @@ -419,7 +421,7 @@ public void display( PGraphics g , ScrollableList c ) { CColor color = ( CColor ) item.get( "color" ); g.fill( ( b( item.get( "state" ) ) ) ? color.getActive( ) : ( i == c.itemHover ) ? ( c.isMousePressed ? color.getActive( ) : color.getForeground( ) ) : color.getBackground( ) ); g.rect( 0 , 0 , c.getWidth( ) , c.itemHeight - 1 ); - c.getValueLabel( ).align( PApplet.LEFT , PApplet.CENTER ).set( item.get( "text" ).toString( ) ).draw( g , 4 , c.itemHeight / 2 ); + c.getValueLabel( ).set( item.get( "text" ).toString( ) ).draw( g , 4 , c.itemHeight / 2 ); g.translate( 0 , c.itemHeight ); } g.popMatrix( ); diff --git a/src/controlP5/TODO b/src/controlP5/TODO index f3f4511..af03f11 100755 --- a/src/controlP5/TODO +++ b/src/controlP5/TODO @@ -1,3 +1,7 @@ +2014-09-08 Andreas Schlegel + * add glyphicons reference to controlp5.Icon.java http://glyphicons.com + * add useiconic to controlp5.Icon.java https://useiconic.com/open + 2014-05-29 Andreas Schlegel * distinguish between left,center, right mouse click events http://forum.processing.org/two/discussion/5422/controlp5-mousepressed-only-if-mousebutton-left- diff --git a/src/controlP5/Toggle.java b/src/controlP5/Toggle.java index e2af6d4..11bf4f4 100755 --- a/src/controlP5/Toggle.java +++ b/src/controlP5/Toggle.java @@ -167,6 +167,10 @@ public Toggle setMode( int theMode ) { return this; } + public int getMode( ) { + return _myDisplayMode; + } + /** * by default a toggle returns 0 (for off) and 1 (for on). the internal value variable can be * used to store an additional value for a toggle event.