View Javadoc
1   package org.newdawn.slick.util;
2   
3   import org.newdawn.slick.Input;
4   import org.newdawn.slick.InputListener;
5   
6   /**
7    * An implementation of the InputListener interface.
8    *
9    * @author kevin
10   */
11  public abstract class AbstractInputAdapter implements InputListener {
12      /** A flag to indicate if we're accepting input here. */
13      private boolean acceptingInput = true;
14  
15      /**
16       * @see org.newdawn.slick.InputListener#controllerButtonPressed(int, int)
17       */
18      @Override
19      public void controllerButtonPressed(int controller, int button){}
20  
21      /**
22       * @see org.newdawn.slick.InputListener#controllerButtonReleased(int, int)
23       */
24      @Override
25      public void controllerButtonReleased(int controller, int button){}
26  
27      /**
28       * @see org.newdawn.slick.InputListener#controllerDownPressed(int)
29       */
30      @Override
31      public void controllerDownPressed(int controller){}
32  
33      /**
34       * @see org.newdawn.slick.InputListener#controllerDownReleased(int)
35       */
36      @Override
37      public void controllerDownReleased(int controller){}
38  
39      /**
40       * @see org.newdawn.slick.InputListener#controllerLeftPressed(int)
41       */
42      @Override
43      public void controllerLeftPressed(int controller){}
44  
45      /**
46       * @see org.newdawn.slick.InputListener#controllerLeftReleased(int)
47       */
48      @Override
49      public void controllerLeftReleased(int controller){}
50  
51      /**
52       * @see org.newdawn.slick.InputListener#controllerRightPressed(int)
53       */
54      @Override
55      public void controllerRightPressed(int controller){}
56  
57      /**
58       * @see org.newdawn.slick.InputListener#controllerRightReleased(int)
59       */
60      @Override
61      public void controllerRightReleased(int controller){}
62  
63      /**
64       * @see org.newdawn.slick.InputListener#controllerUpPressed(int)
65       */
66      @Override
67      public void controllerUpPressed(int controller){}
68  
69      /**
70       * @see org.newdawn.slick.InputListener#controllerUpReleased(int)
71       */
72      @Override
73      public void controllerUpReleased(int controller){}
74  
75      /**
76       * @see org.newdawn.slick.InputListener#inputEnded()
77       */
78      @Override
79      public void inputEnded(){}
80  
81      /**
82       * @see org.newdawn.slick.InputListener#isAcceptingInput()
83       */
84      @Override
85      public boolean isAcceptingInput() {
86          return acceptingInput;
87      }
88  
89      /**
90       * Indicate if we should be accepting input of any sort.
91       *
92       * @param acceptingInput True if we should accept input
93       */
94      public void setAcceptingInput(boolean acceptingInput) {
95          this.acceptingInput = acceptingInput;
96      }
97  
98      /**
99       * @see org.newdawn.slick.InputListener#keyPressed(int, char)
100      */
101     @Override
102     public void keyPressed(int key, char c){}
103 
104     /**
105      * @see org.newdawn.slick.InputListener#keyReleased(int, char)
106      */
107     @Override
108     public void keyReleased(int key, char c){}
109 
110     /**
111      * @see org.newdawn.slick.InputListener#mouseMoved(int, int, int, int)
112      */
113     @Override
114     public void mouseMoved(int oldX, int oldY, int newX, int newY){}
115 
116     /**
117      * @see org.newdawn.slick.InputListener#mousePressed(int, int, int)
118      */
119     @Override
120     public void mousePressed(int button, int x, int y){}
121 
122     /**
123      * @see org.newdawn.slick.InputListener#mouseReleased(int, int, int)
124      */
125     @Override
126     public void mouseReleased(int button, int x, int y){}
127 
128     /**
129      * @see org.newdawn.slick.InputListener#mouseWheelMoved(int)
130      */
131     @Override
132     public void mouseWheelMoved(int change){}
133 
134     /**
135      * @see org.newdawn.slick.InputListener#setInput(org.newdawn.slick.Input)
136      */
137     @Override
138     public void setInput(Input input){}
139 
140     /**
141      * @see org.newdawn.slick.InputListener#mouseClicked(int, int, int, int)
142      */
143     @Override
144     public void mouseClicked(int button, int x, int y, int clickCount){}
145 
146 
147     /**
148      * @see org.newdawn.slick.InputListener#mouseDragged(int, int, int, int)
149      */
150     @Override
151     public void mouseDragged(int oldX, int oldY, int newX, int newY){}
152 
153     /**
154      * @see org.newdawn.slick.ControlledInputReceiver#inputStarted()
155      */
156     @Override
157     public void inputStarted(){}
158 }