replace long serialVersionUID with @SuppressWarnings("serial")
parent
185913aec2
commit
c451c0be5d
|
@ -3,8 +3,8 @@ package magic.data;
|
|||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class LRUCache<K,V> extends LinkedHashMap<K,V> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final int capacity;
|
||||
|
||||
public LRUCache(final int capacity) {
|
||||
|
|
|
@ -2,7 +2,7 @@ package magic.model;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class MagicBoosterPack extends ArrayList<MagicCardDefinition> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
|
@ -4,10 +4,9 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class MagicCardList extends ArrayList<MagicCard> implements MagicCopyable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public MagicCardList() {}
|
||||
|
||||
public MagicCardList(final List<MagicCard> cardList) {
|
||||
|
|
|
@ -4,10 +4,9 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class MagicCondensedDeck extends ArrayList<MagicCondensedCardDefinition> {
|
||||
|
||||
private static final long serialVersionUID = 143L;
|
||||
|
||||
private String name = "Unsaved Deck";
|
||||
|
||||
private final HashMap<String, MagicCondensedCardDefinition> map = new HashMap<String, MagicCondensedCardDefinition>();
|
||||
|
|
|
@ -4,10 +4,9 @@ import java.lang.reflect.Array;
|
|||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class MagicCopyMap extends HashMap<MagicCopyable,MagicCopyable> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <E extends MagicCopyable> E copy(final E source) {
|
||||
if (source == null) {
|
||||
|
|
|
@ -4,10 +4,9 @@ import java.util.List;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class MagicPermanentList extends ArrayList<MagicPermanent> implements MagicCopyable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public MagicPermanentList() {}
|
||||
|
||||
public MagicPermanentList(final MagicPermanent... permanents) {
|
||||
|
|
|
@ -2,10 +2,9 @@ package magic.model;
|
|||
|
||||
import java.util.TreeSet;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class MagicPermanentSet extends TreeSet<MagicPermanent> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
MagicPermanentSet() {}
|
||||
|
||||
MagicPermanentSet(final MagicCopyMap copyMap,final MagicPermanentSet source) {
|
||||
|
|
|
@ -2,11 +2,11 @@ package magic.model;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class MagicRandom extends Random {
|
||||
|
||||
private long state;
|
||||
private static MagicRandom RNG = new MagicRandom();
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
static {
|
||||
final String seedStr = System.getProperty("rndSeed");
|
||||
|
|
|
@ -2,6 +2,6 @@ package magic.model.action;
|
|||
|
||||
import java.util.LinkedList;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class MagicActionList extends LinkedList<MagicAction> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
|
@ -10,10 +10,9 @@ import java.util.List;
|
|||
import java.util.ArrayList;
|
||||
import magic.model.MagicMessage;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class MagicCardChoiceResult extends ArrayList<MagicCard> implements MagicMappable<MagicCardChoiceResult>, MagicCopyable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
MagicCardChoiceResult(final MagicCard[] cards) {
|
||||
for (final MagicCard card : cards) {
|
||||
if (card != null) {
|
||||
|
|
|
@ -8,10 +8,9 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class MagicDeclareAttackersResult extends ArrayList<MagicPermanent> implements MagicMappable<MagicDeclareAttackersResult> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
MagicDeclareAttackersResult() {}
|
||||
|
||||
MagicDeclareAttackersResult(final MagicPermanent[] attackers,final int length) {
|
||||
|
|
|
@ -8,10 +8,9 @@ import java.util.Arrays;
|
|||
import java.util.LinkedList;
|
||||
|
||||
/** First creature in array is the attacker, the other creatures are blockers. */
|
||||
@SuppressWarnings("serial")
|
||||
public class MagicDeclareBlockersResult extends LinkedList<MagicCombatCreature[]> implements MagicMappable<MagicDeclareBlockersResult>, MagicScoreResult {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final int position;
|
||||
private final int score;
|
||||
|
||||
|
|
|
@ -4,10 +4,9 @@ import magic.model.MagicCopyMap;
|
|||
|
||||
import java.util.LinkedList;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class MagicEventQueue extends LinkedList<MagicEvent> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public MagicEventQueue() {}
|
||||
|
||||
public MagicEventQueue(final MagicCopyMap copyMap,final MagicEventQueue source) {
|
||||
|
|
|
@ -8,10 +8,9 @@ import magic.model.event.MagicActivation;
|
|||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class MagicStack extends LinkedList<MagicItemOnStack> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final int[] spells;
|
||||
private final int[] counts;
|
||||
|
||||
|
|
|
@ -3,10 +3,9 @@ package magic.model.trigger;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class MagicPermanentTriggerList extends ArrayList<MagicPermanentTrigger> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public MagicPermanentTriggerList() {}
|
||||
|
||||
public MagicPermanentTriggerList(final MagicPermanentTriggerList triggerList) {
|
||||
|
|
|
@ -259,8 +259,8 @@ public class CardTable extends TexturedPanel implements ListSelectionListener {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
private static class ManaCostCellRenderer extends DefaultTableCellRenderer {
|
||||
private static final long serialVersionUID = 113245L;
|
||||
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int col) {
|
||||
|
|
|
@ -291,8 +291,8 @@ public class CardTablePanel extends TexturedPanel {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
private static class ManaCostCellRenderer extends DefaultTableCellRenderer {
|
||||
private static final long serialVersionUID = 113245L;
|
||||
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int col) {
|
||||
|
|
|
@ -288,8 +288,8 @@ public class DeckTablePanel extends TexturedPanel {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
private static class ManaCostCellRenderer extends DefaultTableCellRenderer {
|
||||
private static final long serialVersionUID = 113245L;
|
||||
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int col) {
|
||||
|
|
|
@ -54,13 +54,15 @@ public class MayChoicePanel extends JPanel implements ActionListener {
|
|||
buttonPanel.add(yesButton);
|
||||
|
||||
yesButton.getInputMap(2).put(KeyStroke.getKeyStroke('y'),"yes");
|
||||
yesButton.getActionMap().put("yes",new AbstractAction() {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
final AbstractAction yesAction = new AbstractAction() {
|
||||
public void actionPerformed(final ActionEvent evt) {
|
||||
yes = true;
|
||||
controller.actionClicked();
|
||||
}
|
||||
});
|
||||
};
|
||||
yesButton.getActionMap().put("yes", yesAction);
|
||||
|
||||
|
||||
final JButton noButton=new JButton(UiString.get(_S2), MagicImages.getIcon(MagicIcon.CANCEL));
|
||||
|
@ -70,13 +72,15 @@ public class MayChoicePanel extends JPanel implements ActionListener {
|
|||
buttonPanel.add(noButton);
|
||||
|
||||
noButton.getInputMap(2).put(KeyStroke.getKeyStroke('n'),"no");
|
||||
noButton.getActionMap().put("no",new AbstractAction() {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
final AbstractAction noAction = new AbstractAction() {
|
||||
public void actionPerformed(final ActionEvent evt) {
|
||||
yes = false;
|
||||
controller.actionClicked();
|
||||
}
|
||||
});
|
||||
};
|
||||
noButton.getActionMap().put("no", noAction);
|
||||
}
|
||||
|
||||
public boolean isYesClicked() {
|
||||
|
|
|
@ -15,10 +15,9 @@ import magic.ui.theme.ThemeFactory;
|
|||
import magic.ui.widget.FontsAndBorders;
|
||||
import magic.ui.widget.PanelButton;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
class BasicLandPermanentButton extends PanelButton implements IChoiceViewer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final PermanentViewerInfo permanentInfo;
|
||||
private final SwingGameController controller;
|
||||
private final JPanel landPanel;
|
||||
|
|
|
@ -10,10 +10,9 @@ import magic.ui.duel.PermanentFilter;
|
|||
import magic.ui.duel.PermanentViewerInfo;
|
||||
import magic.ui.widget.TitleBar;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
class BattlefieldViewer extends PermanentsViewer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final boolean opponent;
|
||||
private final PermanentFilter permanentFilter;
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@ import magic.ui.utility.MagicStyle;
|
|||
import magic.ui.widget.CostPanel;
|
||||
import magic.ui.widget.PanelButton;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
class CardButton extends PanelButton implements IChoiceViewer {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final SwingGameController controller;
|
||||
private final MagicCard card;
|
||||
|
|
|
@ -16,8 +16,8 @@ import magic.ui.theme.Theme;
|
|||
import magic.ui.theme.ThemeFactory;
|
||||
import magic.ui.widget.FontsAndBorders;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
abstract class CardListViewer extends JPanel implements IChoiceViewer {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final int LINE_HEIGHT = 26;
|
||||
|
||||
private final SwingGameController controller;
|
||||
|
|
|
@ -10,10 +10,9 @@ import magic.ui.duel.PermanentViewerInfo;
|
|||
import magic.ui.duel.PlayerViewerInfo;
|
||||
import magic.ui.widget.FontsAndBorders;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
class CombatViewer extends PermanentsViewer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
CombatViewer(final SwingGameController controller) {
|
||||
super(controller);
|
||||
update();
|
||||
|
|
|
@ -3,9 +3,8 @@ package magic.ui.duel.textmode;
|
|||
import magic.ui.duel.SwingGameController;
|
||||
import magic.ui.theme.Theme;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
class ExileViewer extends CardListViewer {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
ExileViewer(final SwingGameController controller, final boolean opponent) {
|
||||
super(
|
||||
controller,
|
||||
|
|
|
@ -3,9 +3,8 @@ package magic.ui.duel.textmode;
|
|||
import magic.ui.duel.SwingGameController;
|
||||
import magic.ui.theme.Theme;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
class GraveyardViewer extends CardListViewer {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
GraveyardViewer(final SwingGameController controller, final boolean opponent) {
|
||||
super(
|
||||
controller,
|
||||
|
|
|
@ -11,8 +11,8 @@ import magic.ui.utility.MagicStyle;
|
|||
import magic.ui.widget.TabSelector;
|
||||
import magic.ui.widget.TitleBar;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
class HandGraveyardExileViewer extends JPanel implements ChangeListener {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final CardListViewer[] viewers;
|
||||
private final JPanel cardPanel;
|
||||
|
|
|
@ -3,9 +3,8 @@ package magic.ui.duel.textmode;
|
|||
import magic.ui.duel.SwingGameController;
|
||||
import magic.ui.theme.Theme;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
class HandViewer extends CardListViewer {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
HandViewer(final SwingGameController controller) {
|
||||
super(
|
||||
controller,
|
||||
|
|
|
@ -4,9 +4,8 @@ import magic.model.MagicCardList;
|
|||
import magic.ui.duel.SwingGameController;
|
||||
import magic.ui.theme.Theme;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
class OtherViewer extends CardListViewer {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
OtherViewer(final MagicCardList cards, final SwingGameController controller) {
|
||||
super(
|
||||
controller,
|
||||
|
|
|
@ -15,10 +15,9 @@ import magic.ui.theme.ThemeFactory;
|
|||
import magic.ui.utility.MagicStyle;
|
||||
import magic.ui.widget.PanelButton;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
class PermanentButton extends PanelButton implements IChoiceViewer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final PermanentViewerInfo permanentInfo;
|
||||
private final SwingGameController controller;
|
||||
|
||||
|
|
|
@ -17,10 +17,9 @@ import magic.ui.theme.Theme;
|
|||
import magic.ui.theme.ThemeFactory;
|
||||
import magic.ui.widget.FontsAndBorders;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
class PermanentPanel extends JPanel implements IChoiceViewer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final PermanentButton button;
|
||||
private final List<PermanentButton> linkedButtons;
|
||||
|
||||
|
|
|
@ -19,10 +19,9 @@ import magic.ui.theme.Theme;
|
|||
import magic.ui.theme.ThemeFactory;
|
||||
import magic.ui.widget.TitleBar;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
abstract class PermanentsViewer extends JPanel implements IChoiceViewer, IUpdatable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static final Dimension SEPARATOR_DIMENSION=new Dimension(0,10);
|
||||
|
||||
TitleBar titleBar;
|
||||
|
|
|
@ -11,10 +11,9 @@ import magic.ui.utility.MagicStyle;
|
|||
import magic.ui.widget.TabSelector;
|
||||
import magic.ui.widget.TitleBar;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
class StackCombatViewer extends JPanel implements ChangeListener {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final CombatViewer combatViewer;
|
||||
private final JPanel cardPanel;
|
||||
private final CardLayout cardLayout;
|
||||
|
|
|
@ -9,10 +9,9 @@ import magic.ui.theme.Theme;
|
|||
import magic.ui.theme.ThemeFactory;
|
||||
import magic.ui.widget.FontsAndBorders;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
class ViewerScrollPane extends JScrollPane {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private JPanel contentPanel;
|
||||
|
||||
ViewerScrollPane() {
|
||||
|
|
|
@ -16,10 +16,9 @@ import java.util.Set;
|
|||
import magic.model.MagicCard;
|
||||
import magic.ui.utility.MagicStyle;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class ImageBattlefieldViewer extends JPanel implements IChoiceViewer, IUpdatable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final SwingGameController controller;
|
||||
private final boolean opponent;
|
||||
private final ImagePermanentsViewer permanentsViewer;
|
||||
|
|
|
@ -19,10 +19,9 @@ import java.util.TreeSet;
|
|||
import magic.model.MagicCard;
|
||||
import magic.ui.utility.MagicStyle;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class ImageCombatViewer extends JPanel implements IChoiceViewer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final SwingGameController controller;
|
||||
private final ImagePermanentsViewer permanentsViewer;
|
||||
|
||||
|
|
|
@ -14,10 +14,9 @@ import magic.model.MagicCard;
|
|||
import magic.ui.utility.GraphicsUtils;
|
||||
import magic.ui.duel.SwingGameController;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class ImagePermanentsViewer extends JPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static final GeneralConfig CONFIG = GeneralConfig.getInstance();
|
||||
private static final int POSITION_SPACING = 60;
|
||||
private static final int HORIZONTAL_SPACING = 40;
|
||||
|
|
|
@ -17,10 +17,9 @@ import javax.swing.KeyStroke;
|
|||
import javax.swing.SwingUtilities;
|
||||
import magic.ui.ScreenController;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class ButtonControlledPopup extends TexturedPanel implements ActionListener, WindowFocusListener {
|
||||
|
||||
private static final long serialVersionUID = 54232L;
|
||||
|
||||
public static final int STARTING_WIDTH = 260;
|
||||
public static final int STARTING_HEIGHT = 300;
|
||||
|
||||
|
@ -54,13 +53,15 @@ public class ButtonControlledPopup extends TexturedPanel implements ActionListen
|
|||
private void setEscapeKeyAction() {
|
||||
JRootPane root = dialog.getRootPane();
|
||||
root.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "closeDialog");
|
||||
root.getActionMap().put("closeDialog", new AbstractAction() {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
final AbstractAction closeAction = new AbstractAction() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
hidePopup();
|
||||
}
|
||||
});
|
||||
};
|
||||
root.getActionMap().put("closeDialog", closeAction);
|
||||
}
|
||||
|
||||
public void setPopupSize(final int width, final int height) {
|
||||
|
|
|
@ -12,10 +12,9 @@ import java.util.List;
|
|||
import magic.data.MagicIcon;
|
||||
import magic.ui.MagicImages;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class CostPanel extends JPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static final Dimension MANA_ICON_SIZE = new Dimension(17,17);
|
||||
|
||||
public CostPanel(final MagicManaCost cost) {
|
||||
|
|
|
@ -10,10 +10,9 @@ import java.awt.Graphics;
|
|||
import java.awt.Point;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class TexturedPanel extends JPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private boolean start;
|
||||
private int startX;
|
||||
private int startY;
|
||||
|
|
|
@ -15,10 +15,9 @@ import java.awt.Rectangle;
|
|||
import java.awt.image.BufferedImage;
|
||||
import magic.ui.utility.MagicStyle;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class ZoneBackgroundLabel extends JLabel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private boolean game;
|
||||
private boolean image=true;
|
||||
private int playerX;
|
||||
|
|
Loading…
Reference in New Issue