From b473318b12e5534eefea192a471974c99c73b0ef Mon Sep 17 00:00:00 2001 From: Dave Hoover Date: Fri, 26 Sep 2008 17:29:23 +0000 Subject: [PATCH] More import cleanups to go with r662, along with a little bit of foreaching, widening, etc. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@664 ed5b42cb-e716-0410-a449-f6a68f950b19 --- .../com/threerings/cast/ActionSequence.java | 3 +- .../com/threerings/cast/CharacterManager.java | 4 +- .../bundle/tools/ComponentBundlerTask.java | 10 +- .../com/threerings/media/AbstractMedia.java | 82 +++++++---------- .../media/ActiveRepaintManager.java | 3 + .../com/threerings/media/FrameManager.java | 4 +- src/java/com/threerings/media/MediaPanel.java | 2 + .../media/animation/AnimationArranger.java | 4 +- .../media/animation/AnimationSequencer.java | 4 +- .../threerings/media/image/ColorPository.java | 3 +- .../media/image/ImageDataProvider.java | 1 + .../com/threerings/media/image/ImageUtil.java | 6 +- .../threerings/media/sprite/ImageSprite.java | 51 +++++----- .../threerings/media/sprite/PathObserver.java | 3 +- .../com/threerings/media/sprite/Sprite.java | 92 ++++++++----------- .../media/tile/SwissArmyTileSet.java | 6 +- src/java/com/threerings/media/tile/Tile.java | 3 +- .../media/tile/TrimmedObjectTileSet.java | 3 +- .../media/tile/bundle/TileSetBundle.java | 4 +- .../threerings/media/util/AStarPathUtil.java | 9 +- .../com/threerings/media/util/ModeUtil.java | 6 +- .../threerings/media/util/PathSequence.java | 4 +- .../threerings/miso/client/DirtyItemList.java | 3 +- .../miso/client/ResolutionView.java | 9 +- .../threerings/miso/client/SceneBlock.java | 5 +- .../miso/client/SceneObjectTip.java | 3 +- .../com/threerings/miso/client/TilePath.java | 3 +- .../miso/data/SimpleMisoSceneModel.java | 3 +- .../miso/data/SparseMisoSceneModel.java | 3 +- .../com/threerings/util/DirectionUtil.java | 4 +- .../com/threerings/util/KeyDispatcher.java | 6 +- .../com/threerings/cast/CharSpriteViz.java | 9 +- .../com/threerings/cast/builder/TestApp.java | 4 +- .../BundledComponentRepositoryTest.java | 11 ++- .../java/com/threerings/geom/NearestViz.java | 1 - .../com/threerings/geom/WhichSideViz.java | 1 - .../threerings/media/ImageLoadingSpeed.java | 9 +- .../com/threerings/media/TestIconManager.java | 8 +- .../bundle/BundledTileSetRepositoryTest.java | 10 +- .../bundle/tools/BuildTestTileSetBundle.java | 3 +- .../tile/tools/xml/XMLTileSetParserTest.java | 7 +- .../com/threerings/media/util/PathViz.java | 2 +- .../com/threerings/media/util/TraceViz.java | 7 +- .../miso/client/ScrollingScene.java | 6 +- .../miso/client/ScrollingTestApp.java | 19 ++-- .../com/threerings/miso/viewer/ViewerApp.java | 9 +- .../miso/viewer/ViewerSceneViewPanel.java | 13 ++- .../com/threerings/util/DirectionViz.java | 1 - 48 files changed, 235 insertions(+), 231 deletions(-) diff --git a/src/java/com/threerings/cast/ActionSequence.java b/src/java/com/threerings/cast/ActionSequence.java index fc292d2c..539e5a35 100644 --- a/src/java/com/threerings/cast/ActionSequence.java +++ b/src/java/com/threerings/cast/ActionSequence.java @@ -21,10 +21,11 @@ package com.threerings.cast; -import java.awt.Point; import java.io.Serializable; +import java.awt.Point; + /** * The action sequence class describes a particular character animation * sequence. An animation sequence consists of one or more frames of diff --git a/src/java/com/threerings/cast/CharacterManager.java b/src/java/com/threerings/cast/CharacterManager.java index cb6e5063..90339179 100644 --- a/src/java/com/threerings/cast/CharacterManager.java +++ b/src/java/com/threerings/cast/CharacterManager.java @@ -21,13 +21,13 @@ package com.threerings.cast; -import java.awt.Point; - import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Map; +import java.awt.Point; + import com.google.common.collect.Maps; import com.samskivert.util.LRUHashMap; diff --git a/src/java/com/threerings/cast/bundle/tools/ComponentBundlerTask.java b/src/java/com/threerings/cast/bundle/tools/ComponentBundlerTask.java index 0862732e..a2d23a2e 100644 --- a/src/java/com/threerings/cast/bundle/tools/ComponentBundlerTask.java +++ b/src/java/com/threerings/cast/bundle/tools/ComponentBundlerTask.java @@ -21,7 +21,13 @@ package com.threerings.cast.bundle.tools; -import java.awt.image.BufferedImage; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.jar.JarEntry; +import java.util.jar.JarOutputStream; +import java.util.zip.Deflater; + import java.util.ArrayList; import java.util.HashMap; @@ -43,6 +49,8 @@ import java.io.IOException; import java.io.ObjectOutputStream; import java.io.OutputStream; +import java.awt.image.BufferedImage; + import javax.imageio.ImageIO; import org.apache.commons.digester.Digester; diff --git a/src/java/com/threerings/media/AbstractMedia.java b/src/java/com/threerings/media/AbstractMedia.java index 38c45e12..80b27bb4 100644 --- a/src/java/com/threerings/media/AbstractMedia.java +++ b/src/java/com/threerings/media/AbstractMedia.java @@ -53,31 +53,26 @@ public abstract class AbstractMedia } /** - * Called periodically by this media's manager to give it - * a chance to do its thing. + * Called periodically by this media's manager to give it a chance to do its thing. * - * @param tickStamp a time stamp associated with this tick. - * Note: this is not obtained from a call to {@link - * System#currentTimeMillis} and cannot be compared to timestamps + * @param tickStamp a time stamp associated with this tick. Note: this is not obtained + * from a call to {@link System#currentTimeMillis} and cannot be compared to timestamps * obtained there from. */ public abstract void tick (long tickStamp); /** - * Called by the appropriate manager to request that the - * media render itself with the given graphics context. The - * media may wish to inspect the clipping region that has been set - * on the graphics context to render itself more efficiently. This - * method will only be called after it has been established that this - * media's bounds intersect the clipping region. + * Called by the appropriate manager to request that the media render itself with the given + * graphics context. The media may wish to inspect the clipping region that has been set on the + * graphics context to render itself more efficiently. This method will only be called after it + * has been established that this media's bounds intersect the clipping region. */ public abstract void paint (Graphics2D gfx); /** - * Called when the appropriate media manager has been paused for some - * length of time and is then unpaused. Media should adjust any time stamps - * that are maintained internally forward by the delta so that time - * maintains the illusion of flowing smoothly forward. + * Called when the appropriate media manager has been paused for some length of time and is + * then unpaused. Media should adjust any time stamps that are maintained internally forward by + * the delta so that time maintains the illusion of flowing smoothly forward. */ public void fastForward (long timeDelta) { @@ -176,12 +171,10 @@ public abstract class AbstractMedia } /** - * Sets the render order associated with this media. Media - * can be rendered in two layers; those with negative render order and - * those with positive render order. In the same layer, they - * will be rendered according to their render order's cardinal value - * (least to greatest). Those with the same render order value will be - * rendered in arbitrary order. + * Sets the render order associated with this media. Media can be rendered in two layers; those + * with negative render order and those with positive render order. In the same layer, they + * will be rendered according to their render order's cardinal value (least to greatest). Those + * with the same render order value will be rendered in arbitrary order. * *

This method may not be called during a tick. * @@ -207,8 +200,7 @@ public abstract class AbstractMedia } /** - * Queues the supplied notification up to be dispatched to this - * abstract media's observers. + * Queues the supplied notification up to be dispatched to this abstract media's observers. */ public void queueNotification (ObserverList.ObserverOp amop) { @@ -216,15 +208,14 @@ public abstract class AbstractMedia if (_mgr != null) { _mgr.queueNotification(_observers, amop); } else { - log.warning("Have no manager, dropping notification " + - "[media=" + this + ", op=" + amop + "]."); + log.warning("Have no manager, dropping notification", "media", this, "op", amop); } } } /** - * Called by the {@link AbstractMediaManager} when we are in a - * {@link VirtualMediaPanel} that just scrolled. + * Called by the {@link AbstractMediaManager} when we are in a {@link VirtualMediaPanel} that + * just scrolled. */ public void viewLocationDidChange (int dx, int dy) { @@ -254,24 +245,21 @@ public abstract class AbstractMedia /** * Called when the media has had its manager set. - * Derived classes may override this method, but should be sure to - * call super.init(). + * Derived classes may override this method, but should be sure to call + * super.init(). */ protected void init () { } /** - * Prior to the first call to {@link #tick} on an abstract media, this - * method is called by the {@link AbstractMediaManager}. It is called - * during the normal tick cycle, immediately prior to the first call - * to {@link #tick}. + * Prior to the first call to {@link #tick} on an abstract media, this method is called by the + * {@link AbstractMediaManager}. It is called during the normal tick cycle, immediately prior + * to the first call to {@link #tick}. * - *

Note: It is imperative that - * super.willStart() is called by any entity that - * overrides this method because the {@link AbstractMediaManager} - * depends on the setting of the {@link #_firstTick} value to know - * whether or not to call this method. + *

Note: It is imperative that super.willStart() is called by any + * entity that overrides this method because the {@link AbstractMediaManager} depends on the + * setting of the {@link #_firstTick} value to know whether or not to call this method. */ protected void willStart (long tickStamp) { @@ -279,17 +267,15 @@ public abstract class AbstractMedia } /** - * If this media's size or location are changing, it should create a new - * rectangle from its old bounds (new Rectangle(_bounds)), then effect the - * bounds changes and then call this method with the old bounds. This - * method will either merge the new bounds with the old to create a single - * dirty rectangle or dirty them separately depending on which is more - * appropriate. It will also behave properly if this media is not currently - * managed (not being rendered) by NOOPing. + * If this media's size or location are changing, it should create a new rectangle from its old + * bounds (new Rectangle(_bounds)), then effect the bounds changes and then call this method + * with the old bounds. This method will either merge the new bounds with the old to create a + * single dirty rectangle or dirty them separately depending on which is more appropriate. It + * will also behave properly if this media is not currently managed (not being rendered) by + * NOOPing. * - * Do not pass {@link #_bounds} to this method. The rectangle - * passed in will be modified and then passed on to the region manager - * which will modify it further. + * Do not pass {@link #_bounds} to this method. The rectangle passed in will be + * modified and then passed on to the region manager which will modify it further. */ protected void invalidateAfterChange (Rectangle obounds) { diff --git a/src/java/com/threerings/media/ActiveRepaintManager.java b/src/java/com/threerings/media/ActiveRepaintManager.java index b3922803..ca744428 100644 --- a/src/java/com/threerings/media/ActiveRepaintManager.java +++ b/src/java/com/threerings/media/ActiveRepaintManager.java @@ -23,6 +23,9 @@ package com.threerings.media; import java.applet.Applet; +import java.util.Iterator; +import java.util.Map; + import java.awt.Component; import java.awt.Graphics; import java.awt.Graphics2D; diff --git a/src/java/com/threerings/media/FrameManager.java b/src/java/com/threerings/media/FrameManager.java index 22ec84d2..0ec6d1da 100644 --- a/src/java/com/threerings/media/FrameManager.java +++ b/src/java/com/threerings/media/FrameManager.java @@ -627,7 +627,7 @@ public abstract class FrameManager } } - /** Used to effect periodic calls to {@link #tick}. */ + /** Used to effect periodic calls to {@link FrameManager#tick}. */ protected class Ticker extends Thread { public Ticker () @@ -701,7 +701,7 @@ public abstract class FrameManager _ticking = false; } - /** Used to invoke the call to {@link #tick} on the AWT event queue thread. */ + /** Used to invoke the call to {@link FrameManager#tick} on the AWT event queue thread. */ protected Runnable _awtTicker = new Runnable () { public void run () { long elapsed = _timer.getElapsedMillis(); diff --git a/src/java/com/threerings/media/MediaPanel.java b/src/java/com/threerings/media/MediaPanel.java index 16f23e44..80809f41 100644 --- a/src/java/com/threerings/media/MediaPanel.java +++ b/src/java/com/threerings/media/MediaPanel.java @@ -21,6 +21,8 @@ package com.threerings.media; +import java.util.ArrayList; + import java.awt.Component; import java.awt.Graphics; import java.awt.Graphics2D; diff --git a/src/java/com/threerings/media/animation/AnimationArranger.java b/src/java/com/threerings/media/animation/AnimationArranger.java index 47784dc2..d52d164e 100644 --- a/src/java/com/threerings/media/animation/AnimationArranger.java +++ b/src/java/com/threerings/media/animation/AnimationArranger.java @@ -21,10 +21,10 @@ package com.threerings.media.animation; -import java.awt.Rectangle; - import java.util.ArrayList; +import java.awt.Rectangle; + import com.samskivert.swing.util.SwingUtil; import static com.threerings.media.Log.log; diff --git a/src/java/com/threerings/media/animation/AnimationSequencer.java b/src/java/com/threerings/media/animation/AnimationSequencer.java index 134aefb9..2d44e6dd 100644 --- a/src/java/com/threerings/media/animation/AnimationSequencer.java +++ b/src/java/com/threerings/media/animation/AnimationSequencer.java @@ -21,11 +21,11 @@ package com.threerings.media.animation; +import java.util.ArrayList; + import java.awt.Graphics2D; import java.awt.Rectangle; -import java.util.ArrayList; - import com.samskivert.util.StringUtil; import static com.threerings.media.Log.log; diff --git a/src/java/com/threerings/media/image/ColorPository.java b/src/java/com/threerings/media/image/ColorPository.java index f00b83d7..739fb365 100644 --- a/src/java/com/threerings/media/image/ColorPository.java +++ b/src/java/com/threerings/media/image/ColorPository.java @@ -21,7 +21,6 @@ package com.threerings.media.image; -import java.awt.Color; import java.util.ArrayList; import java.util.Iterator; @@ -33,6 +32,8 @@ import java.io.Serializable; import java.text.ParseException; +import java.awt.Color; + import com.samskivert.util.HashIntMap; import com.samskivert.util.RandomUtil; import com.samskivert.util.StringUtil; diff --git a/src/java/com/threerings/media/image/ImageDataProvider.java b/src/java/com/threerings/media/image/ImageDataProvider.java index 4eda080f..c1a86bd0 100644 --- a/src/java/com/threerings/media/image/ImageDataProvider.java +++ b/src/java/com/threerings/media/image/ImageDataProvider.java @@ -21,6 +21,7 @@ package com.threerings.media.image; + import java.awt.image.BufferedImage; import java.io.IOException; diff --git a/src/java/com/threerings/media/image/ImageUtil.java b/src/java/com/threerings/media/image/ImageUtil.java index d7cfbefa..08bccf16 100644 --- a/src/java/com/threerings/media/image/ImageUtil.java +++ b/src/java/com/threerings/media/image/ImageUtil.java @@ -21,6 +21,9 @@ package com.threerings.media.image; +import java.util.Arrays; +import java.util.Iterator; + import java.awt.AlphaComposite; import java.awt.Color; import java.awt.Dimension; @@ -39,9 +42,6 @@ import java.awt.image.IndexColorModel; import java.awt.image.Raster; import java.awt.image.WritableRaster; -import java.util.Arrays; -import java.util.Iterator; - import com.samskivert.swing.Label; /** diff --git a/src/java/com/threerings/media/sprite/ImageSprite.java b/src/java/com/threerings/media/sprite/ImageSprite.java index 6ef36bf5..d633af08 100644 --- a/src/java/com/threerings/media/sprite/ImageSprite.java +++ b/src/java/com/threerings/media/sprite/ImageSprite.java @@ -24,6 +24,7 @@ package com.threerings.media.sprite; import java.awt.Graphics2D; import java.awt.Rectangle; +import com.threerings.media.AbstractMedia; import com.threerings.media.image.Mirage; import com.threerings.media.util.MultiFrameImage; import com.threerings.media.util.SingleFrameImageImpl; @@ -55,11 +56,10 @@ public class ImageSprite extends Sprite public static final int TIME_SEQUENTIAL = 3; /** - * Constructs an image sprite without any associated frames and with - * an invalid default initial location. The sprite should be populated - * with a set of frames used to display it via a subsequent call to - * {@link #setFrames}, and its location updated with {@link - * #setLocation}. + * Constructs an image sprite without any associated frames and with an invalid default initial + * location. The sprite should be populated with a set of frames used to display it via a + * subsequent call to {@link #setFrames}, and its location updated with + * {@link AbstractMedia#setLocation}. */ public ImageSprite () { @@ -81,8 +81,7 @@ public class ImageSprite extends Sprite } /** - * Constructs an image sprite that will display the supplied single - * image when rendering itself. + * Constructs an image sprite that will display the supplied single image when rendering itself. */ public ImageSprite (Mirage image) { @@ -94,22 +93,19 @@ public class ImageSprite extends Sprite { super.init(); - // now that we have our sprite manager, we can lay ourselves out - // and initialize our frames + // now that we have our sprite manager, we can lay ourselves out and initialize our frames layout(); } /** - * Returns true if the sprite's bounds contain the specified point, - * and if there is a non-transparent pixel in the sprite's image at - * the specified point, false if not. + * Returns true if the sprite's bounds contain the specified point, and if there is a + * non-transparent pixel in the sprite's image at the specified point, false if not. */ @Override public boolean hitTest (int x, int y) { - // first check to see that we're in the sprite's bounds and that - // we've got a frame image (if we've got no image, there's nothing - // to be hit) + // first check to see that we're in the sprite's bounds and that we've got a frame image + // (if we've got no image, there's nothing to be hit) if (!super.hitTest(x, y) || _frames == null) { return false; } @@ -136,9 +132,8 @@ public class ImageSprite extends Sprite } /** - * Sets the number of frames per second desired for the sprite - * animation. This is only used when the animation mode is - * TIME_BASED. + * Sets the number of frames per second desired for the sprite animation. This is only used + * when the animation mode is TIME_BASED. * * @param fps the desired frames per second. */ @@ -163,13 +158,11 @@ public class ImageSprite extends Sprite public void setFrames (MultiFrameImage frames) { if (frames == null) { - // Log.warning("Someone set up us the null frames! " + - // "[sprite=" + this + "]."); + // log.warning("Someone set up us the null frames!", "sprite", this); return; } - // if these are the same frames we already had, no need to do a - // bunch of pointless business + // if these are the same frames we already had, no need to do a bunch of pointless business if (frames == _frames) { return; } @@ -181,8 +174,7 @@ public class ImageSprite extends Sprite } /** - * Instructs this sprite to lay out its current frame and any - * accoutrements. + * Instructs this sprite to lay out its current frame and any accoutrements. */ public void layout () { @@ -224,10 +216,9 @@ public class ImageSprite extends Sprite } /** - * Must adjust the bounds to accomodate the our new frame. This - * includes changing the width and height to reflect the size of the - * new frame and also updating the render origin (if necessary) and - * calling {@link #updateRenderOrigin} to reflect those changes in the + * Must adjust the bounds to accommodate the our new frame. This includes changing the width + * and height to reflect the size of the new frame and also updating the render origin (if + * necessary) and calling {@link Sprite#updateRenderOrigin} to reflect those changes in the * sprite's bounds. * * @param frameIdx the index of our new frame. @@ -266,11 +257,11 @@ public class ImageSprite extends Sprite if (_frames == null) { return; } - + int fcount = _frames.getFrameCount(); boolean moved = false; - // move the sprite along toward its destination, if any + // move the sprite along toward its destination, if any moved = tickPath(timestamp); // increment the display image if performing image animation diff --git a/src/java/com/threerings/media/sprite/PathObserver.java b/src/java/com/threerings/media/sprite/PathObserver.java index 7df5009b..942b9150 100644 --- a/src/java/com/threerings/media/sprite/PathObserver.java +++ b/src/java/com/threerings/media/sprite/PathObserver.java @@ -21,6 +21,7 @@ package com.threerings.media.sprite; +import com.threerings.media.FrameManager; import com.threerings.media.util.Path; /** @@ -42,7 +43,7 @@ public interface PathObserver * @param sprite the sprite that completed its path. * @param path the path that was completed. * @param when the tick stamp of the media tick on which the path was - * completed (see {@link SpriteManager#tick}) (this may not be in the + * completed (see {@link FrameManager#tick}) (this may not be in the * same time domain as {@link System#currentTimeMillis}). */ public void pathCompleted (Sprite sprite, Path path, long when); diff --git a/src/java/com/threerings/media/sprite/Sprite.java b/src/java/com/threerings/media/sprite/Sprite.java index df69c314..81deb582 100644 --- a/src/java/com/threerings/media/sprite/Sprite.java +++ b/src/java/com/threerings/media/sprite/Sprite.java @@ -34,20 +34,18 @@ import com.threerings.media.util.Path; import com.threerings.media.util.Pathable; /** - * The sprite class represents a single moveable object in an animated - * view. A sprite has a position and orientation within the view, and can - * be moved along a path. + * The sprite class represents a single moveable object in an animated view. A sprite has a + * position and orientation within the view, and can be moved along a path. */ public abstract class Sprite extends AbstractMedia implements DirectionCodes, Pathable { /** - * Constructs a sprite with an initially invalid location. Because - * sprite derived classes generally want to get in on the business - * when a sprite's location is set, it is not safe to do so in the - * constructor because their derived methods will be called before - * their constructor has been called. Thus a sprite should be fully - * constructed and then its location should be set. + * Constructs a sprite with an initially invalid location. Because sprite derived classes + * generally want to get in on the business when a sprite's location is set, it is not safe to + * do so in the constructor because their derived methods will be called before their + * constructor has been called. Thus a sprite should be fully constructed and then its + * location should be set. */ public Sprite () { @@ -55,12 +53,11 @@ public abstract class Sprite extends AbstractMedia } /** - * Constructs a sprite with the supplied dimensions. Because - * sprite derived classes generally want to get in on the business - * when a sprite's location is set, it is not safe to do so in the - * constructor because their derived methods will be called before - * their constructor has been called. Thus a sprite should be fully - * constructed and then its location should be set. + * Constructs a sprite with the supplied dimensions. Because sprite derived classes generally + * want to get in on the business when a sprite's location is set, it is not safe to do so in + * the constructor because their derived methods will be called before their constructor has + * been called. Thus a sprite should be fully constructed and then its location should + * be set. */ public Sprite (int width, int height) { @@ -68,9 +65,8 @@ public abstract class Sprite extends AbstractMedia } /** - * Returns the sprite's x position in screen coordinates. This is the - * x coordinate of the sprite's origin, not the upper left of its - * bounds. + * Returns the sprite's x position in screen coordinates. This is the x coordinate of the + * sprite's origin, not the upper left of its bounds. */ public int getX () { @@ -78,9 +74,8 @@ public abstract class Sprite extends AbstractMedia } /** - * Returns the sprite's y position in screen coordinates. This is the - * y coordinate of the sprite's origin, not the upper left of its - * bounds. + * Returns the sprite's y position in screen coordinates. This is the y coordinate of the + * sprite's origin, not the upper left of its bounds. */ public int getY () { @@ -88,8 +83,7 @@ public abstract class Sprite extends AbstractMedia } /** - * Returns the offset to the sprite's origin from the upper-left of - * the sprite's image. + * Returns the offset to the sprite's origin from the upper-left of the sprite's image. */ public int getXOffset () { @@ -97,8 +91,7 @@ public abstract class Sprite extends AbstractMedia } /** - * Returns the offset to the sprite's origin from the upper-left of - * the sprite's image. + * Returns the offset to the sprite's origin from the upper-left of the sprite's image. */ public int getYOffset () { @@ -122,11 +115,10 @@ public abstract class Sprite extends AbstractMedia } /** - * Sprites have an orientation in one of the eight cardinal - * directions: NORTH, NORTHEAST, etc. - * Derived classes can choose to override this member function and - * select a different set of images based on their orientation, or - * they can ignore the orientation information. + * Sprites have an orientation in one of the eight cardinal directions: NORTH, + * NORTHEAST, etc. Derived classes can choose to override this member function and + * select a different set of images based on their orientation, or they can ignore the + * orientation information. * * @see DirectionCodes */ @@ -136,8 +128,8 @@ public abstract class Sprite extends AbstractMedia } /** - * Returns the sprite's orientation as one of the eight cardinal - * directions: NORTH, NORTHEAST, etc. + * Returns the sprite's orientation as one of the eight cardinal directions: + * NORTH, NORTHEAST, etc. * * @see DirectionCodes */ @@ -160,8 +152,7 @@ public abstract class Sprite extends AbstractMedia _ox = x; _oy = y; - // we need to update our draw position which is based on the size - // of our current bounds + // we need to update our draw position which is based on the size of our current bounds updateRenderOrigin(); // this method will invalidate our old and new bounds efficiently @@ -187,8 +178,7 @@ public abstract class Sprite extends AbstractMedia } /** - * Returns true if the sprite's bounds contain the specified point, - * false if not. + * Returns true if the sprite's bounds contain the specified point, false if not. */ public boolean contains (int x, int y) { @@ -196,8 +186,7 @@ public abstract class Sprite extends AbstractMedia } /** - * Returns true if the sprite's bounds contain the specified point, - * false if not. + * Returns true if the sprite's bounds contain the specified point, false if not. */ public boolean hitTest (int x, int y) { @@ -205,8 +194,7 @@ public abstract class Sprite extends AbstractMedia } /** - * Returns whether the sprite is inside the given shape in pixel - * coordinates. + * Returns whether the sprite is inside the given shape in pixel coordinates. */ public boolean inside (Shape shape) { @@ -214,8 +202,7 @@ public abstract class Sprite extends AbstractMedia } /** - * Returns whether the sprite's drawn rectangle intersects the given - * shape in pixel coordinates. + * Returns whether the sprite's drawn rectangle intersects the given shape in pixel coordinates. */ public boolean intersects (Shape shape) { @@ -223,8 +210,7 @@ public abstract class Sprite extends AbstractMedia } /** - * Returns true if this sprite is currently following a path, false if - * it is not. + * Returns true if this sprite is currently following a path, false if it is not. */ public boolean isMoving () { @@ -232,9 +218,9 @@ public abstract class Sprite extends AbstractMedia } /** - * Set the sprite's active path and start moving it along its merry - * way. If the sprite is already moving along a previous path the old - * path will be lost and the new path will begin to be traversed. + * Set the sprite's active path and start moving it along its merry way. If the sprite is + * already moving along a previous path the old path will be lost and the new path will begin + * to be traversed. * * @param path the path to follow. */ @@ -266,8 +252,7 @@ public abstract class Sprite extends AbstractMedia } /** - * Returns the path being followed by this sprite or null if the - * sprite is not following a path. + * Returns the path being followed by this sprite or null if the sprite is not following a path. */ public Path getPath () { @@ -318,9 +303,8 @@ public abstract class Sprite extends AbstractMedia _path.init(this, _pathStamp = tickStamp); } - // it's possible that as a result of init() the path completed and - // removed itself with a call to pathCompleted(), so we have to be - // careful here + // it's possible that as a result of init() the path completed and removed itself with a + // call to pathCompleted(), so we have to be careful here return (_path == null) ? true : _path.tick(this, tickStamp); } @@ -334,8 +318,8 @@ public abstract class Sprite extends AbstractMedia } /** - * Update the coordinates at which the sprite image is drawn to - * reflect the sprite's current position. + * Update the coordinates at which the sprite image is drawn to reflect the sprite's current + * position. */ protected void updateRenderOrigin () { diff --git a/src/java/com/threerings/media/tile/SwissArmyTileSet.java b/src/java/com/threerings/media/tile/SwissArmyTileSet.java index c0c1399c..c0e9dc43 100644 --- a/src/java/com/threerings/media/tile/SwissArmyTileSet.java +++ b/src/java/com/threerings/media/tile/SwissArmyTileSet.java @@ -21,13 +21,13 @@ package com.threerings.media.tile; +import java.io.IOException; +import java.io.ObjectInputStream; + import java.awt.Dimension; import java.awt.Point; import java.awt.Rectangle; -import java.io.IOException; -import java.io.ObjectInputStream; - import com.samskivert.util.StringUtil; /** diff --git a/src/java/com/threerings/media/tile/Tile.java b/src/java/com/threerings/media/tile/Tile.java index 9426b01b..a88edff7 100644 --- a/src/java/com/threerings/media/tile/Tile.java +++ b/src/java/com/threerings/media/tile/Tile.java @@ -21,10 +21,11 @@ package com.threerings.media.tile; -import java.awt.Graphics2D; import java.util.Arrays; +import java.awt.Graphics2D; + import com.threerings.media.image.Colorization; import com.threerings.media.image.Mirage; diff --git a/src/java/com/threerings/media/tile/TrimmedObjectTileSet.java b/src/java/com/threerings/media/tile/TrimmedObjectTileSet.java index 4792fdf7..fe458231 100644 --- a/src/java/com/threerings/media/tile/TrimmedObjectTileSet.java +++ b/src/java/com/threerings/media/tile/TrimmedObjectTileSet.java @@ -21,12 +21,13 @@ package com.threerings.media.tile; -import java.awt.Rectangle; import java.io.IOException; import java.io.OutputStream; import java.io.Serializable; +import java.awt.Rectangle; + import com.samskivert.util.ListUtil; import com.samskivert.util.StringUtil; diff --git a/src/java/com/threerings/media/tile/bundle/TileSetBundle.java b/src/java/com/threerings/media/tile/bundle/TileSetBundle.java index 0dc5f393..55f1f945 100644 --- a/src/java/com/threerings/media/tile/bundle/TileSetBundle.java +++ b/src/java/com/threerings/media/tile/bundle/TileSetBundle.java @@ -21,7 +21,7 @@ package com.threerings.media.tile.bundle; -import java.awt.image.BufferedImage; +import java.util.Iterator; import java.util.Iterator; @@ -30,6 +30,8 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; +import java.awt.image.BufferedImage; + import com.samskivert.util.HashIntMap; import com.threerings.resource.FastImageIO; diff --git a/src/java/com/threerings/media/util/AStarPathUtil.java b/src/java/com/threerings/media/util/AStarPathUtil.java index 1f1ea11d..23347e6e 100644 --- a/src/java/com/threerings/media/util/AStarPathUtil.java +++ b/src/java/com/threerings/media/util/AStarPathUtil.java @@ -21,6 +21,11 @@ package com.threerings.media.util; +import java.util.ArrayList; +import java.util.List; +import java.util.SortedSet; +import java.util.TreeSet; + import java.awt.Point; import java.util.ArrayList; @@ -136,7 +141,7 @@ public class AStarPathUtil * @return the list of points in the path. */ public static List getPath ( - TraversalPred tpred, Stepper stepper, Object trav, int longest, + TraversalPred tpred, Stepper stepper, Object trav, int longest, int ax, int ay, int bx, int by, boolean partial) { Info info = new Info(tpred, trav, longest, bx, by); @@ -166,7 +171,7 @@ public class AStarPathUtil if (n.x == bx && n.y == by) { // construct and return the acceptable path return getNodePath(n); - + } else if (partial) { float pathdist = MathUtil.distance(n.x, n.y, bx, by); if (pathdist < bestdist) { diff --git a/src/java/com/threerings/media/util/ModeUtil.java b/src/java/com/threerings/media/util/ModeUtil.java index 0bcf8dbd..4871ed63 100644 --- a/src/java/com/threerings/media/util/ModeUtil.java +++ b/src/java/com/threerings/media/util/ModeUtil.java @@ -21,12 +21,12 @@ package com.threerings.media.util; -import java.awt.DisplayMode; -import java.awt.GraphicsDevice; - import java.util.Comparator; import java.util.TreeSet; +import java.awt.DisplayMode; +import java.awt.GraphicsDevice; + /** * Display mode related utilities. */ diff --git a/src/java/com/threerings/media/util/PathSequence.java b/src/java/com/threerings/media/util/PathSequence.java index 57615102..3ca72976 100644 --- a/src/java/com/threerings/media/util/PathSequence.java +++ b/src/java/com/threerings/media/util/PathSequence.java @@ -21,11 +21,11 @@ package com.threerings.media.util; -import java.awt.Graphics2D; - import java.util.ArrayList; import java.util.List; +import java.awt.Graphics2D; + import static com.threerings.media.Log.log; /** diff --git a/src/java/com/threerings/miso/client/DirtyItemList.java b/src/java/com/threerings/miso/client/DirtyItemList.java index f1b70046..154e189c 100644 --- a/src/java/com/threerings/miso/client/DirtyItemList.java +++ b/src/java/com/threerings/miso/client/DirtyItemList.java @@ -21,11 +21,12 @@ package com.threerings.miso.client; -import java.awt.Graphics2D; import java.util.ArrayList; import java.util.Comparator; +import java.awt.Graphics2D; + import com.samskivert.util.SortableArrayList; import com.threerings.media.sprite.Sprite; diff --git a/src/java/com/threerings/miso/client/ResolutionView.java b/src/java/com/threerings/miso/client/ResolutionView.java index 85da1c8b..cad16551 100644 --- a/src/java/com/threerings/miso/client/ResolutionView.java +++ b/src/java/com/threerings/miso/client/ResolutionView.java @@ -21,6 +21,8 @@ package com.threerings.miso.client; +import java.util.HashMap; + import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; @@ -29,9 +31,6 @@ import java.awt.Polygon; import java.awt.Rectangle; import java.awt.geom.AffineTransform; -import java.util.HashMap; -import java.util.Iterator; - import javax.swing.JPanel; import com.samskivert.util.IntTuple; @@ -119,8 +118,8 @@ public class ResolutionView extends JPanel gfx.scale(0.25, 0.25); // draw our block glyphs - for (Iterator iter = _blocks.values().iterator(); iter.hasNext(); ) { - iter.next().paint(gfx); + for (BlockGlyph blockGlyph : _blocks.values()) { + blockGlyph.paint(gfx); } // draw the view bounds diff --git a/src/java/com/threerings/miso/client/SceneBlock.java b/src/java/com/threerings/miso/client/SceneBlock.java index 907ae2c4..866f278d 100644 --- a/src/java/com/threerings/miso/client/SceneBlock.java +++ b/src/java/com/threerings/miso/client/SceneBlock.java @@ -21,14 +21,15 @@ package com.threerings.miso.client; -import java.awt.Polygon; -import java.awt.Rectangle; import java.util.ArrayList; import java.util.Arrays; import java.util.Map; import java.util.Set; +import java.awt.Polygon; +import java.awt.Rectangle; + import com.samskivert.util.ArrayUtil; import com.samskivert.util.IntMap; import com.samskivert.util.StringUtil; diff --git a/src/java/com/threerings/miso/client/SceneObjectTip.java b/src/java/com/threerings/miso/client/SceneObjectTip.java index 78fbbfe5..aec299e8 100644 --- a/src/java/com/threerings/miso/client/SceneObjectTip.java +++ b/src/java/com/threerings/miso/client/SceneObjectTip.java @@ -21,6 +21,8 @@ package com.threerings.miso.client; +import java.util.Collection; + import java.awt.AlphaComposite; import java.awt.Color; import java.awt.Composite; @@ -28,7 +30,6 @@ import java.awt.Font; import java.awt.Graphics2D; import java.awt.Rectangle; -import java.util.Collection; import javax.swing.Icon; import javax.swing.UIManager; diff --git a/src/java/com/threerings/miso/client/TilePath.java b/src/java/com/threerings/miso/client/TilePath.java index c57a1974..9b2cc511 100644 --- a/src/java/com/threerings/miso/client/TilePath.java +++ b/src/java/com/threerings/miso/client/TilePath.java @@ -21,10 +21,11 @@ package com.threerings.miso.client; -import java.awt.Point; import java.util.List; +import java.awt.Point; + import com.threerings.util.DirectionCodes; import com.threerings.media.sprite.Sprite; diff --git a/src/java/com/threerings/miso/data/SimpleMisoSceneModel.java b/src/java/com/threerings/miso/data/SimpleMisoSceneModel.java index dc566642..0d5e853f 100644 --- a/src/java/com/threerings/miso/data/SimpleMisoSceneModel.java +++ b/src/java/com/threerings/miso/data/SimpleMisoSceneModel.java @@ -21,10 +21,11 @@ package com.threerings.miso.data; -import java.awt.Rectangle; import java.util.List; +import java.awt.Rectangle; + import com.samskivert.util.ArrayUtil; import com.samskivert.util.IntListUtil; import com.samskivert.util.ListUtil; diff --git a/src/java/com/threerings/miso/data/SparseMisoSceneModel.java b/src/java/com/threerings/miso/data/SparseMisoSceneModel.java index 24769534..b7efda63 100644 --- a/src/java/com/threerings/miso/data/SparseMisoSceneModel.java +++ b/src/java/com/threerings/miso/data/SparseMisoSceneModel.java @@ -21,11 +21,12 @@ package com.threerings.miso.data; -import java.awt.Rectangle; import java.util.ArrayList; import java.util.Iterator; +import java.awt.Rectangle; + import com.samskivert.util.ArrayUtil; import com.samskivert.util.ListUtil; import com.samskivert.util.StringUtil; diff --git a/src/java/com/threerings/util/DirectionUtil.java b/src/java/com/threerings/util/DirectionUtil.java index 6c7d1d28..19b03980 100644 --- a/src/java/com/threerings/util/DirectionUtil.java +++ b/src/java/com/threerings/util/DirectionUtil.java @@ -328,11 +328,11 @@ public class DirectionUtil implements DirectionCodes /* NNW -> */ NORTHWEST, /* NNE -> */ NORTH, /* ENE -> */ NORTHEAST, /* ESE -> */ EAST, /* SSE -> */ SOUTHEAST, /* SSW -> */ SOUTH - }; + }; /** Used to map an angle to a fine compass direction. */ protected static final int[] ANGLE_MAP = { WEST, WESTNORTHWEST, NORTHWEST, NORTHNORTHWEST, NORTH, NORTHNORTHEAST, NORTHEAST, EASTNORTHEAST, EAST, EASTSOUTHEAST, SOUTHEAST, SOUTHSOUTHEAST, SOUTH, SOUTHSOUTHWEST, SOUTHWEST, WESTSOUTHWEST }; -} +} diff --git a/src/java/com/threerings/util/KeyDispatcher.java b/src/java/com/threerings/util/KeyDispatcher.java index 00d476a3..14dc7add 100644 --- a/src/java/com/threerings/util/KeyDispatcher.java +++ b/src/java/com/threerings/util/KeyDispatcher.java @@ -21,6 +21,9 @@ package com.threerings.util; +import java.util.ArrayList; +import java.util.LinkedList; + import java.awt.Component; import java.awt.KeyEventDispatcher; import java.awt.KeyboardFocusManager; @@ -30,9 +33,6 @@ import java.awt.event.KeyListener; import java.awt.event.WindowEvent; import java.awt.event.WindowFocusListener; -import java.util.ArrayList; -import java.util.LinkedList; - import javax.swing.JComboBox; import javax.swing.JRootPane; import javax.swing.JTable; diff --git a/tests/src/java/com/threerings/cast/CharSpriteViz.java b/tests/src/java/com/threerings/cast/CharSpriteViz.java index 7d85b152..99e4bd8e 100644 --- a/tests/src/java/com/threerings/cast/CharSpriteViz.java +++ b/tests/src/java/com/threerings/cast/CharSpriteViz.java @@ -23,9 +23,8 @@ package com.threerings.cast; import java.awt.BorderLayout; import java.awt.Color; -import java.awt.Graphics2D; import java.awt.Graphics; - +import java.awt.Graphics2D; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionListener; @@ -34,11 +33,13 @@ import javax.swing.JPanel; import com.samskivert.swing.util.SwingUtil; -import com.threerings.media.image.ClientImageManager; -import com.threerings.resource.ResourceManager; import com.threerings.util.DirectionCodes; import com.threerings.util.DirectionUtil; +import com.threerings.resource.ResourceManager; + +import com.threerings.media.image.ClientImageManager; + import com.threerings.cast.bundle.BundledComponentRepository; /** diff --git a/tests/src/java/com/threerings/cast/builder/TestApp.java b/tests/src/java/com/threerings/cast/builder/TestApp.java index 4b7c7b3a..46c03e03 100644 --- a/tests/src/java/com/threerings/cast/builder/TestApp.java +++ b/tests/src/java/com/threerings/cast/builder/TestApp.java @@ -22,13 +22,15 @@ package com.threerings.cast.builder; import java.io.IOException; + import javax.swing.JFrame; import com.samskivert.swing.util.SwingUtil; -import com.threerings.media.image.ClientImageManager; import com.threerings.resource.ResourceManager; +import com.threerings.media.image.ClientImageManager; + import com.threerings.cast.CharacterManager; import com.threerings.cast.ComponentRepository; import com.threerings.cast.bundle.BundledComponentRepository; diff --git a/tests/src/java/com/threerings/cast/bundle/BundledComponentRepositoryTest.java b/tests/src/java/com/threerings/cast/bundle/BundledComponentRepositoryTest.java index 67f53909..28157e7d 100644 --- a/tests/src/java/com/threerings/cast/bundle/BundledComponentRepositoryTest.java +++ b/tests/src/java/com/threerings/cast/bundle/BundledComponentRepositoryTest.java @@ -21,16 +21,19 @@ package com.threerings.cast.bundle; -import java.awt.Component; import java.util.Iterator; -import com.threerings.cast.ComponentClass; -import com.threerings.media.image.ClientImageManager; -import com.threerings.resource.ResourceManager; +import java.awt.Component; import junit.framework.Test; import junit.framework.TestCase; +import com.threerings.resource.ResourceManager; + +import com.threerings.media.image.ClientImageManager; + +import com.threerings.cast.ComponentClass; + public class BundledComponentRepositoryTest extends TestCase { public BundledComponentRepositoryTest () diff --git a/tests/src/java/com/threerings/geom/NearestViz.java b/tests/src/java/com/threerings/geom/NearestViz.java index 28477f31..c31629d2 100644 --- a/tests/src/java/com/threerings/geom/NearestViz.java +++ b/tests/src/java/com/threerings/geom/NearestViz.java @@ -25,7 +25,6 @@ import java.awt.BorderLayout; import java.awt.Color; import java.awt.Graphics; import java.awt.Point; - import java.awt.event.MouseEvent; import java.awt.event.MouseMotionListener; diff --git a/tests/src/java/com/threerings/geom/WhichSideViz.java b/tests/src/java/com/threerings/geom/WhichSideViz.java index 2e2ffe02..ab5df376 100644 --- a/tests/src/java/com/threerings/geom/WhichSideViz.java +++ b/tests/src/java/com/threerings/geom/WhichSideViz.java @@ -25,7 +25,6 @@ import java.awt.BorderLayout; import java.awt.Color; import java.awt.Graphics; import java.awt.Point; - import java.awt.event.MouseEvent; import java.awt.event.MouseMotionListener; diff --git a/tests/src/java/com/threerings/media/ImageLoadingSpeed.java b/tests/src/java/com/threerings/media/ImageLoadingSpeed.java index 9edbdb0e..c2db06de 100644 --- a/tests/src/java/com/threerings/media/ImageLoadingSpeed.java +++ b/tests/src/java/com/threerings/media/ImageLoadingSpeed.java @@ -21,10 +21,13 @@ package com.threerings.media; -import java.awt.image.BufferedImage; -import javax.imageio.ImageIO; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; -import java.io.*; +import java.awt.image.BufferedImage; + +import javax.imageio.ImageIO; import com.threerings.resource.FastImageIO; diff --git a/tests/src/java/com/threerings/media/TestIconManager.java b/tests/src/java/com/threerings/media/TestIconManager.java index f71cbedf..0c8cd703 100644 --- a/tests/src/java/com/threerings/media/TestIconManager.java +++ b/tests/src/java/com/threerings/media/TestIconManager.java @@ -22,14 +22,18 @@ package com.threerings.media; import java.awt.BorderLayout; -import javax.swing.*; + +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JPanel; import com.samskivert.swing.HGroupLayout; import com.samskivert.swing.util.SwingUtil; +import com.threerings.resource.ResourceManager; + import com.threerings.media.image.ClientImageManager; import com.threerings.media.tile.TileManager; -import com.threerings.resource.ResourceManager; /** * Does something extraordinary. diff --git a/tests/src/java/com/threerings/media/tile/bundle/BundledTileSetRepositoryTest.java b/tests/src/java/com/threerings/media/tile/bundle/BundledTileSetRepositoryTest.java index c383400f..37228bce 100644 --- a/tests/src/java/com/threerings/media/tile/bundle/BundledTileSetRepositoryTest.java +++ b/tests/src/java/com/threerings/media/tile/bundle/BundledTileSetRepositoryTest.java @@ -21,16 +21,18 @@ package com.threerings.media.tile.bundle; -import java.awt.Component; import java.util.Iterator; -import com.threerings.media.image.ClientImageManager; -import com.threerings.media.tile.TileSet; -import com.threerings.resource.ResourceManager; +import java.awt.Component; import junit.framework.Test; import junit.framework.TestCase; +import com.threerings.resource.ResourceManager; + +import com.threerings.media.image.ClientImageManager; +import com.threerings.media.tile.TileSet; + public class BundledTileSetRepositoryTest extends TestCase { public BundledTileSetRepositoryTest () diff --git a/tests/src/java/com/threerings/media/tile/bundle/tools/BuildTestTileSetBundle.java b/tests/src/java/com/threerings/media/tile/bundle/tools/BuildTestTileSetBundle.java index 7d98a80b..65f7e58c 100644 --- a/tests/src/java/com/threerings/media/tile/bundle/tools/BuildTestTileSetBundle.java +++ b/tests/src/java/com/threerings/media/tile/bundle/tools/BuildTestTileSetBundle.java @@ -21,9 +21,10 @@ package com.threerings.media.tile.bundle.tools; +import java.util.HashMap; + import java.io.File; import java.io.IOException; -import java.util.HashMap; import com.samskivert.io.PersistenceException; import com.samskivert.test.TestUtil; diff --git a/tests/src/java/com/threerings/media/tile/tools/xml/XMLTileSetParserTest.java b/tests/src/java/com/threerings/media/tile/tools/xml/XMLTileSetParserTest.java index 8dd3c19f..aa95f8bf 100644 --- a/tests/src/java/com/threerings/media/tile/tools/xml/XMLTileSetParserTest.java +++ b/tests/src/java/com/threerings/media/tile/tools/xml/XMLTileSetParserTest.java @@ -21,15 +21,16 @@ package com.threerings.media.tile.tools.xml; -import java.io.IOException; -import java.util.Iterator; import java.util.HashMap; +import java.util.Iterator; -import com.threerings.media.tile.TileSet; +import java.io.IOException; import junit.framework.Test; import junit.framework.TestCase; +import com.threerings.media.tile.TileSet; + public class XMLTileSetParserTest extends TestCase { public XMLTileSetParserTest () diff --git a/tests/src/java/com/threerings/media/util/PathViz.java b/tests/src/java/com/threerings/media/util/PathViz.java index dac956e2..579ba9aa 100644 --- a/tests/src/java/com/threerings/media/util/PathViz.java +++ b/tests/src/java/com/threerings/media/util/PathViz.java @@ -26,12 +26,12 @@ import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.Point; import java.awt.Rectangle; + import javax.swing.JFrame; import com.threerings.media.FrameManager; import com.threerings.media.ManagedJFrame; import com.threerings.media.MediaPanel; - import com.threerings.media.sprite.Sprite; /** diff --git a/tests/src/java/com/threerings/media/util/TraceViz.java b/tests/src/java/com/threerings/media/util/TraceViz.java index 626e1498..1da226a6 100644 --- a/tests/src/java/com/threerings/media/util/TraceViz.java +++ b/tests/src/java/com/threerings/media/util/TraceViz.java @@ -21,15 +21,14 @@ package com.threerings.media.util; +import java.io.File; +import java.io.IOException; + import java.awt.Color; import java.awt.Image; import java.awt.image.BufferedImage; -import java.io.File; -import java.io.IOException; - import javax.imageio.ImageIO; - import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JLabel; diff --git a/tests/src/java/com/threerings/miso/client/ScrollingScene.java b/tests/src/java/com/threerings/miso/client/ScrollingScene.java index 8a291d98..add68d61 100644 --- a/tests/src/java/com/threerings/miso/client/ScrollingScene.java +++ b/tests/src/java/com/threerings/miso/client/ScrollingScene.java @@ -21,11 +21,11 @@ package com.threerings.miso.client; -import java.awt.Rectangle; - import java.util.Iterator; import java.util.Random; +import java.awt.Rectangle; + import com.samskivert.io.PersistenceException; import com.threerings.media.tile.NoSuchTileSetException; @@ -33,11 +33,11 @@ import com.threerings.media.tile.TileSet; import com.threerings.media.tile.TileSetRepository; import com.threerings.miso.data.MisoSceneModel; +import com.threerings.miso.data.ObjectInfo; import com.threerings.miso.tile.BaseTile; import com.threerings.miso.tile.BaseTileSet; import com.threerings.miso.util.MisoContext; import com.threerings.miso.util.ObjectSet; -import com.threerings.miso.data.ObjectInfo; /** * Provides an infinite array of tiles in which to scroll. diff --git a/tests/src/java/com/threerings/miso/client/ScrollingTestApp.java b/tests/src/java/com/threerings/miso/client/ScrollingTestApp.java index ff42083e..8e60e224 100644 --- a/tests/src/java/com/threerings/miso/client/ScrollingTestApp.java +++ b/tests/src/java/com/threerings/miso/client/ScrollingTestApp.java @@ -21,27 +21,30 @@ package com.threerings.miso.client; +import java.io.IOException; + import java.awt.DisplayMode; import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; -import java.io.IOException; +import com.samskivert.util.Config; import com.samskivert.swing.util.SwingUtil; -import com.samskivert.util.Config; import com.threerings.resource.ResourceManager; import com.threerings.media.FrameManager; import com.threerings.media.image.ClientImageManager; +import com.threerings.media.sprite.PathAdapter; +import com.threerings.media.sprite.Sprite; +import com.threerings.media.tile.bundle.BundledTileSetRepository; import com.threerings.media.util.LinePath; import com.threerings.media.util.Path; -import com.threerings.media.sprite.PathAdapter; -import com.threerings.media.sprite.Sprite; - -import com.threerings.media.tile.bundle.BundledTileSetRepository; +import com.threerings.miso.MisoConfig; +import com.threerings.miso.tile.MisoTileManager; +import com.threerings.miso.util.MisoContext; import com.threerings.cast.CharacterComponent; import com.threerings.cast.CharacterDescriptor; @@ -50,10 +53,6 @@ import com.threerings.cast.CharacterSprite; import com.threerings.cast.NoSuchComponentException; import com.threerings.cast.bundle.BundledComponentRepository; -import com.threerings.miso.MisoConfig; -import com.threerings.miso.tile.MisoTileManager; -import com.threerings.miso.util.MisoContext; - import static com.threerings.miso.Log.log; /** diff --git a/tests/src/java/com/threerings/miso/viewer/ViewerApp.java b/tests/src/java/com/threerings/miso/viewer/ViewerApp.java index 20d88875..1e251945 100644 --- a/tests/src/java/com/threerings/miso/viewer/ViewerApp.java +++ b/tests/src/java/com/threerings/miso/viewer/ViewerApp.java @@ -21,11 +21,12 @@ package com.threerings.miso.viewer; +import java.io.IOException; + import java.awt.DisplayMode; import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; -import java.io.IOException; import com.samskivert.swing.util.SwingUtil; @@ -35,14 +36,14 @@ import com.threerings.media.FrameManager; import com.threerings.media.image.ClientImageManager; import com.threerings.media.tile.bundle.BundledTileSetRepository; -import com.threerings.cast.CharacterManager; -import com.threerings.cast.bundle.BundledComponentRepository; - import com.threerings.miso.data.SimpleMisoSceneModel; import com.threerings.miso.tile.MisoTileManager; import com.threerings.miso.tools.xml.SimpleMisoSceneParser; import com.threerings.miso.util.MisoContext; +import com.threerings.cast.CharacterManager; +import com.threerings.cast.bundle.BundledComponentRepository; + import static com.threerings.miso.Log.log; /** diff --git a/tests/src/java/com/threerings/miso/viewer/ViewerSceneViewPanel.java b/tests/src/java/com/threerings/miso/viewer/ViewerSceneViewPanel.java index 79b46488..cbaea457 100644 --- a/tests/src/java/com/threerings/miso/viewer/ViewerSceneViewPanel.java +++ b/tests/src/java/com/threerings/miso/viewer/ViewerSceneViewPanel.java @@ -27,17 +27,10 @@ import java.awt.event.MouseEvent; import com.samskivert.util.RandomUtil; -import com.threerings.cast.CharacterDescriptor; -import com.threerings.cast.CharacterManager; -import com.threerings.cast.CharacterSprite; -import com.threerings.cast.ComponentRepository; -import com.threerings.cast.util.CastUtil; - import com.threerings.media.sprite.PathObserver; import com.threerings.media.sprite.Sprite; import com.threerings.media.sprite.SpriteManager; import com.threerings.media.util.LineSegmentPath; - import com.threerings.media.util.Path; import com.threerings.media.util.PerformanceMonitor; import com.threerings.media.util.PerformanceObserver; @@ -47,6 +40,12 @@ import com.threerings.miso.client.MisoScenePanel; import com.threerings.miso.data.MisoSceneModel; import com.threerings.miso.util.MisoContext; +import com.threerings.cast.CharacterDescriptor; +import com.threerings.cast.CharacterManager; +import com.threerings.cast.CharacterSprite; +import com.threerings.cast.ComponentRepository; +import com.threerings.cast.util.CastUtil; + import static com.threerings.miso.Log.log; public class ViewerSceneViewPanel extends MisoScenePanel diff --git a/tests/src/java/com/threerings/util/DirectionViz.java b/tests/src/java/com/threerings/util/DirectionViz.java index 67a7aee6..ac360c3f 100644 --- a/tests/src/java/com/threerings/util/DirectionViz.java +++ b/tests/src/java/com/threerings/util/DirectionViz.java @@ -25,7 +25,6 @@ import java.awt.BorderLayout; import java.awt.Color; import java.awt.Graphics; import java.awt.Point; - import java.awt.event.MouseEvent; import java.awt.event.MouseMotionListener;