Constructor and Description |
---|
ShortcutSpell(@NotNull CommandQueue commandQueue,
@NotNull Spell spell)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
displaysFace(Face face)
Returns whether this shortcut displays the given face.
|
void |
dispose()
Releases all allocated resources.
|
void |
execute()
Executes the shortcut.
|
@NotNull Spell |
getSpell()
Returns the spell to cast.
|
@NotNull java.lang.String |
getTooltipText()
Returns the current tooltip text.
|
boolean |
isCast()
Returns whether the spell should be "cast" or "invoked".
|
void |
setCast(boolean cast)
Sets whether the spell should be "cast" or "invoked".
|
void |
visit(@NotNull ShortcutVisitor visitor)
Calls a
ShortcutVisitor 's visit() function for this
instance. |
addShortcutListener, fireModifiedEvent, removeShortcutListener
public ShortcutSpell(@NotNull @NotNull CommandQueue commandQueue, @NotNull @NotNull Spell spell)
commandQueue
- the command queue for executing commandsspell
- the spell to cast@NotNull public @NotNull Spell getSpell()
public boolean isCast()
true
for "cast", or false
for "invoke"public void setCast(boolean cast)
cast
- true
for "cast", or false
for "invoke"public void dispose()
Shortcut
public void execute()
Shortcut
@NotNull public @NotNull java.lang.String getTooltipText()
Shortcut
getTooltipText
in class Shortcut
public void visit(@NotNull @NotNull ShortcutVisitor visitor)
Shortcut
ShortcutVisitor
's visit()
function for this
instance.public boolean displaysFace(Face face)
Shortcut
displaysFace
in class Shortcut
face
- the face to check for