JAL-3103 Put jalview.jar first in getdown for .properties files. Remove now-not-neede...
[jalview.git] / src / jalview / gui / TextColourChooser.java
index faf19ad..5d22abb 100644 (file)
@@ -145,16 +145,23 @@ public class TextColourChooser
       }
     });
 
-    int reply = JvOptionPane.showInternalOptionDialog(alignPanel, bigpanel,
-            MessageManager.getString(
-                    "label.adjunst_foreground_text_colour_threshold"),
-            JvOptionPane.OK_CANCEL_OPTION, JvOptionPane.QUESTION_MESSAGE,
-            null, null, null);
-
-    if (reply == JvOptionPane.CANCEL_OPTION)
+    Object[] options = new Object[] { MessageManager.getString("action.ok"),
+        MessageManager.getString("action.cancel") };
+    String title = MessageManager
+            .getString("label.adjust_foreground_text_colour_threshold");
+    Runnable action = new Runnable() // response for 1 = Cancel
     {
-      restoreInitialSettings();
-    }
+      @Override
+      public void run()
+      {
+        restoreInitialSettings();
+      }
+    };
+    JvOptionPane.newOptionDialog(alignPanel).setResponseHandler(1, action)
+            .showInternalDialog(bigpanel, title,
+                    JvOptionPane.YES_NO_CANCEL_OPTION,
+                    JvOptionPane.PLAIN_MESSAGE, null, options,
+                    MessageManager.getString("action.ok"));
   }
 
   /**
@@ -185,6 +192,8 @@ public class TextColourChooser
       group.textColour2 = groupColour2.get(group);
       group.thresholdTextColour = groupThreshold.get(group);
     }
+
+    ap.paintAlignment(false, false);
   }
 
   /**