From 8b0488b3c967abd60441efad18395595410e4096 Mon Sep 17 00:00:00 2001 From: Dave Hoover Date: Fri, 12 Sep 2008 18:04:39 +0000 Subject: [PATCH] Javadoc warnings cleanups. Note: this involves generated code from a samskivert patch I only just sent to mdb, but he's in a meeting, so that won't show up for a little. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@741 c613c5cb-e716-0410-b11b-feb51c14d237 --- .../threerings/micasa/lobby/LobbyService.java | 29 ++++----- .../com/threerings/parlor/card/data/Hand.java | 18 +++--- .../parlor/client/ParlorService.java | 4 +- .../game/client/SwingGameConfigurator.java | 2 +- .../parlor/game/data/GameConfig.java | 12 ++-- .../parlor/game/server/GameManager.java | 5 +- .../server/persist/PercentileRecord.java | 3 +- .../rating/server/persist/RatingRecord.java | 2 +- .../turn/client/TurnGameController.java | 5 +- .../turn/server/TurnGameManagerDelegate.java | 12 ++-- .../puzzle/client/PuzzleBoardView.java | 5 +- .../puzzle/client/PuzzleController.java | 13 ++-- .../puzzle/drop/client/DropBoardView.java | 3 +- .../drop/client/DropControllerDelegate.java | 34 ++++------- .../drop/client/PieceGroupAnimation.java | 7 ++- .../drop/server/DropManagerDelegate.java | 15 +++-- .../stage/server/StageSceneManager.java | 59 +++++++++---------- .../stage/tools/editor/EditorScenePanel.java | 40 +++++-------- .../stats/server/persist/StatRecord.java | 2 +- .../server/persist/StringCodeRecord.java | 2 +- .../whirled/client/SceneService.java | 2 +- .../whirled/zone/client/ZoneService.java | 12 ++-- 22 files changed, 124 insertions(+), 162 deletions(-) diff --git a/src/java/com/threerings/micasa/lobby/LobbyService.java b/src/java/com/threerings/micasa/lobby/LobbyService.java index fb74c628..56b52a38 100644 --- a/src/java/com/threerings/micasa/lobby/LobbyService.java +++ b/src/java/com/threerings/micasa/lobby/LobbyService.java @@ -33,51 +33,42 @@ import com.threerings.presents.client.InvocationService; public interface LobbyService extends InvocationService { /** - * Used to communicate the results of a {@link #getCategories} - * request. + * Used to communicate the results of a {@link LobbyService#getCategories} request. */ public static interface CategoriesListener extends InvocationListener { /** - * Supplies the listener with the results of a {@link - * #getCategories} request. + * Supplies the listener with the results of a {@link LobbyService#getCategories} request. */ public void gotCategories (String[] categories); } /** - * Used to communicate the results of a {@link #getLobbies} - * request. + * Used to communicate the results of a {@link LobbyService#getLobbies} request. */ public static interface LobbiesListener extends InvocationListener { /** - * Supplies the listener with the results of a {@link - * #getLobbies} request. + * Supplies the listener with the results of a {@link LobbyService#getLobbies} request. */ public void gotLobbies (List lobbies); } /** - * Requests the list of lobby cateogories that are available on this + * Requests the list of lobby categories that are available on this * server. * * @param client a connected, operational client instance. - * @param listener the listener that will receive and process the - * response. + * @param listener the listener that will receive and process the response. */ public void getCategories (Client client, CategoriesListener listener); /** - * Requests information on all active lobbies that match the specified - * category. + * Requests information on all active lobbies that match the specified category. * * @param client a connected, operational client instance. - * @param category the category of game for which a list of lobbies is - * desired. - * @param listener the listener that will receive and process the - * response. + * @param category the category of game for which a list of lobbies is desired. + * @param listener the listener that will receive and process the response. */ - public void getLobbies (Client client, String category, - LobbiesListener listener); + public void getLobbies (Client client, String category, LobbiesListener listener); } diff --git a/src/java/com/threerings/parlor/card/data/Hand.java b/src/java/com/threerings/parlor/card/data/Hand.java index 5d7079ab..d0528e54 100644 --- a/src/java/com/threerings/parlor/card/data/Hand.java +++ b/src/java/com/threerings/parlor/card/data/Hand.java @@ -21,6 +21,8 @@ package com.threerings.parlor.card.data; +import java.util.ArrayList; + import com.threerings.util.ActionScript; import com.threerings.util.StreamableArrayList; @@ -35,22 +37,22 @@ public class Hand extends StreamableArrayList @ActionScript(name="addAllCards") public void addAll (Card[] cards) { - for (int i = 0; i < cards.length; i++) { - add(cards[i]); + for (Card card : cards) { + add(card); } } - + /** * Removes all of the specified cards from this hand. */ @ActionScript(name="removeAllCards") public void removeAll (Card[] cards) { - for (int i = 0; i < cards.length; i++) { - remove(cards[i]); + for (Card card : cards) { + remove(card); } } - + /** * Checks whether this hand contains all of the specified cards. */ @@ -64,7 +66,7 @@ public class Hand extends StreamableArrayList } return true; } - + /** * Counts the members of a particular suit within this hand. * @@ -84,7 +86,7 @@ public class Hand extends StreamableArrayList /** * Converts this list of cards into an array. This only necessary if you - * need the cards in array form, use {@link #get} if you simply need to get + * need the cards in array form, use {@link ArrayList#get} if you simply need to get * a card from the hand. */ public Card[] getCards () diff --git a/src/java/com/threerings/parlor/client/ParlorService.java b/src/java/com/threerings/parlor/client/ParlorService.java index e29ebcec..55680340 100644 --- a/src/java/com/threerings/parlor/client/ParlorService.java +++ b/src/java/com/threerings/parlor/client/ParlorService.java @@ -37,12 +37,12 @@ import com.threerings.parlor.game.data.GameConfig; public interface ParlorService extends InvocationService { /** - * Used to communicate responses to {@link #invite} requests. + * Used to communicate responses to {@link ParlorService#invite} requests. */ public static interface InviteListener extends InvocationListener { /** - * Called in response to a successful {@link #invite} request. + * Called in response to a successful {@link ParlorService#invite} request. */ public void inviteReceived (int inviteId); } diff --git a/src/java/com/threerings/parlor/game/client/SwingGameConfigurator.java b/src/java/com/threerings/parlor/game/client/SwingGameConfigurator.java index 041d428c..5702010b 100644 --- a/src/java/com/threerings/parlor/game/client/SwingGameConfigurator.java +++ b/src/java/com/threerings/parlor/game/client/SwingGameConfigurator.java @@ -38,7 +38,7 @@ import com.threerings.parlor.game.data.GameConfig; * *

Clients that use the game configurator will want to instantiate one * based on the class returned from the {@link GameConfig} and then - * initialize it with a call to {@link #init}. + * initialize it with a call to {@link GameConfigurator#init}. */ public abstract class SwingGameConfigurator extends GameConfigurator { diff --git a/src/java/com/threerings/parlor/game/data/GameConfig.java b/src/java/com/threerings/parlor/game/data/GameConfig.java index f3797e33..a6779dfb 100644 --- a/src/java/com/threerings/parlor/game/data/GameConfig.java +++ b/src/java/com/threerings/parlor/game/data/GameConfig.java @@ -38,12 +38,14 @@ import com.threerings.parlor.game.client.GameConfigurator; * *

The game config object is also the mechanism used to instantiate the appropriate game * manager and controller. Every game must have an associated game config derived class that - * overrides {@link #createController} and {@link #getManagerClassName}, returning the appropriate - * game controller and manager class for that game. Thus the entire chain of events that causes a - * particular game to be created is the construction of the appropriate game config instance which - * is provided to the server as part of an invitation or via some other matchmaking mechanism. + * overrides {@link PlaceConfig#createController} and {@link PlaceConfig#getManagerClassName}, + * returning the appropriate game controller and manager class for that game. Thus the entire chain + * of events that causes a particular game to be created is the construction of the appropriate + * game config instance which is provided to the server as part of an invitation or via some other + * matchmaking mechanism. */ -public abstract class GameConfig extends PlaceConfig implements Cloneable +public abstract class GameConfig extends PlaceConfig + implements Cloneable { /** Matchmaking type constant: a game that is started with a list of players, and those are the * only players that may play. */ diff --git a/src/java/com/threerings/parlor/game/server/GameManager.java b/src/java/com/threerings/parlor/game/server/GameManager.java index 24ef4a0a..44ed1120 100644 --- a/src/java/com/threerings/parlor/game/server/GameManager.java +++ b/src/java/com/threerings/parlor/game/server/GameManager.java @@ -67,7 +67,8 @@ public class GameManager extends PlaceManager { /** * An interface for identifying users. A larger system using the Parlor game services can - * enable user identification by passing a UserIdentifier to {@link #setUserIdentifier}. + * enable user identification by passing a UserIdentifier to + * {@link GameManager#setUserIdentifier}. */ public interface UserIdentifier { @@ -690,7 +691,7 @@ public class GameManager extends PlaceManager DObject player = _omgr.getObject(playerId); return (player instanceof BodyObject) ? (BodyObject) player : null; } - + /** * Returns true if this game requires a no-show timer. The default implementation returns true diff --git a/src/java/com/threerings/parlor/rating/server/persist/PercentileRecord.java b/src/java/com/threerings/parlor/rating/server/persist/PercentileRecord.java index 2ac126c0..702de465 100644 --- a/src/java/com/threerings/parlor/rating/server/persist/PercentileRecord.java +++ b/src/java/com/threerings/parlor/rating/server/persist/PercentileRecord.java @@ -26,7 +26,6 @@ import com.samskivert.jdbc.depot.PersistentRecord; import com.samskivert.jdbc.depot.annotation.Column; import com.samskivert.jdbc.depot.annotation.Id; import com.samskivert.jdbc.depot.expression.ColumnExp; - import com.threerings.parlor.rating.util.Percentiler; /** @@ -63,7 +62,7 @@ public class PercentileRecord extends PersistentRecord // AUTO-GENERATED: METHODS START /** - * Create and return a primary {@link Key} to identify a {@link #PercentileRecord} + * Create and return a primary {@link Key} to identify a {@link PercentileRecord} * with the supplied key values. */ public static Key getKey (int gameId) diff --git a/src/java/com/threerings/parlor/rating/server/persist/RatingRecord.java b/src/java/com/threerings/parlor/rating/server/persist/RatingRecord.java index 51c2b785..2f8955dd 100644 --- a/src/java/com/threerings/parlor/rating/server/persist/RatingRecord.java +++ b/src/java/com/threerings/parlor/rating/server/persist/RatingRecord.java @@ -125,7 +125,7 @@ public class RatingRecord extends PersistentRecord // AUTO-GENERATED: METHODS START /** - * Create and return a primary {@link Key} to identify a {@link #RatingRecord} + * Create and return a primary {@link Key} to identify a {@link RatingRecord} * with the supplied key values. */ public static Key getKey (int gameId, int playerId) diff --git a/src/java/com/threerings/parlor/turn/client/TurnGameController.java b/src/java/com/threerings/parlor/turn/client/TurnGameController.java index a65139ad..3d2f2a7b 100644 --- a/src/java/com/threerings/parlor/turn/client/TurnGameController.java +++ b/src/java/com/threerings/parlor/turn/client/TurnGameController.java @@ -21,15 +21,14 @@ package com.threerings.parlor.turn.client; +import com.threerings.crowd.client.PlaceController; import com.threerings.util.Name; -import com.threerings.parlor.game.client.GameController; - /** * Games that wish to make use of the turn game services should have their * controller implement this interface and create an instance of {@link * TurnGameControllerDelegate} which should be passed to {@link - * GameController#addDelegate}. + * PlaceController#addDelegate}. */ public interface TurnGameController { diff --git a/src/java/com/threerings/parlor/turn/server/TurnGameManagerDelegate.java b/src/java/com/threerings/parlor/turn/server/TurnGameManagerDelegate.java index fe66029a..d676f600 100644 --- a/src/java/com/threerings/parlor/turn/server/TurnGameManagerDelegate.java +++ b/src/java/com/threerings/parlor/turn/server/TurnGameManagerDelegate.java @@ -21,24 +21,22 @@ package com.threerings.parlor.turn.server; -import com.samskivert.util.RandomUtil; -import com.threerings.util.Name; +import static com.threerings.parlor.Log.log; +import com.samskivert.util.RandomUtil; import com.threerings.crowd.data.PlaceConfig; import com.threerings.crowd.data.PlaceObject; - +import com.threerings.crowd.server.PlaceManager; import com.threerings.parlor.game.server.GameManager; import com.threerings.parlor.game.server.GameManagerDelegate; - import com.threerings.parlor.turn.data.TurnGameObject; - -import static com.threerings.parlor.Log.log; +import com.threerings.util.Name; /** * Performs the server-side turn-based game processing for a turn based game. Game managers which * wish to make use of the turn services must implement {@link TurnGameManager} and either create * an instance of this class, or an instance of a derivation which customizes the behavior, either - * of which would be passed to {@link GameManager#addDelegate} to be activated. + * of which would be passed to {@link PlaceManager#addDelegate} to be activated. */ public class TurnGameManagerDelegate extends GameManagerDelegate { diff --git a/src/java/com/threerings/puzzle/client/PuzzleBoardView.java b/src/java/com/threerings/puzzle/client/PuzzleBoardView.java index 997baca7..e062f84d 100644 --- a/src/java/com/threerings/puzzle/client/PuzzleBoardView.java +++ b/src/java/com/threerings/puzzle/client/PuzzleBoardView.java @@ -267,8 +267,7 @@ public abstract class PuzzleBoardView extends VirtualMediaPanel * @param x the x-position at which the score is to be placed. * @param y the y-position at which the score is to be placed. */ - public ScoreAnimation createScoreAnimation ( - String score, Color color, Font font, int x, int y) + public ScoreAnimation createScoreAnimation (String score, Color color, Font font, int x, int y) { return createScoreAnimation( ScoreAnimation.createLabel(score, color, font, (Component)this), x, y); @@ -277,7 +276,7 @@ public abstract class PuzzleBoardView extends VirtualMediaPanel /** * Creates a score animation, allowing derived classes to use custom * animations that are customized following a call to - * {@link #createScoreAnimation}. + * {@link #createScoreAnimation(String,Color,Font,int,int)}. */ protected ScoreAnimation createScoreAnimation (Label label, int x, int y) { diff --git a/src/java/com/threerings/puzzle/client/PuzzleController.java b/src/java/com/threerings/puzzle/client/PuzzleController.java index df70e84a..61bde1bf 100644 --- a/src/java/com/threerings/puzzle/client/PuzzleController.java +++ b/src/java/com/threerings/puzzle/client/PuzzleController.java @@ -188,8 +188,7 @@ public abstract class PuzzleController extends GameController // and check if we should be suspending the action during this pause if (supportsActionPause()) { - // clear the action if we're pausing, resume it if we're - // unpausing + // clear the action if we're pausing, resume it if we're unpausing if (chatting) { clearAction(); } else { @@ -228,16 +227,14 @@ public abstract class PuzzleController extends GameController @Override public void apply (PlaceControllerDelegate delegate) { canChatNow[0] = - ((PuzzleControllerDelegate)delegate).canStartChatting() && - canChatNow[0]; + ((PuzzleControllerDelegate)delegate).canStartChatting() && canChatNow[0]; } }); return canChatNow[0]; } /** - * Returns true if the puzzle has been defocused because the player - * is doing some chatting. + * Returns true if the puzzle has been defocused because the player is doing some chatting. */ public boolean isChatting () { @@ -274,7 +271,7 @@ public abstract class PuzzleController extends GameController { super.mayLeavePlace(plobj); - // flush any pending progress events + // flush any pending progress events sendProgressUpdate(); } @@ -309,7 +306,7 @@ public abstract class PuzzleController extends GameController /** * Indicates whether the action should start immediately as a result - * of {@link #gameDidStart} being called. If a puzzle wishes to do + * of {@link GameController#gameDidStart} being called. If a puzzle wishes to do * some beginning of the game fun stuff, like display a tutorial * screen, they can veto the action start and then start it themselves * later. diff --git a/src/java/com/threerings/puzzle/drop/client/DropBoardView.java b/src/java/com/threerings/puzzle/drop/client/DropBoardView.java index c000e1c5..5c26e26a 100644 --- a/src/java/com/threerings/puzzle/drop/client/DropBoardView.java +++ b/src/java/com/threerings/puzzle/drop/client/DropBoardView.java @@ -51,8 +51,7 @@ import com.threerings.puzzle.drop.data.DropPieceCodes; import static com.threerings.puzzle.Log.log; /** - * The drop board view displays a drop puzzle game in progress for a - * single player. + * The drop board view displays a drop puzzle game in progress for a single player. */ public abstract class DropBoardView extends PuzzleBoardView implements DropPieceCodes diff --git a/src/java/com/threerings/puzzle/drop/client/DropControllerDelegate.java b/src/java/com/threerings/puzzle/drop/client/DropControllerDelegate.java index 1337f452..e67eb854 100644 --- a/src/java/com/threerings/puzzle/drop/client/DropControllerDelegate.java +++ b/src/java/com/threerings/puzzle/drop/client/DropControllerDelegate.java @@ -21,28 +21,25 @@ package com.threerings.puzzle.drop.client; +import static com.threerings.puzzle.Log.log; + import java.awt.Component; import java.awt.Point; import java.awt.Rectangle; import java.awt.event.ActionEvent; import com.samskivert.util.IntListUtil; - +import com.threerings.crowd.client.PlaceController; +import com.threerings.crowd.data.PlaceConfig; +import com.threerings.crowd.util.CrowdContext; import com.threerings.media.FrameParticipant; import com.threerings.media.animation.Animation; import com.threerings.media.animation.AnimationAdapter; - -import com.threerings.crowd.data.PlaceConfig; -import com.threerings.crowd.util.CrowdContext; - -import com.threerings.puzzle.util.PuzzleContext; - import com.threerings.puzzle.client.PuzzleController; import com.threerings.puzzle.client.PuzzleControllerDelegate; import com.threerings.puzzle.client.PuzzlePanel; import com.threerings.puzzle.data.Board; import com.threerings.puzzle.data.BoardSummary; - import com.threerings.puzzle.drop.data.DropBoard; import com.threerings.puzzle.drop.data.DropCodes; import com.threerings.puzzle.drop.data.DropConfig; @@ -50,30 +47,25 @@ import com.threerings.puzzle.drop.data.DropLogic; import com.threerings.puzzle.drop.data.DropPieceCodes; import com.threerings.puzzle.drop.util.PieceDropLogic; import com.threerings.puzzle.drop.util.PieceDropper; - -import static com.threerings.puzzle.Log.log; +import com.threerings.puzzle.util.PuzzleContext; /** * Games that wish to make use of the drop puzzle services will need to * create an extension of this delegate class, customizing it for their - * particular game and then adding it via {@link - * PuzzleController#addDelegate}. + * particular game and then adding it via {@link PlaceController#addDelegate}. * *

It handles logical actions for a puzzle game that generally * consists of a two-dimensional board containing pieces, with new pieces * either falling into the board as a "drop block", or rising into the * bottom of the board in new piece rows. * - *

Derived classes must implement {@link #getPieceVelocity} and {@link - * #evolveBoard}. + *

Derived classes must implement {@link #getPieceVelocity} and {@link #evolveBoard}. * - *

Block-dropping puzzles will likely want to override {@link - * #createNextBlock}, {@link #blockDidLand}, and {@link - * #getPieceDropLogic}. + *

Block-dropping puzzles will likely want to override {@link #createNextBlock}, + * {@link #blockDidLand}, and {@link #getPieceDropLogic}. * - *

Board-rising puzzles will likely want to override {@link - * #getRiseVelocity}, {@link #getRiseDistance}, {@link - * #getPieceDropLogic}, and {@link #boardDidRise}. + *

Board-rising puzzles will likely want to override {@link #getRiseVelocity}, + * {@link #getRiseDistance}, {@link #getPieceDropLogic}, and {@link #boardDidRise}. */ public abstract class DropControllerDelegate extends PuzzleControllerDelegate implements DropCodes, DropPieceCodes, FrameParticipant @@ -877,7 +869,7 @@ public abstract class DropControllerDelegate extends PuzzleControllerDelegate } /** - * Returns the piece dropper used to drop any pieces that need dropping in the board. + * Returns the piece dropper used to drop any pieces that need dropping in the board. */ protected PieceDropper getPieceDropper (PieceDropLogic logic) { diff --git a/src/java/com/threerings/puzzle/drop/client/PieceGroupAnimation.java b/src/java/com/threerings/puzzle/drop/client/PieceGroupAnimation.java index e8777aa4..50d04e48 100644 --- a/src/java/com/threerings/puzzle/drop/client/PieceGroupAnimation.java +++ b/src/java/com/threerings/puzzle/drop/client/PieceGroupAnimation.java @@ -24,11 +24,12 @@ package com.threerings.puzzle.drop.client; import java.awt.Graphics2D; import java.awt.Rectangle; +import com.threerings.media.AbstractMedia; +import com.threerings.media.AbstractMediaManager; import com.threerings.media.animation.Animation; import com.threerings.media.sprite.PathObserver; import com.threerings.media.sprite.Sprite; import com.threerings.media.util.Path; - import com.threerings.puzzle.drop.data.DropBoard; /** @@ -39,8 +40,8 @@ public abstract class PieceGroupAnimation extends Animation implements PathObserver { /** - * Creates a piece group animation which must be initialized with a - * subsequent call to {@link #init}. + * Creates a piece group animation which must be initialized with a subsequent call to + * {@link AbstractMedia#init(AbstractMediaManager)}. */ public PieceGroupAnimation (DropBoardView view, DropBoard board) { diff --git a/src/java/com/threerings/puzzle/drop/server/DropManagerDelegate.java b/src/java/com/threerings/puzzle/drop/server/DropManagerDelegate.java index 90b225f9..f56bb7ea 100644 --- a/src/java/com/threerings/puzzle/drop/server/DropManagerDelegate.java +++ b/src/java/com/threerings/puzzle/drop/server/DropManagerDelegate.java @@ -21,22 +21,21 @@ package com.threerings.puzzle.drop.server; +import static com.threerings.puzzle.Log.log; + import com.threerings.crowd.data.PlaceConfig; import com.threerings.crowd.data.PlaceObject; - +import com.threerings.crowd.server.PlaceManager; import com.threerings.puzzle.data.Board; import com.threerings.puzzle.data.PuzzleCodes; -import com.threerings.puzzle.server.PuzzleManager; -import com.threerings.puzzle.server.PuzzleManagerDelegate; - import com.threerings.puzzle.drop.data.DropBoard; import com.threerings.puzzle.drop.data.DropCodes; import com.threerings.puzzle.drop.data.DropConfig; import com.threerings.puzzle.drop.data.DropLogic; import com.threerings.puzzle.drop.util.PieceDropLogic; import com.threerings.puzzle.drop.util.PieceDropper; - -import static com.threerings.puzzle.Log.log; +import com.threerings.puzzle.server.PuzzleManager; +import com.threerings.puzzle.server.PuzzleManagerDelegate; /** * Provides the necessary support for a puzzle game that involves a @@ -52,7 +51,7 @@ import static com.threerings.puzzle.Log.log; *

A puzzle game using these services will then need to extend this * delegate, implementing the necessary methods to customize it for the * particulars of their game and then register it with their game manager - * via {@link PuzzleManager#addDelegate}. + * via {@link PlaceManager#addDelegate}. * *

It also keeps track of, for each player, board level information, * and player game status. Miscellaneous utility routines are provided @@ -146,7 +145,7 @@ public abstract class DropManagerDelegate extends PuzzleManagerDelegate } /** - * Returns the piece dropper used to drop any pieces that need dropping in the board. + * Returns the piece dropper used to drop any pieces that need dropping in the board. */ protected PieceDropper getPieceDropper (PieceDropLogic logic) { diff --git a/src/java/com/threerings/stage/server/StageSceneManager.java b/src/java/com/threerings/stage/server/StageSceneManager.java index ab4a096a..49487064 100644 --- a/src/java/com/threerings/stage/server/StageSceneManager.java +++ b/src/java/com/threerings/stage/server/StageSceneManager.java @@ -63,17 +63,15 @@ import com.threerings.stage.util.StageSceneUtil; import static com.threerings.stage.Log.log; /** - * Defines extensions to the basic Stage scene manager specific to - * displaying isometric "stage" scenes (these may be indoor, outdoor or - * aboard a vessel). + * Defines extensions to the basic Stage scene manager specific to displaying isometric "stage" + * scenes (these may be indoor, outdoor or aboard a vessel). */ public class StageSceneManager extends SpotSceneManager implements StageSceneProvider { /** - * Returns a traversal predicate for use with {@link - * StageSceneUtil#findStandingSpot} that validates whether a player can - * stand in the searched spots. + * Returns a traversal predicate for use with {@link StageSceneUtil#findStandingSpot} that + * validates whether a player can stand in the searched spots. */ public AStarPathUtil.TraversalPred getCanStandPred () { @@ -89,21 +87,19 @@ public class StageSceneManager extends SpotSceneManager } /** - * Adds the supplied object to this scene. A persistent update is - * generated and broadcast to all scene occupants. The update is - * stored in the repository for communication to future occupants of - * the scene and then entire complex process of changing our virtual - * game world is effected at the simple call of this single method. + * Adds the supplied object to this scene. A persistent update is generated and broadcast to + * all scene occupants. The update is stored in the repository for communication to future + * occupants of the scene and then entire complex process of changing our virtual game world is + * effected at the simple call of this single method. * - * @param killOverlap if true, overlapping object will be removed, and - * the allowOverlap argument will be ignored. - * @param allowOverlap if true, overlapping objects will be allowed - * but one must be *very* careful to ensure that they know what they - * are doing (ie. the objects have render priorities that correctly - * handle the overlap). + * @param killOverlap if true, overlapping object will be removed, and the allowOverlap + * argument will be ignored. + * @param allowOverlap if true, overlapping objects will be allowed but one must be *very* + * careful to ensure that they know what they are doing (i.e. the objects have render priorities + * that correctly handle the overlap). * - * @return true if the object was added, false if the add was rejected - * because the object overlaps an existing scene object. + * @return true if the object was added, false if the add was rejected because the object + * overlaps an existing scene object. */ public boolean addObject (ObjectInfo info, boolean killOverlap, boolean allowOverlap) @@ -192,7 +188,7 @@ public class StageSceneManager extends SpotSceneManager throws InvocationException { InvocationException.requireAccess(caller, StageCodes.MODIFY_SCENE_ACCESS, _sscene); - + // create our scene update which will be stored in the database // and used to efficiently update clients ModifyObjectsUpdate update = new ModifyObjectsUpdate(); @@ -200,10 +196,10 @@ public class StageSceneManager extends SpotSceneManager log.info("Modifying objects '" + update + "."); recordUpdate(update, true); - + listener.requestProcessed(); } - + @Override // documentation inherited protected void gotSceneData () { @@ -373,7 +369,7 @@ public class StageSceneManager extends SpotSceneManager return true; } - /** Helper function for {@link #validateLocation}. */ + /** Helper function for {@link #validateLocation(BodyObject,StageLocation,boolean)}. */ protected boolean checkContains (Iterable rects, int tx, int ty) { for (Rectangle rect : rects) { @@ -463,7 +459,7 @@ public class StageSceneManager extends SpotSceneManager return new SceneLocation(sloc, body.getOid()); } - /** Helper function for {@link #computeEnteringLocation}. */ + /** Helper function for {@link #computeEnteringLocation(BodyObject,Portal,int)}. */ protected boolean checkEntry (MisoSceneMetrics metrics, BodyObject body, int tx, int ty, StageLocation loc) { @@ -612,8 +608,7 @@ public class StageSceneManager extends SpotSceneManager /** Helper function for {@link #canAddBody}. */ protected boolean checkPortals (Rectangle rect) { - for (Iterator iter = _plocs.iterator(); iter.hasNext(); ) { - Point ppoint = iter.next(); + for (Point ppoint : _plocs) { if (rect.contains(ppoint)) { return true; } @@ -688,8 +683,8 @@ public class StageSceneManager extends SpotSceneManager // StringUtil.toString(locs) + " for " + cl + "."); // make sure everyone is in their proper position - for (Iterator iter = clrec.keySet().iterator(); iter.hasNext(); ) { - int tbodyOid = iter.next().intValue(); + for (Integer integer : clrec.keySet()) { + int tbodyOid = integer.intValue(); // leave the newly added player to last if (tbodyOid != bodyOid) { positionBody(cl, tbodyOid, locs); @@ -753,8 +748,8 @@ public class StageSceneManager extends SpotSceneManager List locs = StageSceneUtil.getClusterLocs(cl); // make sure everyone is in their proper position - for (Iterator iter = clrec.keySet().iterator(); iter.hasNext(); ) { - int bodyOid = iter.next().intValue(); + for (Integer integer : clrec.keySet()) { + int bodyOid = integer.intValue(); // leave the newly added player to last if (bodyOid != body.getOid()) { positionBody(cl, bodyOid, locs); @@ -845,9 +840,9 @@ public class StageSceneManager extends SpotSceneManager /** Used by {@link #canAddBody}. */ protected static final int[] Y_OFF = { 0, 0, -1, -1 }; - /** Used by {@link #computeEnteringLocation}. */ + /** Used by {@link #computeEnteringLocation(BodyObject,Portal,int)}. */ protected static final int[] PORTAL_DX = { 0, -1, 0, 1 }; // W N E S - /** Used by {@link #computeEnteringLocation}. */ + /** Used by {@link #computeEnteringLocation(BodyObject,Portal,int)}. */ protected static final int[] PORTAL_DY = { 1, 0, -1, 0 }; // W N E S } diff --git a/src/java/com/threerings/stage/tools/editor/EditorScenePanel.java b/src/java/com/threerings/stage/tools/editor/EditorScenePanel.java index 3844dbf6..0e0d324c 100644 --- a/src/java/com/threerings/stage/tools/editor/EditorScenePanel.java +++ b/src/java/com/threerings/stage/tools/editor/EditorScenePanel.java @@ -21,6 +21,8 @@ package com.threerings.stage.tools.editor; +import static com.threerings.stage.Log.log; + import java.awt.AlphaComposite; import java.awt.BasicStroke; import java.awt.Color; @@ -31,13 +33,11 @@ import java.awt.Polygon; import java.awt.Rectangle; import java.awt.Shape; import java.awt.Stroke; - import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.geom.Ellipse2D; - import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -49,42 +49,34 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import com.google.common.collect.Lists; - import com.samskivert.swing.Controller; import com.samskivert.swing.TGraphics2D; import com.samskivert.swing.util.SwingUtil; import com.samskivert.util.RandomUtil; -import com.threerings.util.DirectionCodes; - import com.threerings.media.tile.ObjectTile; import com.threerings.media.tile.Tile; import com.threerings.media.tile.TileUtil; - -import com.threerings.whirled.spot.tools.EditablePortal; -import com.threerings.whirled.spot.data.Portal; - +import com.threerings.miso.client.MisoScenePanel; import com.threerings.miso.client.ObjectActionHandler; import com.threerings.miso.client.SceneBlock; import com.threerings.miso.client.SceneObject; import com.threerings.miso.data.MisoSceneModel; import com.threerings.miso.data.ObjectInfo; import com.threerings.miso.util.MisoUtil; - import com.threerings.stage.client.StageScenePanel; import com.threerings.stage.data.StageLocation; import com.threerings.stage.data.StageMisoSceneModel; - import com.threerings.stage.tools.editor.util.EditorContext; import com.threerings.stage.tools.editor.util.EditorDialogUtil; import com.threerings.stage.tools.editor.util.ExtrasPainter; - -import static com.threerings.stage.Log.log; +import com.threerings.util.DirectionCodes; +import com.threerings.whirled.spot.data.Portal; +import com.threerings.whirled.spot.tools.EditablePortal; /** - * Displays the scene view and handles UI events on the scene. Various - * actions may be performed on the scene depending on the selected action - * mode, including placing and deleting tiles or locations and creating - * portals. + * Displays the scene view and handles UI events on the scene. Various actions may be performed on + * the scene depending on the selected action mode, including placing and deleting tiles or + * locations and creating portals. */ public class EditorScenePanel extends StageScenePanel implements EditorModelListener, KeyListener, ChangeListener @@ -94,8 +86,7 @@ public class EditorScenePanel extends StageScenePanel */ public EditorScenePanel (EditorContext ctx, JFrame frame, EditorModel model) { - super(ctx, new Controller() { - }); + super(ctx, new Controller() { }); // keep these around for later _ctx = ctx; @@ -218,8 +209,7 @@ public class EditorScenePanel extends StageScenePanel } /** - * Handle placing the currently selected tile at the given screen - * coordinates in the scene. + * Handle placing the currently selected tile at the given screen coordinates in the scene. */ protected void placeTile (int x, int y) { @@ -598,8 +588,7 @@ public class EditorScenePanel extends StageScenePanel } /** - * Set a region of tiles to a random selection from the supplied - * tileset. + * Set a region of tiles to a random selection from the supplied tileset. */ public void setBaseTiles (Rectangle r, int setId, int tileCount) { @@ -688,7 +677,7 @@ public class EditorScenePanel extends StageScenePanel /** * Sets the tile that is currently being placed. It will not be - * rendered until after a call to {@link #updateTileCoords} on the + * rendered until after a call to {@link MisoScenePanel#updateTileCoords} on the * placing tile (which happens automatically when the mouse moves). */ public void setPlacingTile (Tile tile) @@ -698,8 +687,7 @@ public class EditorScenePanel extends StageScenePanel // if this is an object tile, create a temporary scene object we // can use to perform calculations with the object while placing if (_ptile instanceof ObjectTile) { - _pscobj = new SceneObject(this, new ObjectInfo(0, _ppos.x, _ppos.y), - (ObjectTile)tile); + _pscobj = new SceneObject(this, new ObjectInfo(0, _ppos.x, _ppos.y), (ObjectTile)tile); } else { _pscobj = null; } diff --git a/src/java/com/threerings/stats/server/persist/StatRecord.java b/src/java/com/threerings/stats/server/persist/StatRecord.java index 0247c815..49adbe9b 100644 --- a/src/java/com/threerings/stats/server/persist/StatRecord.java +++ b/src/java/com/threerings/stats/server/persist/StatRecord.java @@ -117,7 +117,7 @@ public class StatRecord extends PersistentRecord // AUTO-GENERATED: METHODS START /** - * Create and return a primary {@link Key} to identify a {@link #StatRecord} + * Create and return a primary {@link Key} to identify a {@link StatRecord} * with the supplied key values. */ public static Key getKey (int playerId, int statCode) diff --git a/src/java/com/threerings/stats/server/persist/StringCodeRecord.java b/src/java/com/threerings/stats/server/persist/StringCodeRecord.java index b9781f3c..888e5a65 100644 --- a/src/java/com/threerings/stats/server/persist/StringCodeRecord.java +++ b/src/java/com/threerings/stats/server/persist/StringCodeRecord.java @@ -92,7 +92,7 @@ public class StringCodeRecord extends PersistentRecord // AUTO-GENERATED: METHODS START /** - * Create and return a primary {@link Key} to identify a {@link #StringCodeRecord} + * Create and return a primary {@link Key} to identify a {@link StringCodeRecord} * with the supplied key values. */ public static Key getKey (int statCode, String value) diff --git a/src/java/com/threerings/whirled/client/SceneService.java b/src/java/com/threerings/whirled/client/SceneService.java index a1221c49..f1a19a6b 100644 --- a/src/java/com/threerings/whirled/client/SceneService.java +++ b/src/java/com/threerings/whirled/client/SceneService.java @@ -36,7 +36,7 @@ import com.threerings.whirled.data.SceneUpdate; public interface SceneService extends InvocationService { /** - * Used to communicate the response to a {@link #moveTo} request. + * Used to communicate the response to a {@link SceneService#moveTo} request. */ public static interface SceneMoveListener extends InvocationListener { diff --git a/src/java/com/threerings/whirled/zone/client/ZoneService.java b/src/java/com/threerings/whirled/zone/client/ZoneService.java index afebb11e..998e3a63 100644 --- a/src/java/com/threerings/whirled/zone/client/ZoneService.java +++ b/src/java/com/threerings/whirled/zone/client/ZoneService.java @@ -35,24 +35,24 @@ import com.threerings.whirled.zone.data.ZoneSummary; */ public interface ZoneService extends InvocationService { - /** Used to deliver responses to {@link #moveTo} requests. */ + /** Used to deliver responses to {@link ZoneService#moveTo} requests. */ public static interface ZoneMoveListener extends InvocationListener { /** - * Called in response to a successful {@link #moveTo} request. + * Called in response to a successful {@link ZoneService#moveTo} request. */ public void moveSucceeded (int placeId, PlaceConfig config, ZoneSummary summary); /** - * Called in response to a successful {@link #moveTo} request when our cached scene was out - * of date and the server determined that we needed some updates. + * Called in response to a successful {@link ZoneService#moveTo} request when our cached + * scene was out of date and the server determined that we needed some updates. */ public void moveSucceededWithUpdates ( int placeId, PlaceConfig config, ZoneSummary summary, SceneUpdate[] updates); /** - * Called in response to a successful {@link #moveTo} request when our cached scene was out - * of date and the server determined that we needed an updated copy. + * Called in response to a successful {@link ZoneService#moveTo} request when our cached + * scene was out of date and the server determined that we needed an updated copy. */ public void moveSucceededWithScene ( int placeId, PlaceConfig config, ZoneSummary summary, SceneModel model);