| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -64,7 +64,7 @@ public class Preferences { | |||
| 64 | 64 | * Windows XP needs 66, and my Ubuntu machine needs 80+, so 80 seems proper. | |
| 65 | 65 | */ | |
| 66 | 66 | static public int BUTTON_WIDTH = | |
| 67 | - Integer.valueOf(Language.text("preferences.button.width")); | ||
| 67 | + Integer.parseInt(Language.text("preferences.button.width")); | ||
| 68 | 68 | ||
| 69 | 69 | /** height of the EditorHeader, EditorToolbar, and EditorStatus */ | |
| 70 | 70 | static final int GRID_SIZE = 32; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -43,7 +43,7 @@ public class ColorSelector implements Tool { | |||
| 43 | 43 | * Only create one instance, otherwise we'll have dozens of animation | |
| 44 | 44 | * threads going if you open/close a lot of editor windows. | |
| 45 | 45 | */ | |
| 46 | - static ColorChooser selector; | ||
| 46 | + private static volatile ColorChooser selector; | ||
| 47 | 47 | ||
| 48 | 48 | private Editor editor; | |
| 49 | 49 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -49,11 +49,6 @@ public class PresentMode { | |||
| 49 | 49 | //JMenu preferencesMenu; | |
| 50 | 50 | static JComboBox selector; | |
| 51 | 51 | ||
| 52 | - /** | ||
| 53 | - * Index of the currently selected display to be used for present mode. | ||
| 54 | - */ | ||
| 55 | - static GraphicsDevice device; | ||
| 56 | - | ||
| 57 | 52 | ||
| 58 | 53 | static { | |
| 59 | 54 | GraphicsEnvironment environment = | |
@@ -75,7 +70,6 @@ public class PresentMode { | |||
| 75 | 70 | selector.addActionListener(new ActionListener() { | |
| 76 | 71 | public void actionPerformed(ActionEvent e) { | |
| 77 | 72 | int index = selector.getSelectedIndex(); | |
| 78 | - //device = devices[index]; | ||
| 79 | 73 | Preferences.setInteger("run.present.display", index + 1); | |
| 80 | 74 | } | |
| 81 | 75 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2637,7 +2637,7 @@ public void updateListeners(Component comp) { | |||
| 2637 | 2637 | // protected int eventCount; | |
| 2638 | 2638 | ||
| 2639 | 2639 | ||
| 2640 | - class InternalEventQueue { | ||
| 2640 | + static class InternalEventQueue { | ||
| 2641 | 2641 | protected Event queue[] = new Event[10]; | |
| 2642 | 2642 | protected int offset; | |
| 2643 | 2643 | protected int count; | |
@@ -9049,7 +9049,7 @@ static public String[] split(String value, char delim) { | |||
| 9049 | 9049 | //} | |
| 9050 | 9050 | if (splitCount == 0) { | |
| 9051 | 9051 | String splits[] = new String[1]; | |
| 9052 | - splits[0] = new String(value); | ||
| 9052 | + splits[0] = value; | ||
| 9053 | 9053 | return splits; | |
| 9054 | 9054 | } | |
| 9055 | 9055 | //int pieceCount = splitCount + 1; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1814,7 +1814,7 @@ public Font(PShapeSVG parent, XML properties) { | |||
| 1814 | 1814 | namedGlyphs.put(fg.name, fg); | |
| 1815 | 1815 | } | |
| 1816 | 1816 | if (fg.unicode != 0) { | |
| 1817 | - unicodeGlyphs.put(new Character(fg.unicode), fg); | ||
| 1817 | + unicodeGlyphs.put(Character.valueOf(fg.unicode), fg); | ||
| 1818 | 1818 | } | |
| 1819 | 1819 | } | |
| 1820 | 1820 | glyphs[glyphCount++] = fg; | |
@@ -1848,7 +1848,7 @@ public void drawString(PGraphics g, String str, float x, float y, float size) { | |||
| 1848 | 1848 | char[] c = str.toCharArray(); | |
| 1849 | 1849 | for (int i = 0; i < c.length; i++) { | |
| 1850 | 1850 | // call draw on each char (pulling it w/ the unicode table) | |
| 1851 | - FontGlyph fg = unicodeGlyphs.get(new Character(c[i])); | ||
| 1851 | + FontGlyph fg = unicodeGlyphs.get(Character.valueOf(c[i])); | ||
| 1852 | 1852 | if (fg != null) { | |
| 1853 | 1853 | fg.draw(g); | |
| 1854 | 1854 | // add horizAdvX/unitsPerEm to the x coordinate along the way | |
@@ -1866,7 +1866,7 @@ public void drawChar(PGraphics g, char c, float x, float y, float size) { | |||
| 1866 | 1866 | float s = size / face.unitsPerEm; | |
| 1867 | 1867 | g.translate(x, y); | |
| 1868 | 1868 | g.scale(s, -s); | |
| 1869 | - FontGlyph fg = unicodeGlyphs.get(new Character(c)); | ||
| 1869 | + FontGlyph fg = unicodeGlyphs.get(Character.valueOf(c)); | ||
| 1870 | 1870 | if (fg != null) g.shape(fg); | |
| 1871 | 1871 | g.popMatrix(); | |
| 1872 | 1872 | } | |
@@ -1877,7 +1877,7 @@ public float textWidth(String str, float size) { | |||
| 1877 | 1877 | char[] c = str.toCharArray(); | |
| 1878 | 1878 | for (int i = 0; i < c.length; i++) { | |
| 1879 | 1879 | // call draw on each char (pulling it w/ the unicode table) | |
| 1880 | - FontGlyph fg = unicodeGlyphs.get(new Character(c[i])); | ||
| 1880 | + FontGlyph fg = unicodeGlyphs.get(Character.valueOf(c[i])); | ||
| 1881 | 1881 | if (fg != null) { | |
| 1882 | 1882 | w += (float) fg.horizAdvX / face.unitsPerEm; | |
| 1883 | 1883 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1492,7 +1492,7 @@ static protected Object stringToValue(String string) { | |||
| 1492 | 1492 | return d; | |
| 1493 | 1493 | } | |
| 1494 | 1494 | } else { | |
| 1495 | - Long myLong = new Long(string); | ||
| 1495 | + Long myLong = Long.valueOf(string); | ||
| 1496 | 1496 | if (myLong.longValue() == myLong.intValue()) { | |
| 1497 | 1497 | return Integer.valueOf(myLong.intValue()); | |
| 1498 | 1498 | } else { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3862,7 +3862,7 @@ protected void checkBounds(int row, int column) { | |||
| 3862 | 3862 | // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | |
| 3863 | 3863 | ||
| 3864 | 3864 | ||
| 3865 | - class HashMapBlows { | ||
| 3865 | + static class HashMapBlows { | ||
| 3866 | 3866 | HashMap<String,Integer> dataToIndex = new HashMap<String, Integer>(); | |
| 3867 | 3867 | ArrayList<String> indexToData = new ArrayList<String>(); | |
| 3868 | 3868 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1203,7 +1203,7 @@ protected Tessellator createTessellator(TessellatorCallback callback) { | |||
| 1203 | 1203 | } | |
| 1204 | 1204 | ||
| 1205 | 1205 | ||
| 1206 | - protected class Tessellator implements PGL.Tessellator { | ||
| 1206 | + protected static class Tessellator implements PGL.Tessellator { | ||
| 1207 | 1207 | protected GLUtessellator tess; | |
| 1208 | 1208 | protected TessellatorCallback callback; | |
| 1209 | 1209 | protected GLUCallback gluCallback; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1438,7 +1438,7 @@ protected void setPointAttribute(int vboId, int size, int type, | |||
| 1438 | 1438 | // | |
| 1439 | 1439 | // Class to store a user-specified value for a uniform parameter | |
| 1440 | 1440 | // in the shader | |
| 1441 | - protected class UniformValue { | ||
| 1441 | + protected static class UniformValue { | ||
| 1442 | 1442 | static final int INT1 = 0; | |
| 1443 | 1443 | static final int INT2 = 1; | |
| 1444 | 1444 | static final int INT3 = 2; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments