Search in sources :

Example 1 with CardStockLinePanel

use of org.magic.gui.components.editor.CardStockLinePanel in project MtgDesktopCompanion by nicho92.

the class CardStockPanel method initMagicCardStock.

public void initMagicCardStock(MagicCard mc, MagicCollection col) {
    selectedCard = mc;
    selectedCol = col;
    content.removeAll();
    content.setLayout(layout);
    try {
        for (MagicCardStock stat : MTGControler.getInstance().getEnabledDAO().listStocks(mc, col)) {
            CardStockLinePanel pane = new CardStockLinePanel(mc, col);
            pane.setMagicCardState(stat);
            content.add(pane);
        }
        content.revalidate();
        content.repaint();
    } catch (Exception e) {
        MTGLogger.printStackTrace(e);
    }
}
Also used : CardStockLinePanel(org.magic.gui.components.editor.CardStockLinePanel) MagicCardStock(org.magic.api.beans.MagicCardStock)

Aggregations

MagicCardStock (org.magic.api.beans.MagicCardStock)1 CardStockLinePanel (org.magic.gui.components.editor.CardStockLinePanel)1