Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.spells.CurrentSpellManager Class Reference

Manages the currently selected spell. More...

+ Collaboration diagram for com.realtime.crossfire.jxclient.spells.CurrentSpellManager:

Public Member Functions

void addSpellListener (@NotNull final CurrentSpellManagerListener listener)
 Adds a spell listener to be notified if the current spell object has changed. More...
 
Spell getCurrentSpell ()
 Returns the currently selected spell object. More...
 
void removeSpellListener (@NotNull final CurrentSpellManagerListener listener)
 Removes a spell listener. More...
 
void setCurrentSpell (@Nullable final Spell spell)
 Sets the currently selected spell. More...
 

Private Attributes

Spell currentSpell
 The currently selected spell, or. More...
 
final EventListenerList2< CurrentSpellManagerListenerlisteners = new EventListenerList2<>()
 The listeners to notify object changed spell objects. More...
 

Detailed Description

Manages the currently selected spell.

Author
Andreas Kirschbaum

Definition at line 32 of file CurrentSpellManager.java.

Member Function Documentation

◆ addSpellListener()

void com.realtime.crossfire.jxclient.spells.CurrentSpellManager.addSpellListener ( @NotNull final CurrentSpellManagerListener  listener)

Adds a spell listener to be notified if the current spell object has changed.

Parameters
listenerthe listener to add

Definition at line 75 of file CurrentSpellManager.java.

References com.realtime.crossfire.jxclient.util.EventListenerList2< T extends EventListener >.add().

Referenced by com.realtime.crossfire.jxclient.gui.label.GUISpellLabel.GUISpellLabel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCurrentSpell()

Spell com.realtime.crossfire.jxclient.spells.CurrentSpellManager.getCurrentSpell ( )

Returns the currently selected spell object.

Returns
the spell object, or
null
if no spell is selected

Definition at line 66 of file CurrentSpellManager.java.

References com.realtime.crossfire.jxclient.spells.CurrentSpellManager.currentSpell.

Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.button3Clicked().

+ Here is the caller graph for this function:

◆ removeSpellListener()

void com.realtime.crossfire.jxclient.spells.CurrentSpellManager.removeSpellListener ( @NotNull final CurrentSpellManagerListener  listener)

Removes a spell listener.

Parameters
listenerthe listener to remove

Definition at line 83 of file CurrentSpellManager.java.

References com.realtime.crossfire.jxclient.util.EventListenerList2< T extends EventListener >.remove().

Referenced by com.realtime.crossfire.jxclient.gui.label.GUISpellLabel.dispose().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCurrentSpell()

void com.realtime.crossfire.jxclient.spells.CurrentSpellManager.setCurrentSpell ( @Nullable final Spell  spell)

Sets the currently selected spell.

Parameters
spellthe spell to selected

Definition at line 50 of file CurrentSpellManager.java.

Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemSpell.button1Clicked(), com.realtime.crossfire.jxclient.gui.item.GUIItemSpell.button2Clicked(), and com.realtime.crossfire.jxclient.gui.item.GUIItemSpell.button3Clicked().

+ Here is the caller graph for this function:

Member Data Documentation

◆ currentSpell

Spell com.realtime.crossfire.jxclient.spells.CurrentSpellManager.currentSpell
private

The currently selected spell, or.

null

.

Definition at line 44 of file CurrentSpellManager.java.

Referenced by com.realtime.crossfire.jxclient.spells.CurrentSpellManager.getCurrentSpell().

◆ listeners

final EventListenerList2<CurrentSpellManagerListener> com.realtime.crossfire.jxclient.spells.CurrentSpellManager.listeners = new EventListenerList2<>()
private

The listeners to notify object changed spell objects.

Definition at line 38 of file CurrentSpellManager.java.


The documentation for this class was generated from the following file: