propane 3.1.0.pre-java → 3.2.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/.mvn/wrapper/maven-wrapper.properties +1 -0
  3. data/CHANGELOG.md +1 -5
  4. data/README.md +23 -12
  5. data/Rakefile +23 -12
  6. data/lib/propane/helpers/version_error.rb +6 -0
  7. data/lib/propane/runner.rb +12 -0
  8. data/lib/propane/version.rb +1 -1
  9. data/library/slider/slider.rb +1 -1
  10. data/mvnw +234 -0
  11. data/mvnw.cmd +145 -0
  12. data/pom.xml +28 -27
  13. data/propane.gemspec +2 -2
  14. data/src/main/java/japplemenubar/JAppleMenuBar.java +41 -47
  15. data/src/main/java/monkstone/ColorUtil.java +1 -1
  16. data/src/main/java/monkstone/MathToolModule.java +12 -11
  17. data/src/main/java/monkstone/PropaneLibrary.java +9 -10
  18. data/src/main/java/monkstone/core/LibraryProxy.java +124 -113
  19. data/src/main/java/monkstone/fastmath/Deglut.java +86 -89
  20. data/src/main/java/monkstone/filechooser/Chooser.java +7 -13
  21. data/src/main/java/monkstone/noise/SimplexNoise.java +0 -1
  22. data/src/main/java/monkstone/slider/CustomHorizontalSlider.java +4 -4
  23. data/src/main/java/monkstone/slider/CustomVerticalSlider.java +1 -1
  24. data/src/main/java/monkstone/slider/SimpleHorizontalSlider.java +9 -9
  25. data/src/main/java/monkstone/slider/SimpleSlider.java +0 -9
  26. data/src/main/java/monkstone/slider/SimpleVerticalSlider.java +11 -13
  27. data/src/main/java/monkstone/slider/Slider.java +1 -1
  28. data/src/main/java/monkstone/slider/SliderBar.java +1 -1
  29. data/src/main/java/monkstone/slider/SliderGroup.java +1 -1
  30. data/src/main/java/monkstone/slider/WheelHandler.java +8 -9
  31. data/src/main/java/monkstone/vecmath/AppRender.java +2 -2
  32. data/src/main/java/monkstone/vecmath/ShapeRender.java +2 -2
  33. data/src/main/java/monkstone/vecmath/package-info.java +2 -2
  34. data/src/main/java/monkstone/vecmath/vec2/Vec2.java +2 -2
  35. data/src/main/java/monkstone/vecmath/vec3/Vec3.java +1 -1
  36. data/src/main/java/monkstone/videoevent/VideoInterface.java +11 -5
  37. data/src/main/java/monkstone/videoevent/package-info.java +2 -2
  38. data/src/main/java/processing/awt/PGraphicsJava2D.java +1742 -2243
  39. data/src/main/java/processing/awt/PShapeJava2D.java +268 -270
  40. data/src/main/java/processing/awt/PSurfaceAWT.java +821 -920
  41. data/src/main/java/processing/core/DesktopHandler.java +94 -0
  42. data/src/main/java/processing/core/PApplet.java +14170 -14082
  43. data/src/main/java/processing/core/PConstants.java +447 -473
  44. data/src/main/java/processing/core/PFont.java +867 -873
  45. data/src/main/java/processing/core/PGraphics.java +7193 -7428
  46. data/src/main/java/processing/core/PImage.java +3051 -3117
  47. data/src/main/java/processing/core/PMatrix.java +159 -172
  48. data/src/main/java/processing/core/PMatrix2D.java +403 -444
  49. data/src/main/java/processing/core/PMatrix3D.java +735 -749
  50. data/src/main/java/processing/core/PShape.java +2651 -2793
  51. data/src/main/java/processing/core/PShapeOBJ.java +415 -422
  52. data/src/main/java/processing/core/PShapeSVG.java +1466 -1475
  53. data/src/main/java/processing/core/PStyle.java +37 -40
  54. data/src/main/java/processing/core/PSurface.java +98 -103
  55. data/src/main/java/processing/core/PSurfaceNone.java +208 -236
  56. data/src/main/java/processing/core/PVector.java +961 -990
  57. data/src/main/java/processing/data/DoubleDict.java +709 -753
  58. data/src/main/java/processing/data/DoubleList.java +695 -748
  59. data/src/main/java/processing/data/FloatDict.java +702 -746
  60. data/src/main/java/processing/data/FloatList.java +697 -751
  61. data/src/main/java/processing/data/IntDict.java +673 -718
  62. data/src/main/java/processing/data/IntList.java +633 -699
  63. data/src/main/java/processing/data/JSONArray.java +873 -931
  64. data/src/main/java/processing/data/JSONObject.java +1165 -1262
  65. data/src/main/java/processing/data/JSONTokener.java +341 -351
  66. data/src/main/java/processing/data/LongDict.java +662 -707
  67. data/src/main/java/processing/data/LongList.java +634 -700
  68. data/src/main/java/processing/data/Sort.java +41 -37
  69. data/src/main/java/processing/data/StringDict.java +486 -522
  70. data/src/main/java/processing/data/StringList.java +580 -624
  71. data/src/main/java/processing/data/Table.java +3508 -3686
  72. data/src/main/java/processing/data/TableRow.java +183 -182
  73. data/src/main/java/processing/data/XML.java +883 -957
  74. data/src/main/java/processing/event/Event.java +66 -87
  75. data/src/main/java/processing/event/KeyEvent.java +41 -48
  76. data/src/main/java/processing/event/MouseEvent.java +93 -103
  77. data/src/main/java/processing/event/TouchEvent.java +6 -10
  78. data/src/main/java/processing/javafx/PGraphicsFX2D.java +5 -69
  79. data/src/main/java/processing/javafx/PSurfaceFX.java +2 -7
  80. data/src/main/java/processing/opengl/FontTexture.java +270 -290
  81. data/src/main/java/processing/opengl/FrameBuffer.java +363 -375
  82. data/src/main/java/processing/opengl/LinePath.java +500 -543
  83. data/src/main/java/processing/opengl/LineStroker.java +582 -593
  84. data/src/main/java/processing/opengl/PGL.java +2881 -2904
  85. data/src/main/java/processing/opengl/PGraphics2D.java +315 -408
  86. data/src/main/java/processing/opengl/PGraphics3D.java +72 -107
  87. data/src/main/java/processing/opengl/PGraphicsOpenGL.java +12043 -12230
  88. data/src/main/java/processing/opengl/PJOGL.java +1681 -1745
  89. data/src/main/java/processing/opengl/PShader.java +1257 -1260
  90. data/src/main/java/processing/opengl/PShapeOpenGL.java +4599 -4662
  91. data/src/main/java/processing/opengl/PSurfaceJOGL.java +1030 -1047
  92. data/src/main/java/processing/opengl/Texture.java +1397 -1462
  93. data/src/main/java/processing/opengl/VertexBuffer.java +55 -57
  94. data/src/main/resources/icon/icon-1024.png +0 -0
  95. data/src/main/resources/icon/icon-128.png +0 -0
  96. data/src/main/resources/icon/icon-16.png +0 -0
  97. data/src/main/resources/icon/icon-256.png +0 -0
  98. data/src/main/resources/icon/icon-32.png +0 -0
  99. data/src/main/resources/icon/icon-48.png +0 -0
  100. data/src/main/resources/icon/icon-512.png +0 -0
  101. data/src/main/resources/icon/icon-64.png +0 -0
  102. data/vendors/Rakefile +1 -1
  103. metadata +12 -8
  104. data/src/main/java/processing/core/ThinkDifferent.java +0 -70
