Merge pull request #2865 from federicobond/misc-fixes

Miscellaneous fixes
This commit is contained in:
Ben Fry
2014-11-14 14:48:57 -07:00
9 changed files with 12 additions and 18 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ public class Preferences {
* Windows XP needs 66, and my Ubuntu machine needs 80+, so 80 seems proper.
*/
static public int BUTTON_WIDTH =
Integer.valueOf(Language.text("preferences.button.width"));
Integer.parseInt(Language.text("preferences.button.width"));
/** height of the EditorHeader, EditorToolbar, and EditorStatus */
static final int GRID_SIZE = 32;
@@ -43,7 +43,7 @@ public class ColorSelector implements Tool {
* Only create one instance, otherwise we'll have dozens of animation
* threads going if you open/close a lot of editor windows.
*/
static ColorChooser selector;
private static volatile ColorChooser selector;
private Editor editor;
@@ -49,11 +49,6 @@ public class PresentMode {
//JMenu preferencesMenu;
static JComboBox selector;
/**
* Index of the currently selected display to be used for present mode.
*/
static GraphicsDevice device;
static {
GraphicsEnvironment environment =
@@ -75,7 +70,6 @@ public class PresentMode {
selector.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
int index = selector.getSelectedIndex();
//device = devices[index];
Preferences.setInteger("run.present.display", index + 1);
}
});
+2 -2
View File
@@ -2637,7 +2637,7 @@ public class PApplet extends Applet
// protected int eventCount;
class InternalEventQueue {
static class InternalEventQueue {
protected Event queue[] = new Event[10];
protected int offset;
protected int count;
@@ -9049,7 +9049,7 @@ public class PApplet extends Applet
//}
if (splitCount == 0) {
String splits[] = new String[1];
splits[0] = new String(value);
splits[0] = value;
return splits;
}
//int pieceCount = splitCount + 1;
+4 -4
View File
@@ -1814,7 +1814,7 @@ public class PShapeSVG extends PShape {
namedGlyphs.put(fg.name, fg);
}
if (fg.unicode != 0) {
unicodeGlyphs.put(new Character(fg.unicode), fg);
unicodeGlyphs.put(Character.valueOf(fg.unicode), fg);
}
}
glyphs[glyphCount++] = fg;
@@ -1848,7 +1848,7 @@ public class PShapeSVG extends PShape {
char[] c = str.toCharArray();
for (int i = 0; i < c.length; i++) {
// call draw on each char (pulling it w/ the unicode table)
FontGlyph fg = unicodeGlyphs.get(new Character(c[i]));
FontGlyph fg = unicodeGlyphs.get(Character.valueOf(c[i]));
if (fg != null) {
fg.draw(g);
// add horizAdvX/unitsPerEm to the x coordinate along the way
@@ -1866,7 +1866,7 @@ public class PShapeSVG extends PShape {
float s = size / face.unitsPerEm;
g.translate(x, y);
g.scale(s, -s);
FontGlyph fg = unicodeGlyphs.get(new Character(c));
FontGlyph fg = unicodeGlyphs.get(Character.valueOf(c));
if (fg != null) g.shape(fg);
g.popMatrix();
}
@@ -1877,7 +1877,7 @@ public class PShapeSVG extends PShape {
char[] c = str.toCharArray();
for (int i = 0; i < c.length; i++) {
// call draw on each char (pulling it w/ the unicode table)
FontGlyph fg = unicodeGlyphs.get(new Character(c[i]));
FontGlyph fg = unicodeGlyphs.get(Character.valueOf(c[i]));
if (fg != null) {
w += (float) fg.horizAdvX / face.unitsPerEm;
}
+1 -1
View File
@@ -1492,7 +1492,7 @@ public class JSONObject {
return d;
}
} else {
Long myLong = new Long(string);
Long myLong = Long.valueOf(string);
if (myLong.longValue() == myLong.intValue()) {
return Integer.valueOf(myLong.intValue());
} else {
+1 -1
View File
@@ -3862,7 +3862,7 @@ public class Table {
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
class HashMapBlows {
static class HashMapBlows {
HashMap<String,Integer> dataToIndex = new HashMap<String, Integer>();
ArrayList<String> indexToData = new ArrayList<String>();
+1 -1
View File
@@ -1203,7 +1203,7 @@ public class PJOGL extends PGL {
}
protected class Tessellator implements PGL.Tessellator {
protected static class Tessellator implements PGL.Tessellator {
protected GLUtessellator tess;
protected TessellatorCallback callback;
protected GLUCallback gluCallback;
+1 -1
View File
@@ -1438,7 +1438,7 @@ public class PShader implements PConstants {
//
// Class to store a user-specified value for a uniform parameter
// in the shader
protected class UniformValue {
protected static class UniformValue {
static final int INT1 = 0;
static final int INT2 = 1;
static final int INT3 = 2;