|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.magicproject.deckbuilder.DeckReader
public final class DeckReader
| Method Summary | |
|---|---|
static void |
fillZone(Deck deck,
java.io.FileInputStream dbFile,
MZone zone,
Player owner)
Fill player's zone with the cards found in InputFile |
static Deck |
getDeck(java.awt.Component parentComponent,
java.lang.String deckFile)
Return the deck component corresponding to the given file. |
static Deck |
getDeck(MInputStream deckStream)
Return the deck component corresponding to the given stream. |
static void |
readAvailableCards(MListModel<MCardCompare> cardNames)
Read available cards from file and add them to the specified cardNames |
static boolean |
validateDeck(java.awt.Component parentComponent,
Deck deck,
DeckConstraint deckConstraint)
Validate a deck read from the given stream. |
static boolean |
validateDeck(java.awt.Component parentComponent,
Deck deck,
java.lang.String deckConstraint)
Validate a deck read from the given stream. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Deck getDeck(MInputStream deckStream)
deckStream - the deck stream.
public static Deck getDeck(java.awt.Component parentComponent,
java.lang.String deckFile)
throws java.io.FileNotFoundException
parentComponent - determines the Frame in which the dialog is
displayed; if null, or if the
parentComponent has no Frame, a
default Frame is useddeckFile - the deck file.
java.io.FileNotFoundException
public static void fillZone(Deck deck,
java.io.FileInputStream dbFile,
MZone zone,
Player owner)
throws java.io.IOException
deck - the deck to add.dbFile - opened file read containing the available cardszone - the destination zone.owner - the player owning the created cards.
java.io.IOException - If some other I/O error occurspublic static void readAvailableCards(MListModel<MCardCompare> cardNames)
cardNames
cardNames - to this list method add card names
public static boolean validateDeck(java.awt.Component parentComponent,
Deck deck,
java.lang.String deckConstraint)
throws java.io.IOException
parentComponent - determines the Frame in which the dialog is
displayed; if null, or if the
parentComponent has no Frame, a
default Frame is useddeck - deckConstraint - the deck constraint name.
true if the read deck is valid.
java.io.IOException - If some other I/O error occurs
public static boolean validateDeck(java.awt.Component parentComponent,
Deck deck,
DeckConstraint deckConstraint)
throws java.io.IOException
parentComponent - determines the Frame in which the dialog is
displayed; if null, or if the
parentComponent has no Frame, a
default Frame is useddeck - deckConstraint - the deck constraint name.
true if the read deck is valid.
java.io.IOException - If some other I/O error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||