mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
removed Card parameter from CardPicturePanel ctor (there was passed null in 4 cases out of 5)
This commit is contained in:
@@ -109,7 +109,7 @@ public class CardListViewer {
|
||||
this.list = Collections.unmodifiableList(list);
|
||||
this.jList = new JList(new ChooserListModel());
|
||||
this.detail = new CardDetailPanel(null);
|
||||
this.picture = new CardPicturePanel(null);
|
||||
this.picture = new CardPicturePanel();
|
||||
this.ok = new CloseAction(JOptionPane.OK_OPTION, "OK");
|
||||
|
||||
final Object[] options = new Object[] { new JButton(this.ok) };
|
||||
|
||||
@@ -49,7 +49,7 @@ public final class CardPicturePanel extends JPanel implements CardContainer {
|
||||
private final ScaledImagePanel panel;
|
||||
private BufferedImage currentImage;
|
||||
|
||||
public CardPicturePanel(final Card c) {
|
||||
public CardPicturePanel() {
|
||||
super(new BorderLayout());
|
||||
|
||||
this.panel = new ScaledImagePanel();
|
||||
@@ -65,8 +65,6 @@ public final class CardPicturePanel extends JPanel implements CardContainer {
|
||||
CardPicturePanel.this.update();
|
||||
}
|
||||
});
|
||||
|
||||
this.setCard(c);
|
||||
}
|
||||
|
||||
public void update() {
|
||||
|
||||
@@ -62,7 +62,7 @@ public class QuestWinLoseCardViewer extends FPanel {
|
||||
this.list = Collections.unmodifiableList(list);
|
||||
this.jList = new FList(new ChooserListModel());
|
||||
this.detail = new CardDetailPanel(null);
|
||||
this.picture = new CardPicturePanel(null);
|
||||
this.picture = new CardPicturePanel();
|
||||
this.scroller = new FScrollPane(this.jList);
|
||||
|
||||
this.setCornerDiameter(20);
|
||||
|
||||
@@ -180,7 +180,9 @@ public enum VAntes implements IVDoc<CAntes> {
|
||||
setLayout(new MigLayout("gap 0, insets 0, wrap"));
|
||||
add(new FLabel.Builder().fontSize(14).text(player.getName())
|
||||
.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} */
|
||||
|
||||
@@ -42,7 +42,7 @@ public enum VPicture implements IVDoc<CPicture> {
|
||||
private final DragTab tab = new DragTab("Card Picture");
|
||||
|
||||
// Top-level containers
|
||||
private final CardPicturePanel pnlPicture = new CardPicturePanel(null);
|
||||
private final CardPicturePanel pnlPicture = new CardPicturePanel();
|
||||
private final JLabel lblFlipcard = new JLabel(
|
||||
FSkin.getIcon(FSkin.InterfaceIcons.ICO_FLIPCARD));
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ public class CardViewer extends JPanel {
|
||||
this.list = Collections.unmodifiableList(list);
|
||||
this.jList = new JList(new ChooserListModel());
|
||||
this.detail = new CardDetailPanel(null);
|
||||
this.picture = new CardPicturePanel(null);
|
||||
this.picture = new CardPicturePanel();
|
||||
|
||||
this.add(new JScrollPane(this.jList));
|
||||
this.add(this.picture);
|
||||
|
||||
Reference in New Issue
Block a user