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:
Michael Bayne
2007-10-17 21:55:59 +00:00
parent 07830b303f
commit 8e7997a061
12 changed files with 19 additions and 24 deletions
+2
View File
@@ -94,6 +94,8 @@
<exclude name="com/threerings/openal/**" unless="build.openal"/>
<exclude name="com/threerings/**/tools/xml/**" unless="build.xml"/>
<exclude name="com/threerings/miso/viewer/**" unless="build.xml"/>
<compilerarg value="-Xlint"/>
<compilerarg value="-Xlint:-serial"/>
</javac>
</target>
@@ -134,7 +134,7 @@ public class CharSpriteViz extends JPanel
BorderLayout.CENTER);
frame.setSize(200, 200);
SwingUtil.centerWindow(frame);
frame.show();
frame.setVisible(true);
} catch (NoSuchComponentException nsce) {
System.err.println("No component with specified class " +
@@ -58,7 +58,7 @@ public class TestApp
public void run ()
{
_frame.pack();
_frame.show();
_frame.setVisible(true);
}
public static void main (String[] args)
@@ -92,7 +92,7 @@ public class NearestViz extends JPanel
frame.getContentPane().add(new NearestViz(), BorderLayout.CENTER);
frame.setSize(300, 300);
SwingUtil.centerWindow(frame);
frame.show();
frame.setVisible(true);
}
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.setSize(300, 300);
SwingUtil.centerWindow(frame);
frame.show();
frame.setVisible(true);
}
protected float _theta = (float)(3 * Math.PI / 5);
@@ -56,7 +56,7 @@ public class TestIconManager
frame.getContentPane().add(panel, BorderLayout.CENTER);
frame.pack();
SwingUtil.centerWindow(frame);
frame.show();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace(System.err);
@@ -52,17 +52,15 @@ public class BuildTestTileSetBundle
}
}
/** Dummy tileset id broker that makes up tileset ids (which are
* consistent in the course of execution of the application, but not
* between invocations). */
protected static class DummyTileSetIDBroker
extends HashMap
/** Dummy tileset id broker that makes up tileset ids (which are consistent in the course of
* execution of the application, but not between invocations). */
protected static class DummyTileSetIDBroker extends HashMap<String,Integer>
implements TileSetIDBroker
{
public int getTileSetID (String tileSetName)
throws PersistenceException
{
Integer id = (Integer)get(tileSetName);
Integer id = get(tileSetName);
if (id == null) {
id = new Integer(++_nextId);
put(tileSetName, id);
@@ -83,12 +81,7 @@ public class BuildTestTileSetBundle
protected int _nextId;
}
protected static final String CONFIG_PATH =
"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 CONFIG_PATH = "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";
}
@@ -89,7 +89,7 @@ public class TraceViz
{
_frame.pack();
SwingUtil.centerWindow(_frame);
_frame.show();
_frame.setVisible(true);
}
public static void main (String[] args)
@@ -199,7 +199,7 @@ public class ScrollingTestApp
public void run ()
{
// show the window
_frame.show();
_frame.setVisible(true);
_framemgr.start();
}
@@ -78,7 +78,7 @@ public class DirectionViz extends JPanel
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new DirectionViz(), BorderLayout.CENTER);
frame.setSize(300, 300);
frame.show();
frame.setVisible(true);
}
protected Point _center;
@@ -37,7 +37,7 @@ public class KeyTimerApp
public void run ()
{
_frame.show();
_frame.setVisible(true);
}
public static void main (String[] args)
@@ -42,7 +42,7 @@ public class KeyboardManagerApp
public void run ()
{
_frame.show();
_frame.setVisible(true);
}
public static void main (String[] args)