17 package com.generalrobotix.ui.view.tdview;
20 import java.awt.event.*;
33 @SuppressWarnings(
"serial")
36 public static final int DISABLE_MODE = 0;
37 public static final int OBJECT_MODE = 1;
38 public static final int FITTING_MODE = 2;
39 public static final int FROM_JOINT_MODE = 3;
40 public static final int INV_KINEMA_MODE = 4;
41 public static final int FITTING_START_MODE = 5;
45 ActionListener listener_;
50 JToggleButton objTrans_;
51 JToggleButton objRot_;
53 JToggleButton fitSrc_;
54 JToggleButton fitDist_;
56 JToggleButton fromJoint_;
57 JToggleButton invKinTrans_;
58 JToggleButton invKinRot_;
103 objTrans_.setPreferredSize(size);
104 objTrans_.setMaximumSize(size);
105 objTrans_.setMinimumSize(size);
107 group_.
add(objTrans_);
111 objRot_.setPreferredSize(size);
112 objRot_.setMaximumSize(size);
113 objRot_.setMinimumSize(size);
119 joint_.setPreferredSize(size);
120 joint_.setMaximumSize(size);
121 joint_.setMinimumSize(size);
129 fitSrc_.setPreferredSize(size);
130 fitSrc_.setMaximumSize(size);
131 fitSrc_.setMinimumSize(size);
137 fitDist_.setPreferredSize(size);
138 fitDist_.setMaximumSize(size);
139 fitDist_.setMinimumSize(size);
141 group_.
add(fitDist_);
145 fit_.setPreferredSize(size);
146 fit_.setMaximumSize(size);
147 fit_.setMinimumSize(size);
154 fromJoint_.setPreferredSize(size);
155 fromJoint_.setMaximumSize(size);
156 fromJoint_.setMinimumSize(size);
158 group_.
add(fromJoint_);
162 invKinRot_.setPreferredSize(size);
163 invKinRot_.setMaximumSize(size);
164 invKinRot_.setMinimumSize(size);
166 group_.
add(invKinRot_);
170 invKinTrans_.setPreferredSize(size);
171 invKinTrans_.setMaximumSize(size);
172 invKinTrans_.setMinimumSize(size);
174 group_.
add(invKinTrans_);
192 objTrans_.setEnabled(
false);
193 objRot_.setEnabled(
false);
194 joint_.setEnabled(
false);
195 fitSrc_.setEnabled(
false);
196 fitDist_.setEnabled(
false);
197 fit_.setEnabled(
false);
198 fromJoint_.setEnabled(
false);
199 invKinTrans_.setEnabled(
false);
200 invKinRot_.setEnabled(
false);
206 objTrans_.setEnabled(
true);
207 objRot_.setEnabled(
true);
208 joint_.setEnabled(
true);
209 fitSrc_.setEnabled(
true);
210 fitDist_.setEnabled(
true);
211 fit_.setEnabled(
false);
212 fromJoint_.setEnabled(
true);
213 invKinTrans_.setEnabled(
false);
214 invKinRot_.setEnabled(
false);
216 case FITTING_START_MODE:
222 objTrans_.setEnabled(
false);
223 objRot_.setEnabled(
false);
224 joint_.setEnabled(
false);
225 fitSrc_.setEnabled(
true);
226 fitDist_.setEnabled(
true);
227 fit_.setEnabled(
true);
228 fromJoint_.setEnabled(
false);
229 invKinTrans_.setEnabled(
false);
230 invKinRot_.setEnabled(
false);
232 case FROM_JOINT_MODE:
236 objTrans_.setEnabled(
false);
237 objRot_.setEnabled(
false);
238 joint_.setEnabled(
false);
239 fitSrc_.setEnabled(
false);
240 fitDist_.setEnabled(
false);
241 fit_.setEnabled(
false);
242 fromJoint_.setEnabled(
true);
243 invKinTrans_.setEnabled(
false);
244 invKinRot_.setEnabled(
false);
246 case INV_KINEMA_MODE:
250 objTrans_.setEnabled(
false);
251 objRot_.setEnabled(
false);
252 joint_.setEnabled(
false);
253 fitSrc_.setEnabled(
false);
254 fitDist_.setEnabled(
false);
255 fit_.setEnabled(
false);
256 fromJoint_.setEnabled(
true);
257 invKinTrans_.setEnabled(
true);
258 invKinRot_.setEnabled(
true);
264 ButtonModel model = group_.getSelection();
265 System.out.println(
"selectedButton=" + model.getActionCommand());
266 return model.getActionCommand();
static GUIAction FITTING_SRC
static final String get(String key)
static GUIAction INV_KINEMA_FROM
static GUIAction JOINT_ROTATION
String getActionCommand()
static GUIAction INV_KINEMA_TRANS
static GUIAction FITTING_DEST
static GUIAction OBJECT_TRANSLATION
static GUIAction OPERATION_DISABLE
static GUIAction INV_KINEMA_ROT
static GUIAction OBJECT_ROTATION