@@ -1,5 +1,3 @@
1
- /* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
-
3
1
  /*
4
2
  Part of the Processing project - http://processing.org
5
3
 
@@ -18,108 +16,89 @@
18
16
  Public License along with this library; if not, write to the
19
17
  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20
18
  Boston, MA 02111-1307 USA
21
- */
22
-
19
+ */
23
20
  package processing.event;
24
21
 
25
-
26
22
  public class Event {
27
- protected Object nativeObject;
28
-
29
- protected long millis;
30
- protected int action;
31
-
32
- // These correspond to the java.awt.Event modifiers (not to be confused with
33
- // the newer getModifiersEx), though they're not guaranteed to in the future.
34
- static public final int SHIFT = 1 << 0;
35
- static public final int CTRL = 1 << 1;
36
- static public final int META = 1 << 2;
37
- static public final int ALT = 1 << 3;
38
- protected int modifiers;
39
-
40
- // Types of events. As with all constants in Processing, brevity's preferred.
41
- static public final int KEY = 1;
42
- static public final int MOUSE = 2;
43
- static public final int TOUCH = 3;
44
- protected int flavor;
45
-
46
-
47
- public Event(Object nativeObject, long millis, int action, int modifiers) {
48
- this.nativeObject = nativeObject;
49
- this.millis = millis;
50
- this.action = action;
51
- this.modifiers = modifiers;
52
- }
53
-
54
-
55
- public int getFlavor() {
56
- return flavor;
57
- }
58
-
59
-
60
- /**
61
- * Get the platform-native event object. This might be the java.awt event
62
- * on the desktop, though if you're using OpenGL on the desktop it'll be a
63
- * NEWT event that JOGL uses. Android events are something else altogether.
64
- * Bottom line, use this only if you know what you're doing, and don't make
65
- * assumptions about the class type.
66
- */
67
- public Object getNative() {
68
- return nativeObject;
69
- }
70
23
 
24
+ protected Object nativeObject;
25
+
26
+ protected long millis;
27
+ protected int action;
28
+
29
+ // These correspond to the java.awt.Event modifiers (not to be confused with
30
+ // the newer getModifiersEx), though they're not guaranteed to in the future.
31
+ static public final int SHIFT = 1 << 0;
32
+ static public final int CTRL = 1 << 1;
33
+ static public final int META = 1 << 2;
34
+ static public final int ALT = 1 << 3;
35
+ protected int modifiers;
36
+
37
+ // Types of events. As with all constants in Processing, brevity's preferred.
38
+ static public final int KEY = 1;
39
+ static public final int MOUSE = 2;
40
+ static public final int TOUCH = 3;
41
+ protected int flavor;
42
+
43
+ public Event(Object nativeObject, long millis, int action, int modifiers) {
44
+ this.nativeObject = nativeObject;
45
+ this.millis = millis;
46
+ this.action = action;
47
+ this.modifiers = modifiers;
48
+ }
49
+
50
+ public int getFlavor() {
51
+ return flavor;
52
+ }
53
+
54
+ /**
55
+ * Get the platform-native event object. This might be the java.awt event on
56
+ * the desktop, though if you're using OpenGL on the desktop it'll be a NEWT
57
+ * event that JOGL uses. Android events are something else altogether.
58
+ * Bottom line, use this only if you know what you're doing, and don't make
59
+ * assumptions about the class type.
60
+ */
61
+ public Object getNative() {
62
+ return nativeObject;
63
+ }
71
64
 
72
65
  // public void setNative(Object nativeObject) {
73
66
  // this.nativeObject = nativeObject;
74
67
  // }
75
-
76
-
77
- public long getMillis() {
78
- return millis;
79
- }
80
-
68
+ public long getMillis() {
69
+ return millis;
70
+ }
81
71
 
82
72
  // public void setMillis(long millis) {
83
73
  // this.millis = millis;
84
74
  // }
85
-
86
-
87
- public int getAction() {
88
- return action;
89
- }
90
-
75
+ public int getAction() {
76
+ return action;
77
+ }
91
78
 
92
79
  // public void setAction(int action) {
93
80
  // this.action = action;
94
81
  // }
95
-
96
-
97
- public int getModifiers() {
98
- return modifiers;
99
- }
100
-
82
+ public int getModifiers() {
83
+ return modifiers;
84
+ }
101
85
 
102
86
  // public void setModifiers(int modifiers) {
103
87
  // this.modifiers = modifiers;
104
88
  // }
105
-
106
-
107
- public boolean isShiftDown() {
108
- return (modifiers & SHIFT) != 0;
109
- }
110
-
111
-
112
- public boolean isControlDown() {
113
- return (modifiers & CTRL) != 0;
114
- }
115
-
116
-
117
- public boolean isMetaDown() {
118
- return (modifiers & META) != 0;
119
- }
120
-
121
-
122
- public boolean isAltDown() {
123
- return (modifiers & ALT) != 0;
124
- }
125
- }
89
+ public boolean isShiftDown() {
90
+ return (modifiers & SHIFT) != 0;
91
+ }
92
+
93
+ public boolean isControlDown() {
94
+ return (modifiers & CTRL) != 0;
95
+ }
96
+
97
+ public boolean isMetaDown() {
98
+ return (modifiers & META) != 0;
99
+ }
100
+
101
+ public boolean isAltDown() {
102
+ return (modifiers & ALT) != 0;
103
+ }
104
+ }
@@ -1,5 +1,3 @@
1
- /* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
-
3
1
  /*
4
2
  Part of the Processing project - http://processing.org
5
3
 
@@ -18,53 +16,48 @@
18
16
  Public License along with this library; if not, write to the
19
17
  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20
18
  Boston, MA 02111-1307 USA
21
- */
22
-
19
+ */
23
20
  package processing.event;
