import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import eu.etaxonomy.cdm.model.location.NamedArea;
import eu.etaxonomy.cdm.model.name.Rank;
import eu.etaxonomy.taxeditor.featuretree.e4.FeatureTreeEditorComposite;
+import eu.etaxonomy.taxeditor.model.ImageResources;
import eu.etaxonomy.taxeditor.ui.combo.TermUuidComboViewer;
import eu.etaxonomy.taxeditor.util.TaxonTreeNodeContentProvider;
import eu.etaxonomy.taxeditor.util.TaxonTreeNodeLabelProvider;
private TreeViewer taxonNodeTree;
private NamedArea area;
private Text textAreaText;
+ private Button btnChooseArea;
+ private Button btnRemoveArea;
public WorkingSetComposite(Composite parent, int style) {
super(parent, style);
lblNewLabel_4.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
lblNewLabel_4.setText("Area");
- textAreaText = new Text(this, SWT.BORDER);
+ Composite composite = new Composite(this, SWT.NONE);
+ composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
+ GridLayout gl_composite = new GridLayout(3, false);
+ gl_composite.horizontalSpacing = 0;
+ gl_composite.verticalSpacing = 0;
+ gl_composite.marginHeight = 0;
+ gl_composite.marginWidth = 0;
+ composite.setLayout(gl_composite);
+
+ textAreaText = new Text(composite, SWT.BORDER);
textAreaText.setEditable(false);
textAreaText.setText("Choose...");
textAreaText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
- featureTreeEditorComposite = new FeatureTreeEditorComposite(this, SWT.NONE);
- featureTreeEditorComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
- featureTreeEditorComposite.init(null, null, null, null);
-
+ btnChooseArea = new Button(composite, SWT.NONE);
+ btnChooseArea.setImage(ImageResources.getImage(ImageResources.BROWSE_ICON));
+ btnRemoveArea = new Button(composite, SWT.NONE);
+ btnRemoveArea.setImage(ImageResources.getImage(ImageResources.TRASH_ICON));
+ featureTreeEditorComposite = new FeatureTreeEditorComposite(this, SWT.NONE);
+ featureTreeEditorComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 2));
+ new Label(this, SWT.NONE);
}
@Override
comboRankMax.setTerm(max);
}
+ public FeatureTreeEditorComposite getFeatureTreeEditorComposite() {
+ return featureTreeEditorComposite;
+ }
+
public FeatureTree getCharacters(){
return featureTreeEditorComposite.getFeatureTree();
}
this.area = area;
textAreaText.setText(area.getLabel());
}
- public Text getTextAreaText() {
- return textAreaText;
+ public void removeArea() {
+ this.area = null;
+ textAreaText.setText("");
+ }
+ public Button getBtnChooseArea() {
+ return btnChooseArea;
+ }
+ public Button getBtnRemoveArea() {
+ return btnRemoveArea;
}
}