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.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) };
|
||||||
|
|||||||
@@ -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() {
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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} */
|
||||||
|
|||||||
@@ -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));
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user