Package mage.cards.decks.importer

Examples of mage.cards.decks.importer.DeckImporter


        int ret = fcImportDeck.showOpenDialog(this);
        if (ret == JFileChooser.APPROVE_OPTION) {
            File file = fcImportDeck.getSelectedFile();
            try {
                setCursor(new Cursor(Cursor.WAIT_CURSOR));
                DeckImporter importer = DeckImporterUtil.getDeckImporter(file.getPath());
                if (importer != null) {
                    deck = Deck.load(importer.importDeck(file.getPath()));
                    String errors = importer.getErrors();
                    if (!errors.isEmpty()) {
                        JOptionPane.showMessageDialog(MageFrame.getDesktop(), errors, "Error importing deck", JOptionPane.ERROR_MESSAGE);
                    }
                } else {
                    JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Unknown deck format", "Error importing deck", JOptionPane.ERROR_MESSAGE);
View Full Code Here

TOP

Related Classes of mage.cards.decks.importer.DeckImporter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.