24
21
 
25
-
26
22
  public class KeyEvent extends Event {
27
- static public final int PRESS = 1;
28
- static public final int RELEASE = 2;
29
- static public final int TYPE = 3;
30
-
31
- char key;
32
- int keyCode;
33
-
34
- boolean isAutoRepeat;
35
-
36
-
37
- public KeyEvent(Object nativeObject,
38
- long millis, int action, int modifiers,
39
- char key, int keyCode) {
40
- super(nativeObject, millis, action, modifiers);
41
- this.flavor = KEY;
42
- this.key = key;
43
- this.keyCode = keyCode;
44
- }
45
-
46
- public KeyEvent(Object nativeObject,
47
- long millis, int action, int modifiers,
48
- char key, int keyCode, boolean isAutoRepeat) {
49
- super(nativeObject, millis, action, modifiers);
50
- this.flavor = KEY;
51
- this.key = key;
52
- this.keyCode = keyCode;
53
- this.isAutoRepeat = isAutoRepeat;
54
- }
55
-
56
-
57
- public char getKey() {
58
- return key;
59
- }
60
-
61
-
62
- public int getKeyCode() {
63
- return keyCode;
64
- }
65
-
66
23
 
67
- public boolean isAutoRepeat() {
68
- return isAutoRepeat;
69
- }
70
- }
24
+ static public final int PRESS = 1;
25
+ static public final int RELEASE = 2;
26
+ static public final int TYPE = 3;
27
+
28
+ char key;
29
+ int keyCode;
30
+
31
+ boolean isAutoRepeat;
32
+
33
+ public KeyEvent(Object nativeObject,
34
+ long millis, int action, int modifiers,
35
+ char key, int keyCode) {
36
+ super(nativeObject, millis, action, modifiers);
37
+ this.flavor = KEY;
38
+ this.key = key;
39
+ this.keyCode = keyCode;
40
+ }
41
+
42
+ public KeyEvent(Object nativeObject,
43
+ long millis, int action, int modifiers,
44
+ char key, int keyCode, boolean isAutoRepeat) {
45
+ super(nativeObject, millis, action, modifiers);
46
+ this.flavor = KEY;
47
+ this.key = key;
48
+ this.keyCode = keyCode;
49
+ this.isAutoRepeat = isAutoRepeat;
50
+ }
51
+
52
+ public char getKey() {
53
+ return key;
54
+ }
55
+
56
+ public int getKeyCode() {
57
+ return keyCode;
58
+ }
59
+
60
+ public boolean isAutoRepeat() {
61
+ return isAutoRepeat;
62
+ }
63
+ }
@@ -1,5 +1,3 @@
1
- /* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
-
3
1
  /*
4
2
  Part of the Processing project - http://processing.org
5
3
 
@@ -18,132 +16,124 @@
18
16
  Public License along with this library; if not, write to the
19
17
  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20
18
  Boston, MA 02111-1307 USA
21
- */
22
-
19
+ */
23
20
  package processing.event;
