Package ghidra.framework.options
Class ActionTrigger
java.lang.Object
ghidra.framework.options.ActionTrigger
Represents a way to trigger an action in the system. A trigger is based on a key stroke, a mouse
binding or both.
-
Constructor Summary
ConstructorDescriptionActionTrigger
(MouseBinding mouseBinding) Creates an action trigger with the given mouse binding.ActionTrigger
(KeyStroke keyStroke) Creates an action trigger with the given key stroke.ActionTrigger
(KeyStroke keyStroke, MouseBinding mouseBinding) A convenience constructor for creating an action trigger with either or both values set. -
Method Summary
Modifier and TypeMethodDescriptionstatic ActionTrigger
Creates a new action trigger by reading data from the given save state.boolean
static ActionTrigger
getActionTrigger
(String string) Creates a new action trigger from the given string.int
hashCode()
toString()
void
writeState
(SaveState saveState) Writes this action trigger's data into the given save state.
-
Constructor Details
-
ActionTrigger
Creates an action trigger with the given key stroke.- Parameters:
keyStroke
- the key stroke
-
ActionTrigger
Creates an action trigger with the given mouse binding.- Parameters:
mouseBinding
- the mouse binding
-
ActionTrigger
A convenience constructor for creating an action trigger with either or both values set. At least one of the values must be non-null.- Parameters:
keyStroke
- the key stroke; may be nullmouseBinding
- the mouse binding; may be null
-
-
Method Details
-
getKeyStroke
-
getMouseBinding
-
toString
-
getActionTrigger
Creates a new action trigger from the given string. The string is expected to be the result of callingtoString()
on an instance of this class.- Parameters:
string
- the string to parse.- Returns:
- the new instance or null of the string is invalid.
-
writeState
Writes this action trigger's data into the given save state.- Parameters:
saveState
- the save state
-
create
Creates a new action trigger by reading data from the given save state.- Parameters:
saveState
- the save state- Returns:
- the new action trigger
-
hashCode
public int hashCode() -
equals
-