private Label label_title;
private Button button_add;
private Button button_remove;
- private Label label_treeInfo;
private FeatureTree featureTree;
private Text text_title;
private Button btnOpenFeatureTree;
- private Button btnNewFeatureTree;
private ConversationHolder conversation;
@Inject
Composite composite_treeTitle = new Composite(composite, SWT.NULL);
composite_treeTitle.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true,
false));
- composite_treeTitle.setLayout(new GridLayout(4, false));
+ composite_treeTitle.setLayout(new GridLayout(3, false));
label_title = new Label(composite_treeTitle, SWT.NULL);
label_title.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
text_title.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
btnOpenFeatureTree = new Button(composite_treeTitle, SWT.NONE);
+ btnOpenFeatureTree.setToolTipText("Open Tree");
btnOpenFeatureTree.setImage(ImageResources.getImage(ImageResources.BROWSE_ICON));
- btnOpenFeatureTree.setText("Open Tree");
-
- btnNewFeatureTree = new Button(composite_treeTitle, SWT.NONE);
- btnNewFeatureTree.setText("New Feature Tree");
Composite composite_treeContent = new Composite(composite, SWT.NULL);
composite_treeContent.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
composite_buttons.setLayout(new GridLayout());
button_add = new Button(composite_buttons, SWT.PUSH);
- button_add.setText("Add");
- button_add.setToolTipText("Add a feature to this feature treee.");
+ button_add.setToolTipText("Add a feature to this feature tree.");
+ button_add.setImage(ImageResources.getImage(ImageResources.ADD_EDIT));
button_remove = new Button(composite_buttons, SWT.PUSH);
- button_remove.setText("Remove");
- button_remove
- .setToolTipText("Remove a feature from this feature tree.");
-
- label_treeInfo = new Label(composite, SWT.NULL);
- label_treeInfo
- .setText("Order and nesting of feature nodes may be changed through drag and drop.");
+ button_remove.setToolTipText("Remove a feature from this feature tree.");
+ button_remove.setImage(ImageResources.getImage(ImageResources.TRASH_ICON));
init(shell);
}
@Override
public void widgetSelected(SelectionEvent e) {
FeatureTree tree = FeatureTreeSelectionDialog.select(shell, conversation, null);
- setSelectedTree(tree);
+ if(tree!=null){
+ setSelectedTree(tree);
+ }
}
@Override