From 00eeb650b3a72206b1531f9eea145ea2ce24a1fc Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 27 Oct 2015 11:41:30 +0000 Subject: [PATCH] JAL-1667 JAL-666 rename the GUI FeatureRenderer classes that hold the editing logic for sequence features. --- src/MCview/AppletPDBCanvas.java | 6 +++--- src/MCview/PDBCanvas.java | 4 ++-- src/jalview/appletgui/AlignmentPanel.java | 2 +- src/jalview/appletgui/AppletJmol.java | 2 +- src/jalview/appletgui/AppletJmolBinding.java | 2 +- src/jalview/appletgui/FeatureColourChooser.java | 4 ++-- .../{FeatureRenderer.java => FeatureRendererAndEditor.java} | 6 +++--- src/jalview/appletgui/FeatureSettings.java | 2 +- src/jalview/appletgui/OverviewPanel.java | 4 ++-- src/jalview/appletgui/SeqCanvas.java | 6 +++--- src/jalview/appletgui/UserDefinedColours.java | 10 +++++----- src/jalview/gui/AlignFrame.java | 2 +- src/jalview/gui/AlignmentPanel.java | 2 +- src/jalview/gui/AppJmolBinding.java | 6 +++--- src/jalview/gui/FeatureColourChooser.java | 6 +++--- .../{FeatureRenderer.java => FeatureRendererAndEditor.java} | 6 +++--- src/jalview/gui/FeatureSettings.java | 2 +- src/jalview/gui/JalviewChimeraBindingModel.java | 6 +++--- src/jalview/gui/OverviewPanel.java | 2 +- src/jalview/gui/SeqCanvas.java | 6 +++--- src/jalview/io/HTMLOutput.java | 6 +++--- src/jalview/javascript/MouseOverStructureListener.java | 4 ++-- 22 files changed, 48 insertions(+), 48 deletions(-) rename src/jalview/appletgui/{FeatureRenderer.java => FeatureRendererAndEditor.java} (98%) rename src/jalview/gui/{FeatureRenderer.java => FeatureRendererAndEditor.java} (98%) diff --git a/src/MCview/AppletPDBCanvas.java b/src/MCview/AppletPDBCanvas.java index 7f87326..020d9d0 100644 --- a/src/MCview/AppletPDBCanvas.java +++ b/src/MCview/AppletPDBCanvas.java @@ -22,7 +22,7 @@ package MCview; import jalview.analysis.AlignSeq; import jalview.appletgui.AlignmentPanel; -import jalview.appletgui.FeatureRenderer; +import jalview.appletgui.FeatureRendererAndEditor; import jalview.appletgui.SequenceRenderer; import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; @@ -137,7 +137,7 @@ public class AppletPDBCanvas extends Panel implements MouseListener, boolean seqColoursReady = false; - FeatureRenderer fr; + FeatureRendererAndEditor fr; AlignmentPanel ap; @@ -561,7 +561,7 @@ public class AppletPDBCanvas extends Panel implements MouseListener, { if (fr == null) { - fr = new jalview.appletgui.FeatureRenderer(ap.av); + fr = new jalview.appletgui.FeatureRendererAndEditor(ap.av); } fr.transferSettings(ap.getFeatureRenderer()); diff --git a/src/MCview/PDBCanvas.java b/src/MCview/PDBCanvas.java index ac1ba06..872c957 100644 --- a/src/MCview/PDBCanvas.java +++ b/src/MCview/PDBCanvas.java @@ -24,7 +24,7 @@ import jalview.analysis.AlignSeq; import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; import jalview.gui.AlignmentPanel; -import jalview.gui.FeatureRenderer; +import jalview.gui.FeatureRendererAndEditor; import jalview.gui.SequenceRenderer; import jalview.structure.AtomSpec; import jalview.structure.StructureListener; @@ -530,7 +530,7 @@ public class PDBCanvas extends JPanel implements MouseListener, { if (fr == null) { - fr = new FeatureRenderer(ap); + fr = new FeatureRendererAndEditor(ap); } fr.transferSettings(ap.alignFrame.getFeatureRenderer()); diff --git a/src/jalview/appletgui/AlignmentPanel.java b/src/jalview/appletgui/AlignmentPanel.java index 34e0cc0..ac4b38d 100644 --- a/src/jalview/appletgui/AlignmentPanel.java +++ b/src/jalview/appletgui/AlignmentPanel.java @@ -177,7 +177,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, @Override public jalview.api.FeatureRenderer cloneFeatureRenderer() { - FeatureRenderer nfr = new FeatureRenderer(av); + FeatureRendererAndEditor nfr = new FeatureRendererAndEditor(av); nfr.transferSettings(seqPanel.seqCanvas.fr); return nfr; } diff --git a/src/jalview/appletgui/AppletJmol.java b/src/jalview/appletgui/AppletJmol.java index b9acac0..d605ca7 100644 --- a/src/jalview/appletgui/AppletJmol.java +++ b/src/jalview/appletgui/AppletJmol.java @@ -139,7 +139,7 @@ public class AppletJmol extends EmbmenuFrame implements // boolean colourBySequence = true; - FeatureRenderer fr = null; + FeatureRendererAndEditor fr = null; AppletJmolBinding jmb; diff --git a/src/jalview/appletgui/AppletJmolBinding.java b/src/jalview/appletgui/AppletJmolBinding.java index 6ec5b4d..3a5adf7 100644 --- a/src/jalview/appletgui/AppletJmolBinding.java +++ b/src/jalview/appletgui/AppletJmolBinding.java @@ -60,7 +60,7 @@ class AppletJmolBinding extends JalviewJmolBinding { if (appletJmolBinding.fr == null) { - appletJmolBinding.fr = new jalview.appletgui.FeatureRenderer( + appletJmolBinding.fr = new jalview.appletgui.FeatureRendererAndEditor( appletJmolBinding.ap.av); } diff --git a/src/jalview/appletgui/FeatureColourChooser.java b/src/jalview/appletgui/FeatureColourChooser.java index 46a67c4..9653275 100644 --- a/src/jalview/appletgui/FeatureColourChooser.java +++ b/src/jalview/appletgui/FeatureColourChooser.java @@ -54,7 +54,7 @@ public class FeatureColourChooser extends Panel implements ActionListener, Frame owner; - FeatureRenderer fr; + FeatureRendererAndEditor fr; FeatureSettings fs = null; @@ -87,7 +87,7 @@ public class FeatureColourChooser extends Panel implements ActionListener, // this.ap = fsettings.ap; } - private void init(FeatureRenderer frenderer, String type) + private void init(FeatureRendererAndEditor frenderer, String type) { this.type = type; fr = frenderer; diff --git a/src/jalview/appletgui/FeatureRenderer.java b/src/jalview/appletgui/FeatureRendererAndEditor.java similarity index 98% rename from src/jalview/appletgui/FeatureRenderer.java rename to src/jalview/appletgui/FeatureRendererAndEditor.java index 4655ba5..8d95c39 100644 --- a/src/jalview/appletgui/FeatureRenderer.java +++ b/src/jalview/appletgui/FeatureRendererAndEditor.java @@ -51,7 +51,7 @@ import java.util.Hashtable; * @author $author$ * @version $Revision$ */ -public class FeatureRenderer extends +public class FeatureRendererAndEditor extends jalview.renderer.seqfeatures.FeatureRenderer { @@ -65,7 +65,7 @@ public class FeatureRenderer extends * @param av * DOCUMENT ME! */ - public FeatureRenderer(AlignmentViewport av) + public FeatureRendererAndEditor(AlignmentViewport av) { super(); this.av = av; @@ -195,7 +195,7 @@ public class FeatureRenderer extends colourPanel = new FeatureColourPanel(); colourPanel.setSize(110, 15); - final FeatureRenderer fr = this; + final FeatureRendererAndEditor fr = this; Panel panel = new Panel(new GridLayout(3, 1)); diff --git a/src/jalview/appletgui/FeatureSettings.java b/src/jalview/appletgui/FeatureSettings.java index 1c156dc..90a00cd 100755 --- a/src/jalview/appletgui/FeatureSettings.java +++ b/src/jalview/appletgui/FeatureSettings.java @@ -66,7 +66,7 @@ public class FeatureSettings extends Panel implements ItemListener, MouseListener, MouseMotionListener, ActionListener, AdjustmentListener, FeatureSettingsControllerI { - FeatureRenderer fr; + FeatureRendererAndEditor fr; AlignmentPanel ap; diff --git a/src/jalview/appletgui/OverviewPanel.java b/src/jalview/appletgui/OverviewPanel.java index bc64728..82d9a01 100755 --- a/src/jalview/appletgui/OverviewPanel.java +++ b/src/jalview/appletgui/OverviewPanel.java @@ -61,7 +61,7 @@ public class OverviewPanel extends Panel implements Runnable, // main visible SeqCanvas SequenceRenderer sr; - FeatureRenderer fr; + FeatureRendererAndEditor fr; Frame nullFrame; @@ -77,7 +77,7 @@ public class OverviewPanel extends Panel implements Runnable, sr.graphics = nullFrame.getGraphics(); sr.renderGaps = false; sr.forOverview = true; - fr = new FeatureRenderer(av); + fr = new FeatureRendererAndEditor(av); // scale the initial size of overviewpanel to shape of alignment float initialScale = (float) av.getAlignment().getWidth() diff --git a/src/jalview/appletgui/SeqCanvas.java b/src/jalview/appletgui/SeqCanvas.java index ce70597..f907974 100755 --- a/src/jalview/appletgui/SeqCanvas.java +++ b/src/jalview/appletgui/SeqCanvas.java @@ -34,7 +34,7 @@ import java.awt.Panel; public class SeqCanvas extends Panel { - FeatureRenderer fr; + FeatureRendererAndEditor fr; SequenceRenderer sr; @@ -59,7 +59,7 @@ public class SeqCanvas extends Panel public SeqCanvas(AlignViewport av) { this.av = av; - fr = new FeatureRenderer(av); + fr = new FeatureRendererAndEditor(av); sr = new SequenceRenderer(av); PaintRefresher.Register(this, av.getSequenceSetId()); updateViewport(); @@ -78,7 +78,7 @@ public class SeqCanvas extends Panel return av; } - public FeatureRenderer getFeatureRenderer() + public FeatureRendererAndEditor getFeatureRenderer() { return fr; } diff --git a/src/jalview/appletgui/UserDefinedColours.java b/src/jalview/appletgui/UserDefinedColours.java index 57cf669..cdc517b 100644 --- a/src/jalview/appletgui/UserDefinedColours.java +++ b/src/jalview/appletgui/UserDefinedColours.java @@ -114,7 +114,7 @@ public class UserDefinedColours extends Panel implements ActionListener, init(); } - public UserDefinedColours(FeatureRenderer fr, Frame alignframe) + public UserDefinedColours(FeatureRendererAndEditor fr, Frame alignframe) { caller = fr; originalColour = fr.colourPanel.getBackground(); @@ -466,9 +466,9 @@ public class UserDefinedColours extends Panel implements ActionListener, .maxColour_actionPerformed(getColor()); } } - else if (caller instanceof FeatureRenderer) + else if (caller instanceof FeatureRendererAndEditor) { - ((FeatureRenderer) caller).colourPanel.updateColor(getColor()); + ((FeatureRendererAndEditor) caller).colourPanel.updateColor(getColor()); } else if (caller instanceof FeatureColourChooser) { @@ -545,9 +545,9 @@ public class UserDefinedColours extends Panel implements ActionListener, .maxColour_actionPerformed((Color) originalColour); } } - else if (caller instanceof FeatureRenderer) + else if (caller instanceof FeatureRendererAndEditor) { - ((FeatureRenderer) caller).colourPanel.updateColor(originalColour); + ((FeatureRendererAndEditor) caller).colourPanel.updateColor(originalColour); } diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index d20d62e..addf7de 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -951,7 +951,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, return jalview.bin.Cache.getProperty("VERSION"); } - public FeatureRenderer getFeatureRenderer() + public FeatureRendererAndEditor getFeatureRenderer() { return alignPanel.getSeqPanel().seqCanvas.getFeatureRenderer(); } diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index 4d49bc2..cc323c0 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -1684,7 +1684,7 @@ public class AlignmentPanel extends GAlignmentPanel implements public jalview.api.FeatureRenderer cloneFeatureRenderer() { - return new FeatureRenderer(this); + return new FeatureRendererAndEditor(this); } @Override diff --git a/src/jalview/gui/AppJmolBinding.java b/src/jalview/gui/AppJmolBinding.java index 1c54a5e..5058d5f 100644 --- a/src/jalview/gui/AppJmolBinding.java +++ b/src/jalview/gui/AppJmolBinding.java @@ -38,7 +38,7 @@ public class AppJmolBinding extends JalviewJmolBinding { private AppJmol appJmolWindow; - private FeatureRenderer fr = null; + private FeatureRendererAndEditor fr = null; public AppJmolBinding(AppJmol appJmol, StructureSelectionManager sSm, PDBEntry[] pdbentry, SequenceI[][] sequenceIs, String[][] chains, @@ -49,7 +49,7 @@ public class AppJmolBinding extends JalviewJmolBinding } @Override - public FeatureRenderer getFeatureRenderer(AlignmentViewPanel alignment) + public FeatureRendererAndEditor getFeatureRenderer(AlignmentViewPanel alignment) { AlignmentPanel ap = (alignment == null) ? appJmolWindow .getAlignmentPanel() : (AlignmentPanel) alignment; @@ -57,7 +57,7 @@ public class AppJmolBinding extends JalviewJmolBinding { if (fr == null) { - fr = (jalview.gui.FeatureRenderer) ap.cloneFeatureRenderer(); + fr = (jalview.gui.FeatureRendererAndEditor) ap.cloneFeatureRenderer(); } else { diff --git a/src/jalview/gui/FeatureColourChooser.java b/src/jalview/gui/FeatureColourChooser.java index 625cccc..d6b107b 100644 --- a/src/jalview/gui/FeatureColourChooser.java +++ b/src/jalview/gui/FeatureColourChooser.java @@ -50,7 +50,7 @@ import javax.swing.event.ChangeListener; public class FeatureColourChooser extends JalviewDialog { // FeatureSettings fs; - FeatureRenderer fr; + FeatureRendererAndEditor fr; private GraduatedColor cs; @@ -82,12 +82,12 @@ public class FeatureColourChooser extends JalviewDialog String type = null; - public FeatureColourChooser(FeatureRenderer frender, String type) + public FeatureColourChooser(FeatureRendererAndEditor frender, String type) { this(frender, false, type); } - public FeatureColourChooser(FeatureRenderer frender, boolean block, + public FeatureColourChooser(FeatureRendererAndEditor frender, boolean block, String type) { this.fr = frender; diff --git a/src/jalview/gui/FeatureRenderer.java b/src/jalview/gui/FeatureRendererAndEditor.java similarity index 98% rename from src/jalview/gui/FeatureRenderer.java rename to src/jalview/gui/FeatureRendererAndEditor.java index a0f1b80..3c0f48c 100644 --- a/src/jalview/gui/FeatureRenderer.java +++ b/src/jalview/gui/FeatureRendererAndEditor.java @@ -55,7 +55,7 @@ import javax.swing.SwingConstants; * @author $author$ * @version $Revision$ */ -public class FeatureRenderer extends +public class FeatureRendererAndEditor extends jalview.renderer.seqfeatures.FeatureRenderer implements jalview.api.FeatureRenderer { @@ -69,7 +69,7 @@ public class FeatureRenderer extends * @param av * DOCUMENT ME! */ - public FeatureRenderer(AlignmentPanel ap) + public FeatureRendererAndEditor(AlignmentPanel ap) { super(); this.ap = ap; @@ -112,7 +112,7 @@ public class FeatureRenderer extends final JSpinner end = new JSpinner(); start.setPreferredSize(new Dimension(80, 20)); end.setPreferredSize(new Dimension(80, 20)); - final FeatureRenderer me = this; + final FeatureRendererAndEditor me = this; final JLabel colour = new JLabel(); colour.setOpaque(true); // colour.setBorder(BorderFactory.createEtchedBorder()); diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 6b58b51..61c3162 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -100,7 +100,7 @@ public class FeatureSettings extends JPanel implements JPanel dasSettingsPane = new JPanel(); - final FeatureRenderer fr; + final FeatureRendererAndEditor fr; public final AlignFrame af; diff --git a/src/jalview/gui/JalviewChimeraBindingModel.java b/src/jalview/gui/JalviewChimeraBindingModel.java index 7a54732..8614ca5 100644 --- a/src/jalview/gui/JalviewChimeraBindingModel.java +++ b/src/jalview/gui/JalviewChimeraBindingModel.java @@ -30,7 +30,7 @@ public class JalviewChimeraBindingModel extends JalviewChimeraBinding { private ChimeraViewFrame cvf; - private FeatureRenderer fr = null; + private FeatureRendererAndEditor fr = null; public JalviewChimeraBindingModel(ChimeraViewFrame chimeraViewFrame, StructureSelectionManager ssm, PDBEntry[] pdbentry, @@ -41,7 +41,7 @@ public class JalviewChimeraBindingModel extends JalviewChimeraBinding } @Override - public FeatureRenderer getFeatureRenderer(AlignmentViewPanel alignment) + public FeatureRendererAndEditor getFeatureRenderer(AlignmentViewPanel alignment) { AlignmentPanel ap = (alignment == null) ? cvf.getAlignmentPanel() : (AlignmentPanel) alignment; @@ -49,7 +49,7 @@ public class JalviewChimeraBindingModel extends JalviewChimeraBinding { if (fr == null) { - fr = (jalview.gui.FeatureRenderer) ap.cloneFeatureRenderer(); + fr = (jalview.gui.FeatureRendererAndEditor) ap.cloneFeatureRenderer(); } else { diff --git a/src/jalview/gui/OverviewPanel.java b/src/jalview/gui/OverviewPanel.java index de0dbe5..abd2170 100755 --- a/src/jalview/gui/OverviewPanel.java +++ b/src/jalview/gui/OverviewPanel.java @@ -91,7 +91,7 @@ public class OverviewPanel extends JPanel implements Runnable sr = new SequenceRenderer(av); sr.renderGaps = false; sr.forOverview = true; - fr = new FeatureRenderer(ap); + fr = new FeatureRendererAndEditor(ap); // scale the initial size of overviewpanel to shape of alignment float initialScale = (float) av.getAlignment().getWidth() diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index 5706fe7..df91546 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -46,7 +46,7 @@ import javax.swing.JComponent; */ public class SeqCanvas extends JComponent { - final FeatureRenderer fr; + final FeatureRendererAndEditor fr; final SequenceRenderer sr; @@ -82,7 +82,7 @@ public class SeqCanvas extends JComponent { this.av = ap.av; updateViewport(); - fr = new FeatureRenderer(ap); + fr = new FeatureRendererAndEditor(ap); sr = new SequenceRenderer(av); setLayout(new BorderLayout()); PaintRefresher.Register(this, av.getSequenceSetId()); @@ -94,7 +94,7 @@ public class SeqCanvas extends JComponent return sr; } - public FeatureRenderer getFeatureRenderer() + public FeatureRendererAndEditor getFeatureRenderer() { return fr; } diff --git a/src/jalview/io/HTMLOutput.java b/src/jalview/io/HTMLOutput.java index df0dc06..252e3ac 100755 --- a/src/jalview/io/HTMLOutput.java +++ b/src/jalview/io/HTMLOutput.java @@ -24,7 +24,7 @@ import jalview.datamodel.AlignmentI; import jalview.datamodel.SequenceI; import jalview.gui.AlignViewport; import jalview.gui.AlignmentPanel; -import jalview.gui.FeatureRenderer; +import jalview.gui.FeatureRendererAndEditor; import jalview.gui.SequenceRenderer; import jalview.util.MessageManager; @@ -43,12 +43,12 @@ public class HTMLOutput Color color; public HTMLOutput(AlignmentPanel ap, SequenceRenderer sr, - FeatureRenderer fr1) + FeatureRendererAndEditor fr1) { this.av = ap.av; this.sr = sr; - fr = new FeatureRenderer(ap); + fr = new FeatureRendererAndEditor(ap); fr.transferSettings(fr1); JalviewFileChooser chooser = new JalviewFileChooser( diff --git a/src/jalview/javascript/MouseOverStructureListener.java b/src/jalview/javascript/MouseOverStructureListener.java index 35c7860..7f34a08 100644 --- a/src/jalview/javascript/MouseOverStructureListener.java +++ b/src/jalview/javascript/MouseOverStructureListener.java @@ -206,11 +206,11 @@ public class MouseOverStructureListener extends JSFunctionExec implements SequenceRenderer sr = ((jalview.appletgui.AlignmentPanel) source) .getSequenceRenderer(); FeatureRenderer fr = ((jalview.appletgui.AlignmentPanel) source).av - .isShowSequenceFeatures() ? new jalview.appletgui.FeatureRenderer( + .isShowSequenceFeatures() ? new jalview.appletgui.FeatureRendererAndEditor( ((jalview.appletgui.AlignmentPanel) source).av) : null; if (fr != null) { - ((jalview.appletgui.FeatureRenderer) fr) + ((jalview.appletgui.FeatureRendererAndEditor) fr) .transferSettings(((jalview.appletgui.AlignmentPanel) source) .getFeatureRenderer()); } -- 1.7.10.2