mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
[minor] access modifer order
This commit is contained in:
parent
ec546a5ae6
commit
a7a565bb8f
549 changed files with 1032 additions and 1040 deletions
|
|
@ -43,7 +43,7 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public abstract class MagePane extends javax.swing.JInternalFrame {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(MagePane.class);
|
||||
private static final Logger logger = Logger.getLogger(MagePane.class);
|
||||
|
||||
/** Creates new form MagePane */
|
||||
public MagePane() {
|
||||
|
|
|
|||
|
|
@ -38,24 +38,24 @@ public class RelativeLayout implements LayoutManager2, java.io.Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
// Used in the constructor
|
||||
public final static int X_AXIS = 0;
|
||||
public final static int Y_AXIS = 1;
|
||||
public static final int X_AXIS = 0;
|
||||
public static final int Y_AXIS = 1;
|
||||
|
||||
// See setAlignment() method
|
||||
public final static float LEADING = 0.0f;
|
||||
public final static float CENTER = 0.5f;
|
||||
public final static float TRAILING = 1.0f;
|
||||
public final static float COMPONENT = -1.0f;
|
||||
public static final float LEADING = 0.0f;
|
||||
public static final float CENTER = 0.5f;
|
||||
public static final float TRAILING = 1.0f;
|
||||
public static final float COMPONENT = -1.0f;
|
||||
|
||||
// See setRoundingPolicy() method
|
||||
public final static int DO_NOTHING = 0;
|
||||
public final static int FIRST = 1;
|
||||
public final static int LAST = 2;
|
||||
public final static int LARGEST = 3;
|
||||
public final static int EQUAL = 4;
|
||||
public static final int DO_NOTHING = 0;
|
||||
public static final int FIRST = 1;
|
||||
public static final int LAST = 2;
|
||||
public static final int LARGEST = 3;
|
||||
public static final int EQUAL = 4;
|
||||
|
||||
private final static int MINIMUM = 0;
|
||||
private final static int PREFERRED = 1;
|
||||
private static final int MINIMUM = 0;
|
||||
private static final int PREFERRED = 1;
|
||||
|
||||
private Map<Component, Float> constraints = new HashMap<Component, Float>();
|
||||
|
||||
|
|
@ -657,11 +657,9 @@ public class RelativeLayout implements LayoutManager2, java.io.Serializable {
|
|||
for (int i = 0; i < relativeSpace.length; i++) {
|
||||
int space = relativeSpace[i];
|
||||
|
||||
if (space > 0) {
|
||||
if (largestSpace < space) {
|
||||
largestSpace = space;
|
||||
largest = i;
|
||||
}
|
||||
if (space > 0 && largestSpace < space) {
|
||||
largestSpace = space;
|
||||
largest = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ import java.util.concurrent.ExecutionException;
|
|||
*/
|
||||
public class DeckEditorPanel extends javax.swing.JPanel {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(DeckEditorPanel.class);
|
||||
private static final Logger logger = Logger.getLogger(DeckEditorPanel.class);
|
||||
|
||||
private JFileChooser fcSelectDeck;
|
||||
private JFileChooser fcImportDeck;
|
||||
|
|
@ -697,7 +697,7 @@ class ImportFilter extends FileFilter {
|
|||
|
||||
class UpdateDeckTask extends SwingWorker<Void, Void> {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(UpdateDeckTask.class);
|
||||
private static final Logger logger = Logger.getLogger(UpdateDeckTask.class);
|
||||
|
||||
private Session session;
|
||||
private UUID tableId;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ import java.util.concurrent.ExecutionException;
|
|||
*/
|
||||
public class ConnectDialog extends MageDialog {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(ConnectDialog.class);
|
||||
private static final Logger logger = Logger.getLogger(ConnectDialog.class);
|
||||
private Connection connection;
|
||||
private ConnectTask task;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class JoinTableDialog extends MageDialog {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(JoinTableDialog.class);
|
||||
private static final Logger logger = Logger.getLogger(JoinTableDialog.class);
|
||||
|
||||
private UUID tableId;
|
||||
private UUID roomId;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ import java.lang.reflect.InvocationTargetException;
|
|||
*/
|
||||
public class MageDialog extends javax.swing.JInternalFrame {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(MageDialog.class);
|
||||
private static final Logger logger = Logger.getLogger(MageDialog.class);
|
||||
|
||||
protected boolean modal = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public class NewTableDialog extends MageDialog {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(NewTableDialog.class);
|
||||
private static final Logger logger = Logger.getLogger(NewTableDialog.class);
|
||||
|
||||
private TableView table;
|
||||
private UUID playerId;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public class NewTournamentDialog extends MageDialog {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(NewTournamentDialog.class);
|
||||
private static final Logger logger = Logger.getLogger(NewTournamentDialog.class);
|
||||
|
||||
private TableView table;
|
||||
private UUID playerId;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ import java.util.concurrent.ExecutionException;
|
|||
*/
|
||||
public class TableWaitingDialog extends MageDialog {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(TableWaitingDialog.class);
|
||||
private static final Logger logger = Logger.getLogger(TableWaitingDialog.class);
|
||||
|
||||
private UUID tableId;
|
||||
private UUID roomId;
|
||||
|
|
@ -363,7 +363,7 @@ class UpdateSeatsTask extends SwingWorker<Void, TableView> {
|
|||
private TableWaitingDialog dialog;
|
||||
private int count = 0;
|
||||
|
||||
private final static Logger logger = Logger.getLogger(TableWaitingDialog.class);
|
||||
private static final Logger logger = Logger.getLogger(TableWaitingDialog.class);
|
||||
|
||||
UpdateSeatsTask(Session session, UUID roomId, UUID tableId, TableWaitingDialog dialog) {
|
||||
this.session = session;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class FeedbackPanel extends javax.swing.JPanel {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(FeedbackPanel.class);
|
||||
private static final Logger logger = Logger.getLogger(FeedbackPanel.class);
|
||||
|
||||
public enum FeedbackMode {
|
||||
INFORM, QUESTION, CONFIRM, CANCEL, SELECT, END
|
||||
|
|
|
|||
|
|
@ -1255,7 +1255,7 @@ class ReplayTask extends SwingWorker<Void, Collection<MatchView>> {
|
|||
private Session session;
|
||||
private UUID gameId;
|
||||
|
||||
private final static Logger logger = Logger.getLogger(ReplayTask.class);
|
||||
private static final Logger logger = Logger.getLogger(ReplayTask.class);
|
||||
|
||||
ReplayTask(Session session, UUID gameId) {
|
||||
this.session = session;
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ public class Plugins implements MagePlugins {
|
|||
|
||||
public static final String PLUGINS_DIRECTORY = "plugins/";
|
||||
|
||||
private final static MagePlugins fINSTANCE = new Plugins();
|
||||
private final static Logger logger = Logger.getLogger(Plugins.class);
|
||||
private static final MagePlugins fINSTANCE = new Plugins();
|
||||
private static final Logger logger = Logger.getLogger(Plugins.class);
|
||||
private static PluginManager pm;
|
||||
|
||||
private ThemePlugin themePlugin = null;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public class CallbackClientImpl implements CallbackClient {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(CallbackClientImpl.class);
|
||||
private static final Logger logger = Logger.getLogger(CallbackClientImpl.class);
|
||||
|
||||
private UUID clientId;
|
||||
private MageFrame frame;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class TournamentPanel extends javax.swing.JPanel {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(TournamentPanel.class);
|
||||
private static final Logger logger = Logger.getLogger(TournamentPanel.class);
|
||||
|
||||
private UUID tournamentId;
|
||||
private Session session;
|
||||
|
|
@ -334,7 +334,7 @@ class UpdateTournamentTask extends SwingWorker<Void, TournamentView> {
|
|||
private UUID tournamentId;
|
||||
private TournamentPanel panel;
|
||||
|
||||
private final static Logger logger = Logger.getLogger(UpdateTournamentTask.class);
|
||||
private static final Logger logger = Logger.getLogger(UpdateTournamentTask.class);
|
||||
|
||||
UpdateTournamentTask(Session session, UUID tournamentId, TournamentPanel panel) {
|
||||
this.session = session;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ import java.util.Properties;
|
|||
*/
|
||||
public class Config {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(Config.class);
|
||||
private static final Logger logger = Logger.getLogger(Config.class);
|
||||
|
||||
public static final String remoteServer;
|
||||
public static final String serverName;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class EDTExceptionHandler implements Thread.UncaughtExceptionHandler {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(EDTExceptionHandler.class);
|
||||
private static final Logger logger = Logger.getLogger(EDTExceptionHandler.class);
|
||||
|
||||
@Override
|
||||
public void uncaughtException(Thread t, Throwable e) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import java.awt.*;
|
|||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
abstract public class Animation {
|
||||
public abstract class Animation {
|
||||
private static final long TARGET_MILLIS_PER_FRAME = 30;
|
||||
|
||||
private static Timer timer = new Timer("Animation", true);
|
||||
|
|
@ -46,7 +46,7 @@ abstract public class Animation {
|
|||
timer.scheduleAtFixedRate(timerTask, delay, TARGET_MILLIS_PER_FRAME);
|
||||
}
|
||||
|
||||
abstract protected void update (float percentage);
|
||||
protected abstract void update (float percentage);
|
||||
|
||||
protected void cancel () {
|
||||
timerTask.cancel();
|
||||
|
|
@ -102,7 +102,7 @@ abstract public class Animation {
|
|||
}
|
||||
}
|
||||
|
||||
static public void tapCardToggle (final CardPanel panel, final MagePermanent parent, final boolean tapped, final boolean flipped) {
|
||||
public static void tapCardToggle (final CardPanel panel, final MagePermanent parent, final boolean tapped, final boolean flipped) {
|
||||
new Animation(300) {
|
||||
@Override
|
||||
protected void start () {
|
||||
|
|
@ -177,7 +177,7 @@ abstract public class Animation {
|
|||
};
|
||||
}
|
||||
|
||||
static public void moveCardToPlay (final int startX, final int startY, final int startWidth, final int endX, final int endY,
|
||||
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) {
|
||||
UI.invokeLater(new Runnable() {
|
||||
|
|
@ -247,7 +247,7 @@ abstract public class Animation {
|
|||
});
|
||||
}
|
||||
|
||||
static public void moveCard (final int startX, final int startY, final int startWidth, final int endX, final int endY,
|
||||
public static void moveCard (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) {
|
||||
UI.invokeLater(new Runnable() {
|
||||
|
|
@ -294,11 +294,9 @@ abstract public class Animation {
|
|||
});
|
||||
}
|
||||
|
||||
static public void shrinkCard () {
|
||||
public static void shrinkCard () {
|
||||
final CardPanel overPanel, animationPanel;
|
||||
synchronized (enlargeLock) {
|
||||
//delayedCardPanel = null;
|
||||
//delayedTime = 0;
|
||||
overPanel = Animation.enlargedCardPanel;
|
||||
animationPanel = Animation.enlargedAnimationPanel;
|
||||
if (animationPanel == null) {
|
||||
|
|
@ -348,15 +346,15 @@ abstract public class Animation {
|
|||
};
|
||||
}
|
||||
|
||||
static public boolean isShowingEnlargedCard () {
|
||||
public static boolean isShowingEnlargedCard () {
|
||||
synchronized (enlargeLock) {
|
||||
return enlargedAnimationPanel != null;
|
||||
}
|
||||
}
|
||||
|
||||
static public void showCard(final MagePermanent card, int count) {
|
||||
public static void showCard(final MagePermanent card, int count) {
|
||||
if (count == 0) {
|
||||
count = 1;
|
||||
return;
|
||||
}
|
||||
new Animation(600 / count) {
|
||||
@Override
|
||||
|
|
@ -377,9 +375,9 @@ abstract public class Animation {
|
|||
};
|
||||
}
|
||||
|
||||
static public void hideCard(final MagePermanent card, int count) {
|
||||
public static void hideCard(final MagePermanent card, int count) {
|
||||
if (count == 0) {
|
||||
count = 1;
|
||||
return;
|
||||
}
|
||||
new Animation(600 / count) {
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -46,12 +46,12 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
|||
|
||||
public static final Rectangle CARD_SIZE_FULL = new Rectangle(101, 149);
|
||||
|
||||
static private final float ROUNDED_CORNER_SIZE = 0.1f;
|
||||
static private final float BLACK_BORDER_SIZE = 0.03f;
|
||||
static private final int TEXT_GLOW_SIZE = 6;
|
||||
static private final float TEXT_GLOW_INTENSITY = 3f;
|
||||
static private final float ROT_CENTER_TO_TOP_CORNER = 1.0295630140987000315797369464196f;
|
||||
static private final float ROT_CENTER_TO_BOTTOM_CORNER = 0.7071067811865475244008443621048f;
|
||||
private static final float ROUNDED_CORNER_SIZE = 0.1f;
|
||||
private static final float BLACK_BORDER_SIZE = 0.03f;
|
||||
private static final int TEXT_GLOW_SIZE = 6;
|
||||
private static final float TEXT_GLOW_INTENSITY = 3f;
|
||||
private static final float ROT_CENTER_TO_TOP_CORNER = 1.0295630140987000315797369464196f;
|
||||
private static final float ROT_CENTER_TO_BOTTOM_CORNER = 0.7071067811865475244008443621048f;
|
||||
|
||||
public CardView gameCard;
|
||||
|
||||
|
|
@ -236,7 +236,7 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
|||
public void setImage(final CardPanel panel) {
|
||||
synchronized (panel.imagePanel) {
|
||||
if (panel.imagePanel.hasImage()) {
|
||||
setImage(panel.imagePanel.srcImage);
|
||||
setImage(panel.imagePanel.getSrcImage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -747,7 +747,7 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
|||
return data;
|
||||
}
|
||||
|
||||
final protected String getType(CardView card) {
|
||||
protected final String getType(CardView card) {
|
||||
StringBuilder sbType = new StringBuilder();
|
||||
|
||||
for (String superType : card.getSuperTypes()) {
|
||||
|
|
@ -768,7 +768,7 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
|||
return sbType.toString();
|
||||
}
|
||||
|
||||
final protected String getText(String cardType, CardView card) {
|
||||
protected final String getText(String cardType, CardView card) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (card instanceof StackAbilityView || card instanceof AbilityView) {
|
||||
for (String rule : card.getRules()) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import javax.swing.JPanel;
|
|||
|
||||
public class ScaledImagePanel extends JPanel {
|
||||
private static final long serialVersionUID = -1523279873208605664L;
|
||||
public volatile Image srcImage;
|
||||
private volatile Image srcImage;
|
||||
|
||||
private ScalingType scalingType = ScalingType.bilinear;
|
||||
private boolean scaleLarger;
|
||||
|
|
@ -101,7 +101,6 @@ public class ScaledImagePanel extends JPanel {
|
|||
}
|
||||
|
||||
private void scaleWithGetScaledInstance (Graphics2D g2, ScalingInfo info, int hints) {
|
||||
Image srcImage = getSourceImage(info);
|
||||
Image scaledImage = srcImage.getScaledInstance(info.targetWidth, info.targetHeight, hints);
|
||||
g2.drawImage(scaledImage, info.x, info.y, null);
|
||||
}
|
||||
|
|
@ -117,8 +116,6 @@ public class ScaledImagePanel extends JPanel {
|
|||
tempDestHeight = info.targetHeight;
|
||||
}
|
||||
|
||||
Image srcImage = getSourceImage(info);
|
||||
|
||||
// If not doing multipass or multipass only needs a single pass, just scale it once directly to the panel surface.
|
||||
if (multiPassType == MultipassType.none || (tempDestWidth == info.targetWidth && tempDestHeight == info.targetHeight)) {
|
||||
g2.drawImage(srcImage, info.x, info.y, info.targetWidth, info.targetHeight, null);
|
||||
|
|
@ -174,15 +171,11 @@ public class ScaledImagePanel extends JPanel {
|
|||
tempSrcHeight, null);
|
||||
}
|
||||
|
||||
private Image getSourceImage (ScalingInfo info) {
|
||||
return srcImage;
|
||||
}
|
||||
|
||||
public Image getSrcImage() {
|
||||
return srcImage;
|
||||
}
|
||||
|
||||
static private class ScalingInfo {
|
||||
private static class ScalingInfo {
|
||||
public int targetWidth;
|
||||
public int targetHeight;
|
||||
public int srcWidth;
|
||||
|
|
@ -191,11 +184,11 @@ public class ScaledImagePanel extends JPanel {
|
|||
public int y;
|
||||
}
|
||||
|
||||
static public enum MultipassType {
|
||||
public static enum MultipassType {
|
||||
none, nearestNeighbor, bilinear, bicubic
|
||||
}
|
||||
|
||||
static public enum ScalingType {
|
||||
public static enum ScalingType {
|
||||
nearestNeighbor, replicate, bilinear, bicubic, areaAveraging
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import static org.mage.plugins.card.dl.DownloadJob.toFile;
|
|||
|
||||
public class GathererSets implements Iterable<DownloadJob> {
|
||||
|
||||
private final static String SETS_PATH = File.separator + "sets";
|
||||
private final static File DEFAULT_OUT_DIR = new File("plugins" + File.separator + "images" + SETS_PATH);
|
||||
private static final String SETS_PATH = File.separator + "sets";
|
||||
private static final File DEFAULT_OUT_DIR = new File("plugins" + File.separator + "images" + SETS_PATH);
|
||||
private static File outDir = DEFAULT_OUT_DIR;
|
||||
|
||||
private static final String[] symbols = {"10E", "9ED", "8ED", "7ED", "6ED", "5ED", "4ED", "3ED", "2ED", "LEB", "LEA",
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ public class GathererSymbols implements Iterable<DownloadJob> {
|
|||
//TODO chaos and planeswalker symbol
|
||||
//chaos: http://gatherer.wizards.com/Images/Symbols/chaos.gif
|
||||
|
||||
private final static String SYMBOLS_PATH = File.separator + "symbols";
|
||||
private final static File DEFAULT_OUT_DIR = new File("plugins" + File.separator + "images" + SYMBOLS_PATH);
|
||||
private static final String SYMBOLS_PATH = File.separator + "symbols";
|
||||
private static final File DEFAULT_OUT_DIR = new File("plugins" + File.separator + "images" + SYMBOLS_PATH);
|
||||
private static File outDir = DEFAULT_OUT_DIR;
|
||||
|
||||
private static final String urlFmt = "http://gatherer.wizards.com/handlers/image.ashx?size=%1$s&name=%2$s&type=symbol";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue