Class ShortcutSpell
- java.lang.Object
-
- com.realtime.crossfire.jxclient.shortcuts.Shortcut
-
- com.realtime.crossfire.jxclient.shortcuts.ShortcutSpell
-
-
Constructor Summary
Constructors Constructor Description ShortcutSpell(@NotNull CommandQueue commandQueue, @NotNull Spell spell)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandisplaysFace(Face face)Returns whether this shortcut displays the given face.voiddispose()Releases all allocated resources.voidexecute()Executes the shortcut.@NotNull SpellgetSpell()Returns the spell to cast.@NotNull java.lang.StringgetTooltipText()Returns the current tooltip text.booleanisCast()Returns whether the spell should be "cast" or "invoked".voidsetCast(boolean cast)Sets whether the spell should be "cast" or "invoked".voidvisit(@NotNull ShortcutVisitor visitor)Calls aShortcutVisitor'svisit()function for this instance.-
Methods inherited from class com.realtime.crossfire.jxclient.shortcuts.Shortcut
addShortcutListener, fireModifiedEvent, removeShortcutListener
-
-
-
-
Constructor Detail
-
ShortcutSpell
public ShortcutSpell(@NotNull @NotNull CommandQueue commandQueue, @NotNull @NotNull Spell spell)Creates a new instance.- Parameters:
commandQueue- the command queue for executing commandsspell- the spell to cast
-
-
Method Detail
-
getSpell
@NotNull public @NotNull Spell getSpell()
Returns the spell to cast.- Returns:
- the spell
-
isCast
public boolean isCast()
Returns whether the spell should be "cast" or "invoked".- Returns:
truefor "cast", orfalsefor "invoke"
-
setCast
public void setCast(boolean cast)
Sets whether the spell should be "cast" or "invoked".- Parameters:
cast-truefor "cast", orfalsefor "invoke"
-
dispose
public void dispose()
Description copied from class:ShortcutReleases all allocated resources.
-
execute
public void execute()
Description copied from class:ShortcutExecutes the shortcut.
-
getTooltipText
@NotNull public @NotNull java.lang.String getTooltipText()
Description copied from class:ShortcutReturns the current tooltip text.- Specified by:
getTooltipTextin classShortcut- Returns:
- the tooltip text
-
visit
public void visit(@NotNull @NotNull ShortcutVisitor visitor)Description copied from class:ShortcutCalls aShortcutVisitor'svisit()function for this instance.
-
displaysFace
public boolean displaysFace(Face face)
Description copied from class:ShortcutReturns whether this shortcut displays the given face.- Specified by:
displaysFacein classShortcut- Parameters:
face- the face to check for- Returns:
- whether the face is displayed
-
-