gridDataUnitId.horizontalAlignment=SWT.BEGINNING;
labelRef.setLayoutData(gridDataUnitId);
labelRef.setText("Biocase provider for associated DNA");
- GridDataFactory.fillDefaults().applyTo(labelRef);
+ GridDataFactory.fillDefaults();
textDNAProviderString = new Combo(composite, SWT.BORDER);
textDNAProviderString.setLayoutData(gridDataUnitId);
- GridDataFactory.fillDefaults().applyTo(textDNAProviderString);
+ GridDataFactory.fillDefaults();
textDNAProviderString.add("Do not search for DNA");
String allProviderString = PreferencesUtil.getStringValue(PreferencePredicate.BioCaseProvider.getKey(), false);
gridData.horizontalAlignment=SWT.BEGINNING;
labelCode.setLayoutData(gridData);
- GridDataFactory.fillDefaults().applyTo(labelCode);
+ GridDataFactory.fillDefaults();
nomenclaturalCodeSelectionCombo = new Combo(composite, SWT.BORDER| SWT.READ_ONLY);
gridData = new GridData();
gridData.horizontalAlignment=SWT.BEGINNING;
private Text textReferenceString;
- private Button toggleButton;
+ private Button selectAllButton;
+ //private Button selectNoneButton;
private Button importButton;
table = checkboxTableViewer.getTable();
table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+ table.addListener(SWT.Selection, this);
toolkit.paintBordersFor(table);
composite_3 = new Composite(composite_2, SWT.NONE);
toolkit.paintBordersFor(composite_3);
composite_3.setLayout(new GridLayout(1, false));
//toggle button
- toggleButton = new Button(composite_3, SWT.PUSH);
- toggleButton.setText("Toggle");
+ selectAllButton = new Button(composite_3, SWT.PUSH);
+ selectAllButton.setText("Select all/none");
new Label(composite_2, SWT.NONE);
- Composite composite_4 = new Composite(composite_2, SWT.NONE);
- composite_4.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
- toolkit.adapt(composite_4);
- toolkit.paintBordersFor(composite_4);
+// Composite composite_4 = new Composite(composite_2, SWT.NONE);
+// composite_4.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
+// composite_4.setBackground(composite.getBackground());
+// toolkit.adapt(composite_4);
+// toolkit.paintBordersFor(composite_4);
- importButton = new Button(composite_4, SWT.PUSH);
+ importButton = new Button(composite_2, SWT.PUSH);
importButton.setSize(48, 25);
importButton.setText("Import");
importButton.addSelectionListener(new SelectionAdapter(){
saveImportedSpecimenAction.run();
}
});
- new Label(composite_2, SWT.NONE);
- new Label(composite_2, SWT.NONE);
- new Label(composite_2, SWT.NONE);
- new Label(composite_2, SWT.NONE);
- new Label(composite_2, SWT.NONE);
- new Label(composite_2, SWT.NONE);
- toggleButton.addSelectionListener(new SelectionAdapter(){
+// new Label(composite_2, SWT.NONE);
+// new Label(composite_2, SWT.NONE);
+// new Label(composite_2, SWT.NONE);
+// new Label(composite_2, SWT.NONE);
+// new Label(composite_2, SWT.NONE);
+// new Label(composite_2, SWT.NONE);
+ selectAllButton.addSelectionListener(new SelectionAdapter(){
@Override
public void widgetSelected(SelectionEvent e) {
state = state ? false : true;
classification = null;
textClassification.setText("");
}
+
+ else {
+ if(event.widget == table){
+ TableItem[] item = table.getSelection();
+ if (item.length == 1){
+ Object o = item[0].getData();
+ System.err.println(o.toString());
+ }
+ }
+ }
}
public String getReferenceString() {