checkstyle

This commit is contained in:
jendave
2011-10-28 23:04:23 +00:00
parent ddc4de70e7
commit 4e155bd68c
3 changed files with 10 additions and 13 deletions

View File

@@ -198,7 +198,7 @@
<!-- See http://checkstyle.sf.net/config_design.html -->
<!-- <module name="DesignForExtension"/> -->
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor"/>
<!-- <module name="HideUtilityClassConstructor"/> -->
<module name="InterfaceIsType"/>
<module name="VisibilityModifier"/>

View File

@@ -226,8 +226,7 @@ public abstract class Animation {
*/
public static void moveCardToPlay(final int startX, final int startY, final int startWidth, final int endX,
final int endY, final int endWidth, final CardPanel animationPanel, final CardPanel placeholder,
final JLayeredPane layeredPane, final int speed)
{
final JLayeredPane layeredPane, final int speed) {
UI.invokeLater(new Runnable() {
public void run() {
final int startHeight = Math.round(startWidth * CardPanel.ASPECT_RATIO);
@@ -484,12 +483,10 @@ public abstract class Animation {
long delayedTime;
synchronized (enlargeLock) {
if (enlargedCardPanel == overPanel)
{
if (enlargedCardPanel == overPanel) {
return; // Already showing this card enlarged.
}
if (delay > 0 && delayedCardPanel == overPanel)
{
if (delay > 0 && delayedCardPanel == overPanel) {
return; // Already delayed this card.
}
delayedCardPanel = overPanel;

View File

@@ -19,7 +19,7 @@ import com.esotericsoftware.minlog.Log;
*/
public class ManaSymbols {
/** Constant <code>manaImages</code>. */
private static final Map<String, Image> manaImages = new HashMap<String, Image>();
private static final Map<String, Image> MANA_IMAGES = new HashMap<String, Image>();
/** Constant <code>replaceSymbolsPattern</code>. */
private static Pattern replaceSymbolsPattern = Pattern.compile("\\{([^}/]*)/?([^}]*)\\}");
@@ -35,7 +35,7 @@ public class ManaSymbols {
"defend", "summonsick", "phasing", "counters1", "counters2", "counters3", "countersMulti", "foil01",
"foil02", "foil03", "foil04", "foil05", "foil06", "foil07", "foil08", "foil09", "foil10" };
for (String symbol : symbols) {
manaImages.put(symbol, UI.getImageIcon("res/images/symbols-13/" + symbol + ".png").getImage());
MANA_IMAGES.put(symbol, UI.getImageIcon("res/images/symbols-13/" + symbol + ".png").getImage());
}
}
@@ -61,7 +61,7 @@ public class ManaSymbols {
StringTokenizer tok = new StringTokenizer(manaCost, " ");
while (tok.hasMoreTokens()) {
String symbol = tok.nextToken();
Image image = manaImages.get(symbol);
Image image = MANA_IMAGES.get(symbol);
if (image == null) {
Log.info("Symbol not recognized \"" + symbol + "\" in mana cost: " + manaCost);
continue;
@@ -90,7 +90,7 @@ public class ManaSymbols {
StringTokenizer tok = new StringTokenizer(s, " ");
while (tok.hasMoreTokens()) {
String symbol = tok.nextToken();
Image image = manaImages.get(symbol);
Image image = MANA_IMAGES.get(symbol);
if (image == null) {
Log.info("Symbol not recognized \"" + symbol + "\" in string: " + s);
continue;
@@ -115,7 +115,7 @@ public class ManaSymbols {
* a int.
*/
public static void drawAttack(final Graphics g, final int x, final int y) {
Image image = manaImages.get("attack");
Image image = MANA_IMAGES.get("attack");
g.drawImage(image, x, y, null);
}
@@ -134,7 +134,7 @@ public class ManaSymbols {
* a int.
*/
public static void drawSymbol(final String imageName, final Graphics g, final int x, final int y) {
Image image = manaImages.get(imageName);
Image image = MANA_IMAGES.get(imageName);
g.drawImage(image, x, y, null);
}