Merge branch 'develop' into spike/JAL-4047/JAL-4048_columns_in_sequenceID
[jalview.git] / src / jalview / gui / FeatureEditor.java
index ba9da67..7117508 100644 (file)
@@ -33,7 +33,6 @@ import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.concurrent.Callable;
 
 import javax.swing.JComboBox;
 import javax.swing.JLabel;
@@ -428,9 +427,8 @@ public class FeatureEditor
    */
   public void showDialog()
   {
-    Callable<Void> okAction = forCreate ? getCreateAction()
-            : getAmendAction();
-    Callable<Void> cancelAction = getCancelAction();
+    Runnable okAction = forCreate ? getCreateAction() : getAmendAction();
+    Runnable cancelAction = getCancelAction();
 
     /*
      * set dialog action handlers for OK (create/Amend) and Cancel options
@@ -476,12 +474,11 @@ public class FeatureEditor
    * 
    * @return
    */
-  protected Callable getCancelAction()
+  protected Runnable getCancelAction()
   {
-    Callable<Void> okAction = () -> {
+    Runnable okAction = () -> {
       ap.highlightSearchResults(null);
       ap.paintAlignment(false, false);
-      return null;
     };
     return okAction;
   }
@@ -496,14 +493,14 @@ public class FeatureEditor
    * 
    * @return
    */
-  protected Callable getCreateAction()
+  protected Runnable getCreateAction()
   {
-    Callable<Void> okAction = new Callable()
+    Runnable okAction = new Runnable()
     {
       boolean useLastDefaults = features.get(0).getType() == null;
 
       @Override
-      public Void call()
+      public void run()
       {
         final String enteredType = name.getText().trim();
         final String enteredGroup = group.getText().trim();
@@ -543,7 +540,6 @@ public class FeatureEditor
 
           repaintPanel();
         }
-        return null;
       }
     };
     return okAction;
@@ -556,15 +552,14 @@ public class FeatureEditor
    * 
    * @return
    */
-  protected Callable getDeleteAction()
+  protected Runnable getDeleteAction()
   {
-    Callable<Void> deleteAction = () -> {
+    Runnable deleteAction = () -> {
       SequenceFeature sf = features.get(featureIndex);
       sequences.get(0).getDatasetSequence().deleteFeature(sf);
       fr.featuresAdded();
       ap.getSeqPanel().seqCanvas.highlightSearchResults(null);
       ap.paintAlignment(true, true);
-      return null;
     };
     return deleteAction;
   }
@@ -655,9 +650,9 @@ public class FeatureEditor
    * 
    * @return
    */
-  protected Callable getAmendAction()
+  protected Runnable getAmendAction()
   {
-    Callable<Void> okAction = new Callable()
+    Runnable okAction = new Runnable()
     {
       boolean useLastDefaults = features.get(0).getType() == null;
 
@@ -666,7 +661,7 @@ public class FeatureEditor
       String featureGroup = group.getText();
 
       @Override
-      public Void call()
+      public void run()
       {
         final String enteredType = name.getText().trim();
         final String enteredGroup = group.getText().trim();
@@ -729,7 +724,6 @@ public class FeatureEditor
           fr.featuresAdded();
         }
         repaintPanel();
-        return null;
       }
     };
     return okAction;