From 90689c5beb87addc534416a3e61e3d5746171292 Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Mon, 1 Jun 2015 16:58:38 +0100 Subject: [PATCH] JAL-1641 remove all refs/imports from gui package --- src/jalview/api/AlignViewControllerGuiI.java | 6 ++ src/jalview/appletgui/AlignFrame.java | 85 ++++++++++++++---------- src/jalview/gui/AlignFrame.java | 92 +++++++++++++------------- src/jalview/io/JSONFile.java | 4 +- 4 files changed, 104 insertions(+), 83 deletions(-) diff --git a/src/jalview/api/AlignViewControllerGuiI.java b/src/jalview/api/AlignViewControllerGuiI.java index 584f596..f768451 100644 --- a/src/jalview/api/AlignViewControllerGuiI.java +++ b/src/jalview/api/AlignViewControllerGuiI.java @@ -21,6 +21,7 @@ package jalview.api; import jalview.commands.CommandI; +import jalview.schemes.ColourSchemeI; /** * Interface implemented by gui implementations managing a Jalview Alignment @@ -41,4 +42,9 @@ public interface AlignViewControllerGuiI void addHistoryItem(CommandI command); + void setShowSeqFeatures(boolean show); + + void setMenusForViewport(); + + void changeColour(ColourSchemeI cs); } diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index ad1626c..478aa09 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -20,40 +20,6 @@ */ package jalview.appletgui; -import java.awt.BorderLayout; -import java.awt.Canvas; -import java.awt.CheckboxMenuItem; -import java.awt.Color; -import java.awt.Font; -import java.awt.FontMetrics; -import java.awt.Frame; -import java.awt.Graphics; -import java.awt.Label; -import java.awt.Menu; -import java.awt.MenuBar; -import java.awt.MenuItem; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.FocusEvent; -import java.awt.event.FocusListener; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; -import java.awt.event.KeyEvent; -import java.awt.event.KeyListener; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.io.IOException; -import java.net.URL; -import java.net.URLEncoder; -import java.util.Arrays; -import java.util.Deque; -import java.util.HashMap; -import java.util.Hashtable; -import java.util.List; -import java.util.Map; -import java.util.StringTokenizer; -import java.util.Vector; - import jalview.analysis.AlignmentSorter; import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder; import jalview.api.AlignViewControllerGuiI; @@ -105,6 +71,40 @@ import jalview.util.MappingUtils; import jalview.util.MessageManager; import jalview.viewmodel.AlignmentViewport; +import java.awt.BorderLayout; +import java.awt.Canvas; +import java.awt.CheckboxMenuItem; +import java.awt.Color; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Label; +import java.awt.Menu; +import java.awt.MenuBar; +import java.awt.MenuItem; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.io.IOException; +import java.net.URL; +import java.net.URLEncoder; +import java.util.Arrays; +import java.util.Deque; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.List; +import java.util.Map; +import java.util.StringTokenizer; +import java.util.Vector; + public class AlignFrame extends EmbmenuFrame implements ActionListener, ItemListener, KeyListener, AlignViewControllerGuiI { @@ -2542,7 +2542,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, } - void changeColour(ColourSchemeI cs) + public void changeColour(ColourSchemeI cs) { int threshold = 0; @@ -4178,4 +4178,19 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, { this.splitFrame = sf; } + + @Override + public void setShowSeqFeatures(boolean b) + { + // showSeqFeatures.setSelected(b); + viewport.setShowSequenceFeatures(b); + + } + + @Override + public void setMenusForViewport() + { + // setMenusFromViewport(viewport); + + } } diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 1b228d6..553ddd2 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -20,52 +20,6 @@ */ package jalview.gui; -import java.awt.BorderLayout; -import java.awt.Component; -import java.awt.Rectangle; -import java.awt.Toolkit; -import java.awt.datatransfer.Clipboard; -import java.awt.datatransfer.DataFlavor; -import java.awt.datatransfer.StringSelection; -import java.awt.datatransfer.Transferable; -import java.awt.dnd.DnDConstants; -import java.awt.dnd.DropTargetDragEvent; -import java.awt.dnd.DropTargetDropEvent; -import java.awt.dnd.DropTargetEvent; -import java.awt.dnd.DropTargetListener; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; -import java.awt.event.KeyAdapter; -import java.awt.event.KeyEvent; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.print.PageFormat; -import java.awt.print.PrinterJob; -import java.beans.PropertyChangeEvent; -import java.io.File; -import java.net.URL; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Deque; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.List; -import java.util.Set; -import java.util.Vector; - -import javax.swing.JCheckBoxMenuItem; -import javax.swing.JEditorPane; -import javax.swing.JInternalFrame; -import javax.swing.JLayeredPane; -import javax.swing.JMenu; -import javax.swing.JMenuItem; -import javax.swing.JOptionPane; -import javax.swing.JRadioButtonMenuItem; -import javax.swing.JScrollPane; -import javax.swing.SwingUtilities; - import jalview.analysis.AAFrequency; import jalview.analysis.AlignmentSorter; import jalview.analysis.AlignmentUtils; @@ -143,6 +97,52 @@ import jalview.ws.jws2.Jws2Discoverer; import jalview.ws.jws2.jabaws2.Jws2Instance; import jalview.ws.seqfetcher.DbSourceProxy; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Rectangle; +import java.awt.Toolkit; +import java.awt.datatransfer.Clipboard; +import java.awt.datatransfer.DataFlavor; +import java.awt.datatransfer.StringSelection; +import java.awt.datatransfer.Transferable; +import java.awt.dnd.DnDConstants; +import java.awt.dnd.DropTargetDragEvent; +import java.awt.dnd.DropTargetDropEvent; +import java.awt.dnd.DropTargetEvent; +import java.awt.dnd.DropTargetListener; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.print.PageFormat; +import java.awt.print.PrinterJob; +import java.beans.PropertyChangeEvent; +import java.io.File; +import java.net.URL; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Deque; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.List; +import java.util.Set; +import java.util.Vector; + +import javax.swing.JCheckBoxMenuItem; +import javax.swing.JEditorPane; +import javax.swing.JInternalFrame; +import javax.swing.JLayeredPane; +import javax.swing.JMenu; +import javax.swing.JMenuItem; +import javax.swing.JOptionPane; +import javax.swing.JRadioButtonMenuItem; +import javax.swing.JScrollPane; +import javax.swing.SwingUtilities; + /** * DOCUMENT ME! * diff --git a/src/jalview/io/JSONFile.java b/src/jalview/io/JSONFile.java index 8d3cadd..ff7deaf 100644 --- a/src/jalview/io/JSONFile.java +++ b/src/jalview/io/JSONFile.java @@ -1,5 +1,6 @@ package jalview.io; +import jalview.api.AlignViewControllerGuiI; import jalview.api.AlignViewportI; import jalview.api.FeatureRenderer; import jalview.api.FeaturesDisplayedI; @@ -9,7 +10,6 @@ import jalview.datamodel.Sequence; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; -import jalview.gui.AlignFrame; import jalview.json.binding.v1.AlignmentAnnotationPojo; import jalview.json.binding.v1.AlignmentPojo; import jalview.json.binding.v1.AnnotationPojo; @@ -462,7 +462,7 @@ public class JSONFile extends AlignFile return jalviewColor; } - public void applySettingsToAlignFrame(AlignFrame af) + public void applySettingsToAlignFrame(AlignViewControllerGuiI af) { af.setShowSeqFeatures(isShowSeqFeatures()); af.changeColour(getColourScheme()); -- 1.7.10.2