18 package com.generalrobotix.ui;
22 import org.eclipse.jface.action.Action;
23 import org.eclipse.jface.dialogs.MessageDialog;
24 import org.eclipse.swt.SWT;
25 import org.eclipse.swt.widgets.FileDialog;
26 import org.eclipse.osgi.util.NLS;
30 @SuppressWarnings(
"serial")
36 private Object value_ =
null;
40 protected String clipValue_ =
"";
42 protected static final String[] modeComboItem_ =
new String[] {
"Torque",
"HighGain" };
43 protected static final String[] jointTypeComboItem_ =
new String[] {
"fixed",
"rotate",
"free",
"slide" };
44 protected static final String[] methodComboItem_ =
new String[] {
"EULER",
"RUNGE_KUTTA" };
54 Action
item =
new Action(){
55 public String getText(){
62 if( MessageDialog.openQuestion(
null,
MessageBundle.
get(
"GrxBaseItem.dialog.title.delete"),
83 public boolean load(File file) {
92 public void delete() {
94 manager_.removeItem(
this);
112 if (defaultFileDir_ ==
null)
113 defaultFileDir_ =
new File(manager_.getHomePath().getPath() +
GrxBasePlugin.
getField(
this.getClass(),
"DEFAULT_DIR",
""));
114 return defaultFileDir_;
138 defaultFileDir_ =
new File(dir);
139 if (!defaultFileDir_.isDirectory())
140 defaultFileDir_ = manager_.getHomePath();
156 FileDialog openDialog =
new FileDialog(
null,SWT.SAVE);
157 String openFile = openDialog.open();
158 if( openFile !=
null )
159 return new File(openFile);
168 clipValue_ = clipVal;