Fixed a bunch of deprecated bits and added some type-safety.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@305 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -94,6 +94,8 @@
|
|||||||
<exclude name="com/threerings/openal/**" unless="build.openal"/>
|
<exclude name="com/threerings/openal/**" unless="build.openal"/>
|
||||||
<exclude name="com/threerings/**/tools/xml/**" unless="build.xml"/>
|
<exclude name="com/threerings/**/tools/xml/**" unless="build.xml"/>
|
||||||
<exclude name="com/threerings/miso/viewer/**" unless="build.xml"/>
|
<exclude name="com/threerings/miso/viewer/**" unless="build.xml"/>
|
||||||
|
<compilerarg value="-Xlint"/>
|
||||||
|
<compilerarg value="-Xlint:-serial"/>
|
||||||
</javac>
|
</javac>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ public class CharSpriteViz extends JPanel
|
|||||||
BorderLayout.CENTER);
|
BorderLayout.CENTER);
|
||||||
frame.setSize(200, 200);
|
frame.setSize(200, 200);
|
||||||
SwingUtil.centerWindow(frame);
|
SwingUtil.centerWindow(frame);
|
||||||
frame.show();
|
frame.setVisible(true);
|
||||||
|
|
||||||
} catch (NoSuchComponentException nsce) {
|
} catch (NoSuchComponentException nsce) {
|
||||||
System.err.println("No component with specified class " +
|
System.err.println("No component with specified class " +
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class TestApp
|
|||||||
public void run ()
|
public void run ()
|
||||||
{
|
{
|
||||||
_frame.pack();
|
_frame.pack();
|
||||||
_frame.show();
|
_frame.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main (String[] args)
|
public static void main (String[] args)
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public class NearestViz extends JPanel
|
|||||||
frame.getContentPane().add(new NearestViz(), BorderLayout.CENTER);
|
frame.getContentPane().add(new NearestViz(), BorderLayout.CENTER);
|
||||||
frame.setSize(300, 300);
|
frame.setSize(300, 300);
|
||||||
SwingUtil.centerWindow(frame);
|
SwingUtil.centerWindow(frame);
|
||||||
frame.show();
|
frame.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected float _theta = (float)(3 * Math.PI / 5);
|
protected float _theta = (float)(3 * Math.PI / 5);
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ public class WhichSideViz extends JPanel
|
|||||||
frame.getContentPane().add(new WhichSideViz(), BorderLayout.CENTER);
|
frame.getContentPane().add(new WhichSideViz(), BorderLayout.CENTER);
|
||||||
frame.setSize(300, 300);
|
frame.setSize(300, 300);
|
||||||
SwingUtil.centerWindow(frame);
|
SwingUtil.centerWindow(frame);
|
||||||
frame.show();
|
frame.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected float _theta = (float)(3 * Math.PI / 5);
|
protected float _theta = (float)(3 * Math.PI / 5);
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class TestIconManager
|
|||||||
frame.getContentPane().add(panel, BorderLayout.CENTER);
|
frame.getContentPane().add(panel, BorderLayout.CENTER);
|
||||||
frame.pack();
|
frame.pack();
|
||||||
SwingUtil.centerWindow(frame);
|
SwingUtil.centerWindow(frame);
|
||||||
frame.show();
|
frame.setVisible(true);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace(System.err);
|
e.printStackTrace(System.err);
|
||||||
|
|||||||
@@ -52,17 +52,15 @@ public class BuildTestTileSetBundle
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Dummy tileset id broker that makes up tileset ids (which are
|
/** Dummy tileset id broker that makes up tileset ids (which are consistent in the course of
|
||||||
* consistent in the course of execution of the application, but not
|
* execution of the application, but not between invocations). */
|
||||||
* between invocations). */
|
protected static class DummyTileSetIDBroker extends HashMap<String,Integer>
|
||||||
protected static class DummyTileSetIDBroker
|
|
||||||
extends HashMap
|
|
||||||
implements TileSetIDBroker
|
implements TileSetIDBroker
|
||||||
{
|
{
|
||||||
public int getTileSetID (String tileSetName)
|
public int getTileSetID (String tileSetName)
|
||||||
throws PersistenceException
|
throws PersistenceException
|
||||||
{
|
{
|
||||||
Integer id = (Integer)get(tileSetName);
|
Integer id = get(tileSetName);
|
||||||
if (id == null) {
|
if (id == null) {
|
||||||
id = new Integer(++_nextId);
|
id = new Integer(++_nextId);
|
||||||
put(tileSetName, id);
|
put(tileSetName, id);
|
||||||
@@ -83,12 +81,7 @@ public class BuildTestTileSetBundle
|
|||||||
protected int _nextId;
|
protected int _nextId;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static final String CONFIG_PATH =
|
protected static final String CONFIG_PATH = "rsrc/media/tile/bundle/tools/bundler-config.xml";
|
||||||
"rsrc/media/tile/bundle/tools/bundler-config.xml";
|
protected static final String BUNDLE_DESC_PATH = "rsrc/media/tile/bundle/tools/bundle.xml";
|
||||||
|
protected static final String TARGET_PATH = "rsrc/media/tile/bundle/tools/bundle.jar";
|
||||||
protected static final String BUNDLE_DESC_PATH =
|
|
||||||
"rsrc/media/tile/bundle/tools/bundle.xml";
|
|
||||||
|
|
||||||
protected static final String TARGET_PATH =
|
|
||||||
"rsrc/media/tile/bundle/tools/bundle.jar";
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ public class TraceViz
|
|||||||
{
|
{
|
||||||
_frame.pack();
|
_frame.pack();
|
||||||
SwingUtil.centerWindow(_frame);
|
SwingUtil.centerWindow(_frame);
|
||||||
_frame.show();
|
_frame.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main (String[] args)
|
public static void main (String[] args)
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ public class ScrollingTestApp
|
|||||||
public void run ()
|
public void run ()
|
||||||
{
|
{
|
||||||
// show the window
|
// show the window
|
||||||
_frame.show();
|
_frame.setVisible(true);
|
||||||
_framemgr.start();
|
_framemgr.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public class DirectionViz extends JPanel
|
|||||||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
frame.getContentPane().add(new DirectionViz(), BorderLayout.CENTER);
|
frame.getContentPane().add(new DirectionViz(), BorderLayout.CENTER);
|
||||||
frame.setSize(300, 300);
|
frame.setSize(300, 300);
|
||||||
frame.show();
|
frame.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Point _center;
|
protected Point _center;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class KeyTimerApp
|
|||||||
|
|
||||||
public void run ()
|
public void run ()
|
||||||
{
|
{
|
||||||
_frame.show();
|
_frame.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main (String[] args)
|
public static void main (String[] args)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class KeyboardManagerApp
|
|||||||
|
|
||||||
public void run ()
|
public void run ()
|
||||||
{
|
{
|
||||||
_frame.show();
|
_frame.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main (String[] args)
|
public static void main (String[] args)
|
||||||
|
|||||||
Reference in New Issue
Block a user