java.lang.Object com.realtime.crossfire.jxclient.spells.CurrentSpellManager
public class CurrentSpellManager
Manages the currently selected spell.
Field Summary | |
---|---|
private Spell |
currentSpell
The currently selected spell, or null . |
private java.util.Collection<CurrentSpellManagerListener> |
listeners
The listeners to notify object changed spell objects. |
Constructor Summary | |
---|---|
CurrentSpellManager()
|
Method Summary | |
---|---|
void |
addSpellListener(CurrentSpellManagerListener listener)
Add a spell listener to be notified if the current spell object has changed. |
Spell |
getCurrentSpell()
Return the currently selected spell object. |
void |
removeSpellListener(CurrentSpellManagerListener listener)
Remove a spell listener. |
void |
setCurrentSpell(Spell spell)
Set the currently selected spell. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Nullable private Spell currentSpell
null
.
@NotNull private final java.util.Collection<CurrentSpellManagerListener> listeners
Constructor Detail |
---|
public CurrentSpellManager()
Method Detail |
---|
public void addSpellListener(@NotNull CurrentSpellManagerListener listener)
listener
- The listener to add.@Nullable public Spell getCurrentSpell()
null
if no spell is selected.public void removeSpellListener(@NotNull CurrentSpellManagerListener listener)
listener
- The listener to remove.public void setCurrentSpell(@Nullable Spell spell)
spell
- The spell to selected.