24
21
 
25
22
  //import processing.core.PConstants;
26
-
27
-
28
23
  public class MouseEvent extends Event {
29
- static public final int PRESS = 1;
30
- static public final int RELEASE = 2;
31
- static public final int CLICK = 3;
32
- static public final int DRAG = 4;
33
- static public final int MOVE = 5;
34
- static public final int ENTER = 6;
35
- static public final int EXIT = 7;
36
- static public final int WHEEL = 8;
37
-
38
- protected int x, y;
39
- protected int button;
24
+
25
+ static public final int PRESS = 1;
26
+ static public final int RELEASE = 2;
27
+ static public final int CLICK = 3;
28
+ static public final int DRAG = 4;
29
+ static public final int MOVE = 5;
30
+ static public final int ENTER = 6;
31
+ static public final int EXIT = 7;
32
+ static public final int WHEEL = 8;
33
+
34
+ protected int x, y;
35
+ protected int button;
40
36
  // protected int clickCount;
41
37
  // protected float amount;
42
- protected int count;
43
-
38
+ protected int count;
44
39
 
45
40
  // public MouseEvent(int x, int y) {
46
41
  // this(null,
47
42
  // System.currentTimeMillis(), PRESSED, 0,
48
43
  // x, y, PConstants.LEFT, 1);
49
44
  // }
45
+ public MouseEvent(Object nativeObject,
46
+ long millis, int action, int modifiers,
47
+ int x, int y, int button, int count) { //float amount) { //int clickCount) {
48
+ super(nativeObject, millis, action, modifiers);
49
+ this.flavor = MOUSE;
50
+ this.x = x;
51
+ this.y = y;
52
+ this.button = button;
53
+ //this.clickCount = clickCount;
54
+ //this.amount = amount;
55
+ this.count = count;
56
+ }
50
57
 
58
+ public int getX() {
59
+ return x;
60
+ }
51
61
 
52
- public MouseEvent(Object nativeObject,
53
- long millis, int action, int modifiers,
54
- int x, int y, int button, int count) { //float amount) { //int clickCount) {
55
- super(nativeObject, millis, action, modifiers);
56
- this.flavor = MOUSE;
57
- this.x = x;
58
- this.y = y;
59
- this.button = button;
60
- //this.clickCount = clickCount;
61
- //this.amount = amount;
62
- this.count = count;
63
- }
64
-
65
-
66
- public int getX() {
67
- return x;
68
- }
69
-
70
-
71
- public int getY() {
72
- return y;
73
- }
74
-
75
-
76
- /** Which button was pressed, either LEFT, CENTER, or RIGHT. */
77
- public int getButton() {
78
- return button;
79
- }
62
+ public int getY() {
63
+ return y;
64
+ }
80
65
 
66
+ /**
67
+ * Which button was pressed, either LEFT, CENTER, or RIGHT.
68
+ */
69
+ public int getButton() {
70
+ return button;
71
+ }
81
72
 
82
73
  // public void setButton(int button) {
83
74
  // this.button = button;
84
75
  // }
76
+ /**
77
+ * Do not use, getCount() is the correct method.
78
+ */
79
+ @Deprecated
80
+ public int getClickCount() {
81
+ //return (int) amount; //clickCount;
82
+ return count;
83
+ }
85
84
 
85
+ /**
86
+ * Do not use, getCount() is the correct method.
87
+ */
88
+ @Deprecated
89
+ public float getAmount() {
90
+ //return amount;
91
+ return count;
92
+ }
86
93
 
87
- /** Do not use, getCount() is the correct method. */
88
- @Deprecated
89
- public int getClickCount() {
90
- //return (int) amount; //clickCount;
91
- return count;
92
- }
93
-
94
-
95
- /** Do not use, getCount() is the correct method. */
96
- @Deprecated
97
- public float getAmount() {
98
- //return amount;
99
- return count;
100
- }
101
-
102
-
103
- /**
104
- * Number of clicks for mouse button events, or the number of steps (positive
105
- * or negative depending on direction) for a mouse wheel event.
106
- * Wheel events follow Java (see <a href="http://docs.oracle.com/javase/6/docs/api/java/awt/event/MouseWheelEvent.html#getWheelRotation()">here</a>), so
107
- * getAmount() will return "negative values if the mouse wheel was rotated
108
- * up or away from the user" and positive values in the other direction.
109
- * On Mac OS X, this will be reversed when "natural" scrolling is enabled
110
- * in System Preferences &rarr Mouse.
111
- */
112
- public int getCount() {
113
- return count;
114
- }
115
-
94
+ /**
95
+ * Number of clicks for mouse button events, or the number of steps
96
+ * (positive or negative depending on direction) for a mouse wheel event.
97
+ * Wheel events follow Java (see
98
+ * <a href="http://docs.oracle.com/javase/6/docs/api/java/awt/event/MouseWheelEvent.html#getWheelRotation()">here</a>),
99
+ * so getAmount() will return "negative values if the mouse wheel was
100
+ * rotated up or away from the user" and positive values in the other
101
+ * direction. On Mac OS X, this will be reversed when "natural" scrolling is
102
+ * enabled in System Preferences &rarr Mouse.
103
+ */
104
+ public int getCount() {
105
+ return count;
106
+ }
116
107
 
117
108
  // public void setClickCount(int clickCount) {
118
109
  // this.clickCount = clickCount;
119
110
  // }
120
-
121
- private String actionString() {
122
- switch (action) {
123
- default:
124
- return "UNKNOWN";
125
- case CLICK:
126
- return "CLICK";
127
- case DRAG:
128
- return "DRAG";
129
- case ENTER:
130
- return "ENTER";
131
- case EXIT:
132
- return "EXIT";
133
- case MOVE:
134
- return "MOVE";
135
- case PRESS:
136
- return "PRESS";
137
- case RELEASE:
138
- return "RELEASE";
139
- case WHEEL:
140
- return "WHEEL";
111
+ private String actionString() {
112
+ switch (action) {
113
+ default:
114
+ return "UNKNOWN";
115
+ case CLICK:
116
+ return "CLICK";
117
+ case DRAG:
118
+ return "DRAG";
119
+ case ENTER:
120
+ return "ENTER";
121
+ case EXIT:
122
+ return "EXIT";
123
+ case MOVE:
124
+ return "MOVE";
125
+ case PRESS:
126
+ return "PRESS";
127
+ case RELEASE:
128
+ return "RELEASE";
129
+ case WHEEL:
130
+ return "WHEEL";
131
+ }
141
132
  }
142
- }
143
133
 
144
- @Override
145
- public String toString() {
146
- return String.format("<MouseEvent %s@%d,%d count:%d button:%d>",
147
- actionString(), x, y, count, button);
148
- }
134
+ @Override
135
+ public String toString() {
136
+ return String.format("<MouseEvent %s@%d,%d count:%d button:%d>",
137
+ actionString(), x, y, count, button);
138
+ }
149
139
  }