+ protected void createTools(ToolComposite toolComposite) {
+ Label label = new Label(toolComposite, SWT.READ_ONLY);
+ label.setText("Route direction:");
+ axisCombo = new Combo(toolComposite, SWT.READ_ONLY);
+ axisCombo.add("X");
+ axisCombo.add("Y");
+ axisCombo.add("Z");
+ axisCombo.add("XY");
+ axisCombo.add("XZ");
+ axisCombo.add("YZ");
+ axisCombo.add("None");
+ axisCombo.add("Custom");
+ axisCombo.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ Combo c = (Combo)e.getSource();
+ setLockType(LockType.values()[c.getSelectionIndex()],false);
+ panel.getComponent().setFocus();
+
+ }
+ });
+ axisCombo.select(lock.ordinal());
+ cameraButton = new Button(toolComposite, SWT.TOGGLE);
+ cameraButton.setText("Camera");
+ cameraButton.setSelection(useDefault);
+ cameraButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ setUseDefault(((Button)e.getSource()).getSelection());
+ panel.getComponent().setFocus();
+ }
+ });
+ Button close = new Button(toolComposite, SWT.PUSH);
+ close.setText("Close");
+ close.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ panel.useDefaultAction();
+ };
+ });
+ toolComposite.relayout();
+ }
+
+ public void deattach() {
+ deactivate();
+ setDBUndo(true);
+ if (toolComposite != null) {
+ toolComposite.clear();
+ axisCombo = null;
+ cameraButton = null;
+ }
+
+ startComponent = null;
+
+ deattachUI();
+ super.deattach();
+ panel.refresh();
+ }