X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FTextColourChooser.java;h=5bc6563f8da79a753bd57bc6a35fa8b22c184f83;hb=ba1f9fee25b87bdac0c535019252b787939a8f80;hp=5d22abb82fc441d362d1d7322f858617b857dabb;hpb=2afa9987e7d3276b4525abb28767617732e6e7cf;p=jalview.git diff --git a/src/jalview/gui/TextColourChooser.java b/src/jalview/gui/TextColourChooser.java index 5d22abb..5bc6563 100644 --- a/src/jalview/gui/TextColourChooser.java +++ b/src/jalview/gui/TextColourChooser.java @@ -20,10 +20,6 @@ */ package jalview.gui; -import jalview.datamodel.SequenceGroup; -import jalview.gui.JalviewColourChooser.ColourChooserListener; -import jalview.util.MessageManager; - import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; @@ -39,6 +35,10 @@ import javax.swing.JSlider; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; +import jalview.datamodel.SequenceGroup; +import jalview.gui.JalviewColourChooser.ColourChooserListener; +import jalview.util.MessageManager; + public class TextColourChooser { AlignmentPanel ap; @@ -101,7 +101,8 @@ public class TextColourChooser @Override public void mousePressed(MouseEvent e) { - String ttl = MessageManager.getString("label.select_colour_for_text"); + String ttl = MessageManager + .getString("label.select_colour_for_text"); ColourChooserListener listener = new ColourChooserListener() { @Override @@ -121,7 +122,8 @@ public class TextColourChooser @Override public void mousePressed(MouseEvent e) { - String ttl = MessageManager.getString("label.select_colour_for_text"); + String ttl = MessageManager + .getString("label.select_colour_for_text"); ColourChooserListener listener = new ColourChooserListener() { @Override @@ -149,17 +151,13 @@ public class TextColourChooser MessageManager.getString("action.cancel") }; String title = MessageManager .getString("label.adjust_foreground_text_colour_threshold"); - Runnable action = new Runnable() // response for 1 = Cancel + Runnable action = () -> // response for 1 = Cancel { - @Override - public void run() - { - restoreInitialSettings(); - } + restoreInitialSettings(); }; - JvOptionPane.newOptionDialog(alignPanel).setResponseHandler(1, action) - .showInternalDialog(bigpanel, title, - JvOptionPane.YES_NO_CANCEL_OPTION, + JvOptionPane.newOptionDialog(alignPanel.alignFrame) + .setResponseHandler(1, action).showInternalDialog(bigpanel, + title, JvOptionPane.YES_NO_CANCEL_OPTION, JvOptionPane.PLAIN_MESSAGE, null, options, MessageManager.getString("action.ok")); }