X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FFeatureEditor.java;h=d547c5882bc4e61f23da6733a9da3676713efd72;hb=4f77328104498504339216829abf5ea87e2791ec;hp=ab69f45f4ab8bfc2585c593d8da2ed862106e458;hpb=8018b976d0b8bd10994ff64f590832d1091e4558;p=jalview.git diff --git a/src/jalview/gui/FeatureEditor.java b/src/jalview/gui/FeatureEditor.java index ab69f45..d547c58 100644 --- a/src/jalview/gui/FeatureEditor.java +++ b/src/jalview/gui/FeatureEditor.java @@ -10,7 +10,6 @@ import jalview.io.FeaturesFile; import jalview.schemes.FeatureColour; import jalview.util.ColorUtils; import jalview.util.MessageManager; -import jalview.util.dialogrunner.RunResponse; import java.awt.BorderLayout; import java.awt.Color; @@ -406,18 +405,18 @@ public class FeatureEditor */ public void showDialog() { - RunResponse okAction = forCreate ? getCreateAction() : getAmendAction(); - RunResponse cancelAction = getCancelAction(); + Runnable okAction = forCreate ? getCreateAction() : getAmendAction(); + Runnable cancelAction = getCancelAction(); /* * set dialog action handlers for OK (create/Amend) and Cancel options * also for Delete if applicable (when amending features) */ JvOptionPane dialog = JvOptionPane.newOptionDialog(Desktop.desktop) - .response(okAction).response(cancelAction); + .setResponseHandler(0, okAction).setResponseHandler(2, cancelAction); if (!forCreate) { - dialog.response(getDeleteAction()); + dialog.setResponseHandler(1, getDeleteAction()); } String title = null; @@ -453,9 +452,9 @@ public class FeatureEditor * * @return */ - protected RunResponse getCancelAction() + protected Runnable getCancelAction() { - RunResponse okAction = new RunResponse(JvOptionPane.CANCEL_OPTION) + Runnable okAction = new Runnable() { @Override public void run() @@ -477,9 +476,9 @@ public class FeatureEditor * * @return */ - protected RunResponse getCreateAction() + protected Runnable getCreateAction() { - RunResponse okAction = new RunResponse(JvOptionPane.OK_OPTION) + Runnable okAction = new Runnable() { boolean useLastDefaults = features.get(0).getType() == null; @@ -535,9 +534,9 @@ public class FeatureEditor * * @return */ - protected RunResponse getDeleteAction() + protected Runnable getDeleteAction() { - RunResponse deleteAction = new RunResponse(JvOptionPane.NO_OPTION) + Runnable deleteAction = new Runnable() { public void run() { @@ -637,9 +636,9 @@ public class FeatureEditor * * @return */ - protected RunResponse getAmendAction() + protected Runnable getAmendAction() { - RunResponse okAction = new RunResponse(JvOptionPane.OK_OPTION) + Runnable okAction = new Runnable() { boolean useLastDefaults = features.get(0).getType() == null;