- added getter for combo element
authorPatric Plitzner <p.plitzner@bgbm.org>
Tue, 26 Nov 2013 11:02:07 +0000 (11:02 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Tue, 26 Nov 2013 11:02:07 +0000 (11:02 +0000)
 - added setEnable() method for DerivateSearchCompositeController

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/derivatesearch/DerivateSearchComposite.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/derivatesearch/DerivateSearchCompositeController.java

index b0e271b841e2a6f7e114cbf0d409a44c76041fd5..c88610d83222386c1dfed416ce21ac4b933867ba 100644 (file)
@@ -31,6 +31,7 @@ public class DerivateSearchComposite extends Composite {
     private Text searchField;
     private Table table;
     private TableViewer resultViewer;
+    private Combo comboDerivateType;
 
     /**
      * Create the composite.
@@ -45,9 +46,9 @@ public class DerivateSearchComposite extends Composite {
         lblDerivateType.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
         lblDerivateType.setText("Derivate Type");
 
-        Combo combo = new Combo(this, SWT.NONE);
-        combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
-        formToolkit.paintBordersFor(combo);
+        comboDerivateType = new Combo(this, SWT.NONE);
+        comboDerivateType.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+        formToolkit.paintBordersFor(comboDerivateType);
 
         searchField = formToolkit.createText(this, "New Text", SWT.NONE);
         searchField.setText("");
@@ -69,4 +70,7 @@ public class DerivateSearchComposite extends Composite {
     public TableViewer getResultViewer() {
         return resultViewer;
     }
+    public Combo getComboDerivateType() {
+        return comboDerivateType;
+    }
 }
index a8854c7786698566d9635882c9bdbdcc3fa910f2..14814fdaaff4b37efd85eeccd3d2922b017215c6 100644 (file)
@@ -90,6 +90,7 @@ public class DerivateSearchCompositeController {
         });
 
         configurator = new IdentifiableServiceConfiguratorImpl<SpecimenOrObservationBase<DerivedUnitFacadeCacheStrategy>>();
+
     }
 
     private void searchDerivates(String searchString){
@@ -106,4 +107,10 @@ public class DerivateSearchCompositeController {
         return derivateSearchComposite;
     }
 
+    private void setEnable(boolean enabled){
+        derivateSearchComposite.setEnabled(enabled);
+        derivateSearchComposite.getResultViewer().getTable().setEnabled(enabled);
+        derivateSearchComposite.getSearchField().setEnabled(enabled);
+    }
+
 }