public class InteractiveGrabberObject extends GrabberObject
GrabberObject
with a Profile
instance which allows
Shortcut
to Method
bindings high-level
customization (see all the *Binding*() methods). Refer to
Profile.setBinding(Shortcut, String)
and
Profile.setBinding(Object, Shortcut, String)
for the type of
actions and method signatures that may be bound.Profile
Constructor and Description |
---|
InteractiveGrabberObject()
Empty constructor.
|
InteractiveGrabberObject(Agent agent)
Constructs and adds this interactive-grabber object to the agent pool.
|
InteractiveGrabberObject(InputHandler inputHandler)
Constructs and adds this interactive-grabber object to all agents belonging to the input handler.
|
Modifier and Type | Method and Description |
---|---|
String |
action(Shortcut shortcut)
Same as
return profile.action(key) . |
boolean |
hasBinding(Shortcut shortcut)
Same as
return profile.hasBinding(shortcut) . |
String |
info()
Returns a description of all the bindings this grabber holds.
|
String |
info(Class<? extends Shortcut> cls)
Same as
profile.info(cls) . |
boolean |
isActionBound(String action)
Same as
return profile.isActionBound(action) . |
void |
performInteraction(BogusEvent event)
Same as
profile.handle(event) . |
void |
removeBinding(Shortcut shortcut)
Same as
profile.removeBinding(shortcut) . |
void |
removeBindings()
Same as
profile.removeBindings() . |
void |
removeBindings(Class<? extends Shortcut> cls)
Same as
profile.removeBindings(cls) . |
void |
setBinding(Object object,
Shortcut shortcut,
String action)
Same as
profile.setBinding(object, shortcut, action) . |
void |
setBinding(Shortcut shortcut,
String action)
Same as
profile.setBinding(shortcut, action) . |
void |
setBindings(InteractiveGrabberObject otherGrabber)
Same as
profile.set(otherGrabber.profile) . |
checkIfGrabsInput, checkIfGrabsInput, grabsInput, grabsInput
public InteractiveGrabberObject()
public InteractiveGrabberObject(Agent agent)
Agent.grabbers()
public InteractiveGrabberObject(InputHandler inputHandler)
InputHandler.agents()
public void performInteraction(BogusEvent event)
profile.handle(event)
.performInteraction
in interface Grabber
performInteraction
in class GrabberObject
Profile.handle(BogusEvent)
public void setBinding(Shortcut shortcut, String action)
profile.setBinding(shortcut, action)
.
Low-level profile handling routine. Call this method to set a binding for a custom bogus event, like this:
grabber.setBinding(new CustomShortcut(mask, CustomAgent.CUSTOM_ID), "customBehavior")
.
Profile.setBinding(Shortcut, String)
,
BogusEvent
,
Shortcut
public void setBinding(Object object, Shortcut shortcut, String action)
profile.setBinding(object, shortcut, action)
.
Low-level profile handling routine. Call this method to set a binding for a custom bogus event, like this:
grabber.setBinding(object, new CustomShortcut(mask, CustomAgent.CUSTOM_ID), "customBehavior")
.
public void setBindings(InteractiveGrabberObject otherGrabber)
profile.set(otherGrabber.profile)
.Profile.set(Profile)
public boolean hasBinding(Shortcut shortcut)
return profile.hasBinding(shortcut)
.
Low-level profile handling routine. Call this method to query for a binding from a custom bogus event, like this:
grabber.hasBinding(object, new CustomShortcut(mask, CustomAgent.CUSTOM_ID)
.
Profile.hasBinding(Shortcut)
,
BogusEvent
,
Shortcut
public void removeBinding(Shortcut shortcut)
profile.removeBinding(shortcut)
.
Low-level profile handling routine. Call this method to remove a binding for a custom bogus event, like this:
grabber.removeBinding(new CustomShortcut(mask, CustomAgent.CUSTOM_ID)
.
Profile.removeBinding(Shortcut)
,
BogusEvent
,
Shortcut
public void removeBindings()
profile.removeBindings()
.Profile.removeBindings()
public void removeBindings(Class<? extends Shortcut> cls)
profile.removeBindings(cls)
.Profile.removeBindings(Class)
public String info(Class<? extends Shortcut> cls)
profile.info(cls)
.Profile.info(Class)
public String info()
public String action(Shortcut shortcut)
return profile.action(key)
.Profile.action(Shortcut)
public boolean isActionBound(String action)
return profile.isActionBound(action)
.Profile.isActionBound(String)
Processing Library proscene by Jean Pierre Charalambos. (c) 2014-2017 National University of Colombia