removed Card parameter from CardPicturePanel ctor (there was passed null in 4 cases out of 5)

This commit is contained in:
Maxmtg
2013-02-24 08:26:29 +00:00
parent 4ba9901958
commit 962a3be929
6 changed files with 8 additions and 8 deletions

View File

@@ -109,7 +109,7 @@ public class CardListViewer {
this.list = Collections.unmodifiableList(list); this.list = Collections.unmodifiableList(list);
this.jList = new JList(new ChooserListModel()); this.jList = new JList(new ChooserListModel());
this.detail = new CardDetailPanel(null); this.detail = new CardDetailPanel(null);
this.picture = new CardPicturePanel(null); this.picture = new CardPicturePanel();
this.ok = new CloseAction(JOptionPane.OK_OPTION, "OK"); this.ok = new CloseAction(JOptionPane.OK_OPTION, "OK");
final Object[] options = new Object[] { new JButton(this.ok) }; final Object[] options = new Object[] { new JButton(this.ok) };

View File

@@ -49,7 +49,7 @@ public final class CardPicturePanel extends JPanel implements CardContainer {
private final ScaledImagePanel panel; private final ScaledImagePanel panel;
private BufferedImage currentImage; private BufferedImage currentImage;
public CardPicturePanel(final Card c) { public CardPicturePanel() {
super(new BorderLayout()); super(new BorderLayout());
this.panel = new ScaledImagePanel(); this.panel = new ScaledImagePanel();
@@ -65,8 +65,6 @@ public final class CardPicturePanel extends JPanel implements CardContainer {
CardPicturePanel.this.update(); CardPicturePanel.this.update();
} }
}); });
this.setCard(c);
} }
public void update() { public void update() {

View File

@@ -62,7 +62,7 @@ public class QuestWinLoseCardViewer extends FPanel {
this.list = Collections.unmodifiableList(list); this.list = Collections.unmodifiableList(list);
this.jList = new FList(new ChooserListModel()); this.jList = new FList(new ChooserListModel());
this.detail = new CardDetailPanel(null); this.detail = new CardDetailPanel(null);
this.picture = new CardPicturePanel(null); this.picture = new CardPicturePanel();
this.scroller = new FScrollPane(this.jList); this.scroller = new FScrollPane(this.jList);
this.setCornerDiameter(20); this.setCornerDiameter(20);

View File

@@ -180,7 +180,9 @@ public enum VAntes implements IVDoc<CAntes> {
setLayout(new MigLayout("gap 0, insets 0, wrap")); setLayout(new MigLayout("gap 0, insets 0, wrap"));
add(new FLabel.Builder().fontSize(14).text(player.getName()) add(new FLabel.Builder().fontSize(14).text(player.getName())
.fontAlign(SwingConstants.CENTER).build(), "w 160px, h 20px"); .fontAlign(SwingConstants.CENTER).build(), "w 160px, h 20px");
add(new CardPicturePanel(c0), "w 160px, h 230px"); CardPicturePanel picPanel = new CardPicturePanel();
add(picPanel, "w 160px, h 230px");
picPanel.setCard(c0);
} }
/** @return {@link forge.game.player.Player} */ /** @return {@link forge.game.player.Player} */

View File

@@ -42,7 +42,7 @@ public enum VPicture implements IVDoc<CPicture> {
private final DragTab tab = new DragTab("Card Picture"); private final DragTab tab = new DragTab("Card Picture");
// Top-level containers // Top-level containers
private final CardPicturePanel pnlPicture = new CardPicturePanel(null); private final CardPicturePanel pnlPicture = new CardPicturePanel();
private final JLabel lblFlipcard = new JLabel( private final JLabel lblFlipcard = new JLabel(
FSkin.getIcon(FSkin.InterfaceIcons.ICO_FLIPCARD)); FSkin.getIcon(FSkin.InterfaceIcons.ICO_FLIPCARD));

View File

@@ -58,7 +58,7 @@ public class CardViewer extends JPanel {
this.list = Collections.unmodifiableList(list); this.list = Collections.unmodifiableList(list);
this.jList = new JList(new ChooserListModel()); this.jList = new JList(new ChooserListModel());
this.detail = new CardDetailPanel(null); this.detail = new CardDetailPanel(null);
this.picture = new CardPicturePanel(null); this.picture = new CardPicturePanel();
this.add(new JScrollPane(this.jList)); this.add(new JScrollPane(this.jList));
this.add(this.picture); this.add(this.picture);