net.sf.magicproject.action.target
Class SingletonTarget

java.lang.Object
  extended by net.sf.magicproject.action.MAction
      extended by net.sf.magicproject.action.UserAction
          extended by net.sf.magicproject.action.Target
              extended by net.sf.magicproject.action.target.AbstractTarget
                  extended by net.sf.magicproject.action.target.SingletonTarget
All Implemented Interfaces:
ChoosenAction, Replayable, RollBackAction, StandardAction

public class SingletonTarget
extends AbstractTarget

Since:
0.93
Author:
Fabrice Daugan

Method Summary
 Targetable getAbstractTarget(ContextEventListener context, Ability ability)
          Return the targetable added by this action.
static SingletonTarget getInstance(TestOn on)
          Return the instance of this class corresponding to the given selecttion.
 java.lang.String toHtmlString(Ability ability, ContextEventListener context)
          Return the HTML code representing this action.
 java.lang.String toString(Ability ability)
          String representation of this action.
 
Methods inherited from class net.sf.magicproject.action.target.AbstractTarget
choose, disactivate, play, replay, simulate, toHtmlString
 
Methods inherited from class net.sf.magicproject.action.Target
getIdAction, rollback
 
Methods inherited from class net.sf.magicproject.action.UserAction
getActionName, manaNeeded, toHtmlString
 
Methods inherited from class net.sf.magicproject.action.MAction
equal, parseTest, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static SingletonTarget getInstance(TestOn on)
Return the instance of this class corresponding to the given selecttion.

Parameters:
on - the selection.
Returns:
the SingletonTarget instance

getAbstractTarget

public Targetable getAbstractTarget(ContextEventListener context,
                                    Ability ability)
Description copied from class: AbstractTarget
Return the targetable added by this action.

Specified by:
getAbstractTarget in class AbstractTarget
Parameters:
context - is the context attached to this action.
ability - is the ability owning this test. The card component of this ability should correspond to the card owning this test too.
Returns:
the targetable added by this action.

toString

public java.lang.String toString(Ability ability)
Description copied from class: MAction
String representation of this action.

Specified by:
toString in class AbstractTarget
Parameters:
ability - is the ability owning this test. The card component of this ability should correspond to the card owning this test too.
Returns:
action name.
See Also:
Object.toString()

toHtmlString

public java.lang.String toHtmlString(Ability ability,
                                     ContextEventListener context)
Description copied from class: MAction
Return the HTML code representing this action. If no picture is associated to this action, only text will be returned.

Overrides:
toHtmlString in class UserAction
Parameters:
ability - is the ability owning this test. The card component of this ability should correspond to the card owning this test too.
context - is the context attached to this action.
Returns:
the HTML code representing this action. If no picture is associated to this action, only text will be returned.
See Also:
MAction.toString(Ability), MAction.toHtmlString(Ability, int, ContextEventListener)


Copyright © 2003-2007 Magic-Project. All Rights Reserved.