Class AbstractKeyEvent
- java.lang.Object
-
- org.dreambot.api.input.event.AbstractEvent
-
- org.dreambot.api.input.event.impl.keyboard.type.AbstractKeyEvent
-
- All Implemented Interfaces:
java.lang.Runnable
- Direct Known Subclasses:
HoldKey
,PressKey
,ReleaseKey
,TypeKey
public abstract class AbstractKeyEvent extends AbstractEvent
Abstract key event class to clean up implementations
-
-
Constructor Summary
Constructors Constructor Description AbstractKeyEvent()
AbstractKeyEvent(char character, KeyLocation location)
AbstractKeyEvent(Key key, KeyLocation location)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Condition
completed()
AbstractCondition
used to determine if current event is complete.boolean
equals(java.lang.Object o)
Condition
failed()
AbstractCondition
used to determine if current event has failed.char
getCharacter()
java.awt.event.KeyEvent
getGenerated()
Key
getKey()
KeyLocation
getLocation()
int
hashCode()
boolean
isCompleted()
void
setCharacter(char character)
void
setCompleted(boolean completed)
void
setGenerated(java.awt.event.KeyEvent generated)
void
setKey(Key key)
void
setLocation(KeyLocation location)
java.lang.String
toString()
-
-
-
Constructor Detail
-
AbstractKeyEvent
public AbstractKeyEvent()
-
AbstractKeyEvent
public AbstractKeyEvent(char character, KeyLocation location)
-
AbstractKeyEvent
public AbstractKeyEvent(Key key, KeyLocation location)
-
-
Method Detail
-
completed
public Condition completed()
Description copied from class:AbstractEvent
AbstractCondition
used to determine if current event is complete.- Specified by:
completed
in classAbstractEvent
- Returns:
Condition
used to determine if current event has completed successfully.
-
failed
public Condition failed()
Description copied from class:AbstractEvent
AbstractCondition
used to determine if current event has failed.- Specified by:
failed
in classAbstractEvent
- Returns:
Condition
used to determine if current event has failed.
-
isCompleted
public boolean isCompleted()
-
getKey
public Key getKey()
-
getLocation
public KeyLocation getLocation()
-
getCharacter
public char getCharacter()
-
getGenerated
public java.awt.event.KeyEvent getGenerated()
-
setCompleted
public void setCompleted(boolean completed)
-
setKey
public void setKey(Key key)
-
setLocation
public void setLocation(KeyLocation location)
-
setCharacter
public void setCharacter(char character)
-
setGenerated
public void setGenerated(java.awt.event.KeyEvent generated)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-