Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/libsdl/event/SDLJoyAxisEvent.java


1   
2   
3   package org.libsdl.event;
4   
5   
6   /**
7    * The <code>SDLJoyAxisEvent</code> represents a joystick axis motion
8    * event.
9    * <p>
10   *
11   * @author  Eric Wittmann
12   * @version $revision$
13   */
14  public class SDLJoyAxisEvent extends SDLEvent
15  {
16      private short which;
17      private short axis;
18      private short value;
19  
20      /**
21       * Constructs a new <code>SDLJoyAxisEvent</code> with the given type, 
22       * which, axis, and value parameters.
23       * @param  type  Short - type of joystick axis motion event
24       * @param  which  Short - the which
25       * @param  axis  Short - the axis
26       * @param  value  Short - the value
27       */
28      public SDLJoyAxisEvent(short type, short which, short axis, short value) {
29          super(SDLEvent.SDL_JOYAXISMOTION, type);
30          this.which = which;
31          this.axis = axis;
32          this.value = value;
33      }
34  
35      /**
36      * Return the 'which' of this joystick axis motion event.
37      * @return  Short - the 'which'
38      */
39      public short getWhich() {
40          return which;
41      }
42      
43      /**
44      * Return the axis of this joystick axis motion event.
45      * @return  Short - the axis
46      */
47      public short getAxis() {
48          return axis;
49      }
50      
51      /**
52      * Return the value of this joystick axis motion event.
53      * @return  Short - the value
54      */
55      public short getValue() {
56          return value;
57      }
58  }