public abstract class Shortcut
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private EventListenerList2<ShortcutListener> |
listeners
The listeners to be notified.
|
Constructor and Description |
---|
Shortcut() |
Modifier and Type | Method and Description |
---|---|
void |
addShortcutListener(ShortcutListener listener)
Registers a shortcut listener.
|
abstract boolean |
displaysFace(Face face)
Returns whether this shortcut displays the given face.
|
abstract void |
dispose()
Releases all allocated resources.
|
abstract void |
execute()
Executes the shortcut.
|
protected void |
fireModifiedEvent()
Notifies all listeners about a modification.
|
abstract java.lang.String |
getTooltipText()
Returns the current tooltip text.
|
void |
removeShortcutListener(ShortcutListener listener)
Unregisters a shortcut listener.
|
abstract void |
visit(ShortcutVisitor visitor)
Calls a
ShortcutVisitor 's visit() function for this
instance. |
@NotNull private final EventListenerList2<ShortcutListener> listeners
public void addShortcutListener(@NotNull ShortcutListener listener)
listener
- the listener to registerpublic abstract boolean displaysFace(Face face)
face
- the face to check forpublic abstract void dispose()
public abstract void execute()
protected void fireModifiedEvent()
@NotNull public abstract java.lang.String getTooltipText()
public void removeShortcutListener(@NotNull ShortcutListener listener)
listener
- the listener to unregisterpublic abstract void visit(@NotNull ShortcutVisitor visitor)
ShortcutVisitor
's visit()
function for this
instance.visitor
- the visitor to call