Add in @Overrides across the board, clean up the comments around them some, and remove

unneeded imports.
I've got partially completed patches for narya & vilya, too, but nenya was the 
only one that wound up in a decent state after a friday evening puttering at it,
killing time waiting on other things to finish.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@572 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Dave Hoover
2008-07-14 18:19:23 +00:00
parent 1df0737bf7
commit 5f1eed7b94
137 changed files with 394 additions and 433 deletions
@@ -24,8 +24,6 @@ package com.threerings.media.sprite;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.Shape;
import com.samskivert.swing.Label;
import com.samskivert.swing.util.SwingUtil;
@@ -247,7 +245,7 @@ public class ButtonSprite extends Sprite
return _pressed;
}
// documentation inherited
@Override
protected void init ()
{
super.init();
@@ -267,7 +265,7 @@ public class ButtonSprite extends Sprite
updateBounds();
}
// documentation inherited
@Override
public void paint (Graphics2D gfx)
{
Color baseTextColor = _label.getTextColor(),
@@ -108,7 +108,7 @@ public class FadableImageSprite extends OrientableImageSprite
_fadeInDuration = _fadeOutDuration = (long)(pathDuration * fadePortion);
}
// Documentation inherited.
@Override
public void tick (long tickStamp)
{
super.tick(tickStamp);
@@ -158,7 +158,7 @@ public class FadableImageSprite extends OrientableImageSprite
}
}
// Documentation inherited.
@Override
public void pathCompleted (long timestamp)
{
super.pathCompleted(timestamp);
@@ -183,7 +183,7 @@ public class FadableImageSprite extends OrientableImageSprite
_fadeOutDuration = -1;
}
// Documentation inherited.
@Override
public void paint (Graphics2D gfx)
{
if (_alphaComposite.getAlpha() < 1.0f) {
@@ -89,7 +89,7 @@ public class ImageSprite extends Sprite
this(new SingleFrameImageImpl(image));
}
// documentation inherited
@Override
protected void init ()
{
super.init();
@@ -104,6 +104,7 @@ public class ImageSprite extends Sprite
* 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
@@ -239,7 +240,7 @@ public class ImageSprite extends Sprite
_bounds.height = height;
}
// documentation inherited
@Override
public void paint (Graphics2D gfx)
{
if (_frames != null) {
@@ -258,7 +259,7 @@ public class ImageSprite extends Sprite
}
}
// documentation inherited
@Override
public void tick (long timestamp)
{
// if we have no frames, we're hosulated (to use a Greenwell term)
@@ -303,7 +304,7 @@ public class ImageSprite extends Sprite
setFrameIndex(nfidx, false);
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
super.toString(buf);
@@ -70,7 +70,7 @@ public class LabelSprite extends Sprite
_bounds.height = size.height;
}
// documentation inherited
@Override
protected void init ()
{
super.init();
@@ -84,7 +84,7 @@ public class LabelSprite extends Sprite
updateBounds();
}
// documentation inherited
@Override
public void paint (Graphics2D gfx)
{
_label.render(gfx, _bounds.x, _bounds.y);
@@ -27,8 +27,6 @@ import java.awt.Rectangle;
import java.awt.geom.AffineTransform;
import java.awt.geom.Area;
import java.awt.image.*;
import com.threerings.media.image.Mirage;
import com.threerings.media.util.MultiFrameImage;
@@ -149,7 +147,7 @@ public class OrientableImageSprite extends ImageSprite
);
}
// Documentation inherited.
@Override
protected void accomodateFrame (int frameIdx, int width, int height)
{
Area area = new Area(
@@ -166,7 +164,7 @@ public class OrientableImageSprite extends ImageSprite
_bounds = area.getBounds();
}
// Documentation inherited.
@Override
public void setOrientation (int orient)
{
super.setOrientation(orient);
@@ -174,7 +172,7 @@ public class OrientableImageSprite extends ImageSprite
layout();
}
// Documentation inherited.
@Override
public void paint (Graphics2D graphics)
{
AffineTransform at = graphics.getTransform();
@@ -32,8 +32,6 @@ import com.threerings.media.AbstractMedia;
import com.threerings.media.util.Path;
import com.threerings.media.util.Pathable;
import static com.threerings.media.Log.log;
/**
* The sprite class represents a single moveable object in an animated
* view. A sprite has a position and orientation within the view, and can
@@ -147,7 +145,7 @@ public abstract class Sprite extends AbstractMedia
return _orient;
}
// documentation inherited
@Override
public void setLocation (int x, int y)
{
if (x == _ox && y == _oy) {
@@ -169,7 +167,7 @@ public abstract class Sprite extends AbstractMedia
invalidateAfterChange(obounds);
}
// documentation inherited
@Override
public void paint (Graphics2D gfx)
{
gfx.drawRect(_bounds.x, _bounds.y, _bounds.width-1, _bounds.height-1);
@@ -296,7 +294,7 @@ public abstract class Sprite extends AbstractMedia
}
}
// documentation inherited
@Override
public void tick (long tickStamp)
{
tickPath(tickStamp);
@@ -325,7 +323,7 @@ public abstract class Sprite extends AbstractMedia
return (_path == null) ? true : _path.tick(this, tickStamp);
}
// documentation inherited
@Override
public void fastForward (long timeDelta)
{
// fast forward any path we're following
@@ -363,7 +361,7 @@ public abstract class Sprite extends AbstractMedia
removeObserver(obs);
}
// documentation inherited
@Override
public void viewLocationDidChange (int dx, int dy)
{
if (_renderOrder >= HUD_LAYER) {
@@ -371,14 +369,14 @@ public abstract class Sprite extends AbstractMedia
}
}
// documentation inherited
@Override
protected void shutdown ()
{
super.shutdown();
cancelMove(); // cancel any active path
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
super.toString(buf);
@@ -33,7 +33,6 @@ import com.samskivert.util.SortableArrayList;
import com.threerings.media.AbstractMedia;
import com.threerings.media.AbstractMediaManager;
import com.threerings.media.MediaHost;
/**
* The sprite manager manages the sprites running about in the game.
@@ -247,7 +246,7 @@ public class SpriteManager extends AbstractMediaManager
// }
// }
@Override // from AbstractMediaManager
@Override
protected SortableArrayList<? extends AbstractMedia> createMediaList ()
{
return (_sprites = new SortableArrayList<Sprite>());