From 77fbf65254b611a0434ce058beb41951093321a1 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 5 Jul 2018 09:52:24 +0100 Subject: [PATCH] JAL-3058 missed refactoring of JColorChooser --- src/jalview/gui/StructureViewerBase.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/jalview/gui/StructureViewerBase.java b/src/jalview/gui/StructureViewerBase.java index 2d3b3b5..2cd7f56 100644 --- a/src/jalview/gui/StructureViewerBase.java +++ b/src/jalview/gui/StructureViewerBase.java @@ -36,7 +36,6 @@ import jalview.io.JalviewFileView; import jalview.jbgui.GStructureViewer; import jalview.schemes.ColourSchemeI; import jalview.schemes.ColourSchemes; -import jalview.schemes.FeatureColour; import jalview.structure.StructureMapping; import jalview.structures.models.AAStructureBindingModel; import jalview.util.MessageManager; @@ -59,8 +58,6 @@ import java.util.Vector; import javax.swing.ButtonGroup; import javax.swing.JCheckBoxMenuItem; -import javax.swing.JColorChooser; -import javax.swing.JDialog; import javax.swing.JMenu; import javax.swing.JMenuItem; import javax.swing.JRadioButtonMenuItem; @@ -812,11 +809,14 @@ public abstract class StructureViewerBase extends GStructureViewer return reply; } + /** + * Opens a colour chooser dialog, and applies the chosen colour to the + * background of the structure viewer + */ @Override public void background_actionPerformed(ActionEvent actionEvent) { - String ttl = MessageManager - .getString("label.select_background_colour"); + String ttl = MessageManager.getString("label.select_background_colour"); ColourChooserListener listener = new ColourChooserListener() { @Override @@ -825,6 +825,7 @@ public abstract class StructureViewerBase extends GStructureViewer getBinding().setBackgroundColour(c); } }; + JalviewColourChooser.showColourChooser(this, ttl, null, listener); } @Override -- 1.7.10.2