public class ControllerDirectionControl extends ControllerControl
A ControllerDirectionControl is a ControllerControl that represents a Direction - up, down, left, or right - in which the primary axes of a game controller can be moved. A controller's primary axes are typically those of a directional pad or left control stick. A ControllerDirectionControl is considered pressed when the axes are moved into its Direction, relative to their neutral position, and released when they are moved out of its Direction. The axes can be in a pair of adjacent Directions, such as up and right, at the same time.
DirectionMAX_CONTROLLERS| Constructor and Description |
|---|
ControllerDirectionControl(int controllerNum,
Direction direction)
Constructs a ControllerDirectionControl that represents the specified
Direction on the primary axes of the controller with the specified
number.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Returns whether the specified object is a ControllerDirectionControl that
is equal to this ControllerDirectionControl.
|
Direction |
getDirection()
Returns this ControllerButtonControl's Direction.
|
java.lang.String |
getName()
Returns a short, descriptive, and unique String name for this Control.
|
int |
hashCode() |
getControllerNumgetControlpublic ControllerDirectionControl(int controllerNum,
Direction direction)
throws InvalidControlException
controllerNum - The number of this ControllerDirectionControl's
controllerdirection - This ControllerDirectionControl's DirectionInvalidControlException - if the specified controller number is
invalid or the specified Direction is nullpublic final int hashCode()
hashCode in class java.lang.Objectpublic final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The object to be compared with this ControllerDirectionControlpublic java.lang.String getName()
Controlpublic final Direction getDirection()