|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.magicproject.event.MEventListener net.sf.magicproject.event.TriggeredEvent
public abstract class TriggeredEvent
MEventTriggered.java Created on 2 févr. 2004
Field Summary | |
---|---|
static IntegerWrapper |
replacement
The selected replacement ability to use |
Fields inherited from class net.sf.magicproject.event.MEventListener |
---|
CAN_I_CAST_ABILITIES, card, REPLACEMENT_ABILITIES, test, TRIGGRED_ABILITIES |
Constructor Summary | |
---|---|
TriggeredEvent(java.io.InputStream inputFile,
MCard card)
Create an instance of MEventTriggered by reading a file Offset's file must pointing on the first byte of this event Structure of InputStream : Data[size] idZone [1] test [...] |
Method Summary | |
---|---|
abstract MEventListener |
clone(MCard card)
Return a copy of this with the specified owner |
abstract Event |
getIdEvent()
Return the idEvent of this event |
boolean |
isActivated()
Indicates if this event corresponds to an activated ability |
boolean |
isTriggered()
Indicates if this event corresponds to a triggered ability |
void |
registerToManager(Ability ability)
register this event to the event manager |
void |
removeFromManager(Ability ability)
remove from the manager this event if doesn't match with the new context |
java.lang.String |
toHtmlString(Ability ability,
ContextEventListener context)
Return the HTML code representing this ability. |
Methods inherited from class net.sf.magicproject.event.MEventListener |
---|
appendOr, getIdPlace, isWellPlaced, isWellPlaced, reCheck, reCheck, reset |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static IntegerWrapper replacement
Constructor Detail |
---|
public TriggeredEvent(java.io.InputStream inputFile, MCard card) throws java.io.IOException
inputFile
- is the file containing this eventcard
- is the card owning this event
java.io.IOException
- if error occured during the reading process from the specified
input streamMethod Detail |
---|
public abstract MEventListener clone(MCard card)
MEventListener
clone
in class MEventListener
card
- is the card of the ability of this event
public abstract Event getIdEvent()
MEventListener
getIdEvent
in class MEventListener
public void registerToManager(Ability ability)
RegisterableEvent
registerToManager
in interface RegisterableEvent
registerToManager
in class MEventListener
ability
- owning this eventpublic void removeFromManager(Ability ability)
RegisterableEvent
removeFromManager
in interface RegisterableEvent
removeFromManager
in class MEventListener
ability
- owning this eventpublic final boolean isActivated()
MEventListener
isActivated
in class MEventListener
public final boolean isTriggered()
MEventListener
isTriggered
in class MEventListener
public java.lang.String toHtmlString(Ability ability, ContextEventListener context)
MEventListener
toHtmlString
in class MEventListener
ability
- is the attached ability.context
- the context needed by event activated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |