|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.magicproject.zone.ZoneManager
public class ZoneManager
Field Summary | |
---|---|
java.util.List<ExpandableZone> |
additionalZones
additional zones of this player |
DelayedBuffer |
delayedBuffer
delayed buffer of this player (DBZ) |
static ExpandableZone |
expandedZone
This is the current expanded zone. |
Hand |
hand
hand of this player |
Play |
play
play zone of this player |
static Side |
side
shared side of players |
static Stack |
stack
shared stack of players |
TriggeredBuffer |
triggeredBuffer
triggered buffer of this player (TBZ) |
Constructor Summary | |
---|---|
ZoneManager(int idPlayer,
javax.swing.JScrollPane handSPanel,
javax.swing.JScrollPane triggeredSPanel,
javax.swing.JScrollPane delayedSPanel,
javax.swing.JPanel additionalZonesPanel)
Creates an ew instance of ZoneManager |
Method Summary | |
---|---|
void |
checkAllCardsOf(Test test,
java.util.List<Targetable> list,
Ability ability)
Checks all cards corresponding to this constraints |
int |
countAllCardsOf(Test test,
Ability ability)
Checks all cards corresponding to the specified constraints |
int |
countAllCardsOf(Test test,
Ability ability,
int limit,
boolean canBePreempted)
Checks all cards corresponding to the specified constraints. |
MZone |
getContainer(int idZone)
return the container corresponding to the specified idZone |
java.util.List<MZone> |
getValidTargetZones()
Return All available zones. |
static java.lang.String |
getZoneName(int idZone)
Return the zone name corresponding to the given zone id. |
void |
giveCards(Deck deck,
java.io.FileInputStream dbFile)
Fill the player's init zone with cards found in the given InputFile |
static void |
init(javax.swing.JScrollPane sideSPanel,
javax.swing.JScrollPane stackSPanel)
|
static void |
initTbs(java.io.InputStream inputStream)
Structure of stream : Data[size] play sectors [ZoneSector[]] additional zones [ZoneConfiguration[]] default Zone id [int] |
void |
reset()
Set the zone attribut to their default value, and remove all components |
static void |
saveSettings()
Save editable string settings of zones. |
static void |
updateLookAndFeel()
Update some optimization, painter,... etc depending on the current Look And Feel. |
static void |
updateReversed()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final java.util.List<ExpandableZone> additionalZones
public static ExpandableZone expandedZone
public Hand hand
public Play play
public TriggeredBuffer triggeredBuffer
public DelayedBuffer delayedBuffer
public static Stack stack
public static Side side
Constructor Detail |
---|
public ZoneManager(int idPlayer, javax.swing.JScrollPane handSPanel, javax.swing.JScrollPane triggeredSPanel, javax.swing.JScrollPane delayedSPanel, javax.swing.JPanel additionalZonesPanel)
idPlayer
- id of associated playerhandSPanel
- triggeredSPanel
- delayedSPanel
- additionalZonesPanel
- Method Detail |
---|
public static void initTbs(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- the stream containing the layout configuration of this zone for a
specified layout
java.io.IOException
- error during the configuration read.public MZone getContainer(int idZone)
idZone
- idplace of matched container
public static void updateReversed()
public void reset()
public int countAllCardsOf(Test test, Ability ability)
test
- applied to count valid cardsability
- is the ability owning this test. The card component of this
ability should correspond to the card owning this test too.
public int countAllCardsOf(Test test, Ability ability, int limit, boolean canBePreempted)
test
- applied to count valid cardsability
- is the ability owning this test. The card component of this
ability should correspond to the card owning this test too.limit
- is the desired count.canBePreempted
- true
if the valid targets can be derterminated
before runtime.
limit
.public static void updateLookAndFeel()
public void checkAllCardsOf(Test test, java.util.List<Targetable> list, Ability ability)
test
- applied to count valid cardslist
- the list containing the founded cardsability
- is the ability owning this test. The card component of this
ability should correspond to the card owning this test too.public void giveCards(Deck deck, java.io.FileInputStream dbFile) throws java.io.IOException
deck
- the deck of this player.dbFile
- opened file read containing the available cards
java.io.IOException
- If some other I/O error occurspublic static void init(javax.swing.JScrollPane sideSPanel, javax.swing.JScrollPane stackSPanel)
sideSPanel
- stackSPanel
- public static void saveSettings()
public static java.lang.String getZoneName(int idZone)
idZone
- the zone id.
public java.util.List<MZone> getValidTargetZones()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |