Joystick.java
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13: package xeij;
14:
15: import java.awt.event.*;
16: import javax.swing.*;
17:
18:
19:
20: public abstract class Joystick {
21:
22: protected static final int DELAY_MIN = 10;
23: protected static final int DELAY_MAX = 1000;
24: protected static final int DELAY_STEP = 10;
25: protected static final int INTERVAL_MIN = 10;
26: protected static final int INTERVAL_MAX = 2000;
27: protected static final int INTERVAL_STEP = 10;
28:
29: protected int number;
30: protected String id;
31: protected String nameEn;
32: protected String nameJa;
33: protected JComponent configurationPanel;
34:
35:
36:
37: public Joystick () {
38: configurationPanel = null;
39: }
40:
41:
42:
43: public JComponent getConfigurationPanel () {
44: if (configurationPanel != null) {
45: return configurationPanel;
46: }
47: return configurationPanel = new JPanel ();
48: }
49:
50:
51:
52: public void tini () {
53: }
54:
55:
56:
57: public void reset () {
58: }
59:
60:
61:
62: public String getId () {
63: return id;
64: }
65:
66:
67:
68: public String getNameEn () {
69: return nameEn;
70: }
71:
72:
73:
74: public String getNameJa () {
75: return nameJa;
76: }
77:
78:
79:
80:
81:
82: public boolean input (KeyEvent ke, boolean pressed) {
83: return false;
84: }
85:
86:
87:
88:
89: public void setPin6 (int pin6) {
90: }
91:
92:
93:
94:
95: public void setPin7 (int pin7) {
96: }
97:
98:
99:
100:
101: public void setPin8 (int pin8) {
102: }
103:
104:
105:
106:
107: public int readByte () {
108: return 0xff;
109: }
110:
111:
112:
113:
114: public void writeByte (int d) {
115: }
116:
117: }