gd = new GridData(GridData.FILL, GridData.CENTER, true, false);
dataText.setLayoutData(gd);
- dataOutputTimer = new Timer(100, new ActionListener() {
+ dataOutputTimer = new Timer(300, new ActionListener() {
public void actionPerformed(ActionEvent evt) {
+ if (PlatformUI.isWorkbenchRunning() == false){
+ return;
+ }
+ if( PlatformUI.getWorkbench().isClosing() == true){
+ return;
+ }
+
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable(){
@Override
public void run() {
super.widgetSelected(e);
}
});
-
-// Composite magneticSection = formUtil.createSection(mainComposite, "GeoMagnetic filed");
-// createMagenticInput(magneticSection);
-// Composite magneticComposite = formUtil.createComposite(magneticSection, 3);
-// formUtil.createLabel(magneticComposite, "North component : ");
-// Text northText = formUtil.createText(magneticComposite, String.valueOf(north));
-// northText.setTextLimit(10);
-// formUtil.createLabel(magneticComposite, "nT");
-// formUtil.createLabel(magneticComposite, "East component : ");
-// Text eastText = formUtil.createText(magneticComposite, String.valueOf(east));
-// eastText.setTextLimit(10);
-// formUtil.createLabel(magneticComposite, "nT");
-// formUtil.createLabel(magneticComposite, "Vertical component : ");
-// Text verticalText = formUtil.createText(magneticComposite, String.valueOf(vertical));
-// verticalText.setTextLimit(10);
-// formUtil.createLabel(magneticComposite, "nT");
-// northText.addModifyListener(new ModifyListener(){
-// @Override
-// public void modifyText(ModifyEvent e) {
-// try{
-// north = Double.parseDouble(((Text)e.widget).getText());
-// }
-// catch (NumberFormatException nfe) {
-// int caret = ((Text)e.widget).getCaretPosition();
-// ((Text)e.widget).setText(String.valueOf(north));
-// ((Text)e.widget).setSelection(caret-1, caret-1);
-// }
-// }
-// });
-// eastText.addModifyListener(new ModifyListener(){
-// @Override
-// public void modifyText(ModifyEvent e) {
-// try{
-// east = Double.parseDouble(((Text)e.widget).getText());
-// }
-// catch (NumberFormatException nfe) {
-// int caret = ((Text)e.widget).getCaretPosition();
-// ((Text)e.widget).setText(String.valueOf(east));
-// ((Text)e.widget).setSelection(caret-1, caret-1);
-// System.out.println(caret);
-// }
-// }
-// });
-// verticalText.addModifyListener(new ModifyListener(){
-// @Override
-// public void modifyText(ModifyEvent e) {
-// try{
-// vertical = Double.parseDouble(((Text)e.widget).getText());
-// }
-// catch (NumberFormatException nfe) {
-// int caret = ((Text)e.widget).getCaretPosition();
-// ((Text)e.widget).setText(String.valueOf(vertical));
-// ((Text)e.widget).setSelection(caret-1, caret-1);
-// }
-// }
-// });
}
@Override
}
@Override
public void widgetSelected(SelectionEvent e) {
-// rollSlider.setSelection(90+180);
-// pitchSlider.setSelection(-90+180);
-// yawSlider.setSelection(90+180);
-// rollValue = 90;
-// pitchValue = -90;
-// yawValue = 90;
-// panel.rollDegree = rollValue;
-// panel.pitchDegree = pitchValue;
-// panel.yawDegree = yawValue;
double axisX[] = {1,0,0};
double axisY[] = {0,0,1};
double axisZ[] = {0,-1,0};
}
@Override
public void widgetSelected(SelectionEvent e) {
-// rollSlider.setSelection(90+180);
-// pitchSlider.setSelection(-180+180);
-// yawSlider.setSelection(90+180);
-// rollValue = 90;
-// pitchValue = -180;
-// yawValue = 90;
-// panel.rollDegree = rollValue;
-// panel.pitchDegree = pitchValue;
-// panel.yawDegree = yawValue;
double axisX[] = {0,0,1};
double axisY[] = {-1,0,0};
double axisZ[] = {0,-1,0};
}
@Override
public void widgetSelected(SelectionEvent e) {
-// rollSlider.setSelection(90+180);
-// pitchSlider.setSelection(90+180);
-// yawSlider.setSelection(90+180);
-// rollValue = 90;
-// pitchValue = 90;
-// yawValue = 90;
-// panel.rollDegree = rollValue;
-// panel.pitchDegree = pitchValue;
-// panel.yawDegree = yawValue;
double axisX[] = {-1,0,0};
double axisY[] = {0,0,-1};
double axisZ[] = {0,-1,0};
}
@Override
public void widgetSelected(SelectionEvent e) {
-// rollSlider.setSelection(90+180);
-// pitchSlider.setSelection(0+180);
-// yawSlider.setSelection(90+180);
-// rollValue = 90;
-// pitchValue = 0;
-// yawValue = 90;
-// panel.rollDegree = rollValue;
-// panel.pitchDegree = pitchValue;
-// panel.yawDegree = yawValue;
double axisX[] = {0,0,-1};
double axisY[] = {1,0,0};
double axisZ[] = {0,-1,0};