JAL-1667 JAL-666 rename the GUI FeatureRenderer classes that hold the editing logic...
authorJim Procter <jprocter@issues.jalview.org>
Tue, 27 Oct 2015 11:41:30 +0000 (11:41 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 27 Oct 2015 11:41:45 +0000 (11:41 +0000)
22 files changed:
src/MCview/AppletPDBCanvas.java
src/MCview/PDBCanvas.java
src/jalview/appletgui/AlignmentPanel.java
src/jalview/appletgui/AppletJmol.java
src/jalview/appletgui/AppletJmolBinding.java
src/jalview/appletgui/FeatureColourChooser.java
src/jalview/appletgui/FeatureRendererAndEditor.java [moved from src/jalview/appletgui/FeatureRenderer.java with 98% similarity]
src/jalview/appletgui/FeatureSettings.java
src/jalview/appletgui/OverviewPanel.java
src/jalview/appletgui/SeqCanvas.java
src/jalview/appletgui/UserDefinedColours.java
src/jalview/gui/AlignFrame.java
src/jalview/gui/AlignmentPanel.java
src/jalview/gui/AppJmolBinding.java
src/jalview/gui/FeatureColourChooser.java
src/jalview/gui/FeatureRendererAndEditor.java [moved from src/jalview/gui/FeatureRenderer.java with 98% similarity]
src/jalview/gui/FeatureSettings.java
src/jalview/gui/JalviewChimeraBindingModel.java
src/jalview/gui/OverviewPanel.java
src/jalview/gui/SeqCanvas.java
src/jalview/io/HTMLOutput.java
src/jalview/javascript/MouseOverStructureListener.java

index 7f87326..020d9d0 100644 (file)
@@ -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());
index ac1ba06..872c957 100644 (file)
@@ -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());
index 34e0cc0..ac4b38d 100644 (file)
@@ -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;
   }
index b9acac0..d605ca7 100644 (file)
@@ -139,7 +139,7 @@ public class AppletJmol extends EmbmenuFrame implements
 
   // boolean colourBySequence = true;
 
-  FeatureRenderer fr = null;
+  FeatureRendererAndEditor fr = null;
 
   AppletJmolBinding jmb;
 
index 6ec5b4d..3a5adf7 100644 (file)
@@ -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);
       }
 
index 46a67c4..9653275 100644 (file)
@@ -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;
@@ -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));
 
index 1c156dc..90a00cd 100755 (executable)
@@ -66,7 +66,7 @@ public class FeatureSettings extends Panel implements ItemListener,
         MouseListener, MouseMotionListener, ActionListener,
         AdjustmentListener, FeatureSettingsControllerI
 {
-  FeatureRenderer fr;
+  FeatureRendererAndEditor fr;
 
   AlignmentPanel ap;
 
index bc64728..82d9a01 100755 (executable)
@@ -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()
index ce70597..f907974 100755 (executable)
@@ -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;
   }
index 57cf669..cdc517b 100644 (file)
@@ -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);
 
       }
 
index d20d62e..addf7de 100644 (file)
@@ -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();
   }
index 4d49bc2..cc323c0 100644 (file)
@@ -1684,7 +1684,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
   public jalview.api.FeatureRenderer cloneFeatureRenderer()
   {
 
-    return new FeatureRenderer(this);
+    return new FeatureRendererAndEditor(this);
   }
 
   @Override
index 1c54a5e..5058d5f 100644 (file)
@@ -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
       {
index 625cccc..d6b107b 100644 (file)
@@ -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;
similarity index 98%
rename from src/jalview/gui/FeatureRenderer.java
rename to src/jalview/gui/FeatureRendererAndEditor.java
index a0f1b80..3c0f48c 100644 (file)
@@ -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());
index 6b58b51..61c3162 100644 (file)
@@ -100,7 +100,7 @@ public class FeatureSettings extends JPanel implements
 
   JPanel dasSettingsPane = new JPanel();
 
-  final FeatureRenderer fr;
+  final FeatureRendererAndEditor fr;
 
   public final AlignFrame af;
 
index 7a54732..8614ca5 100644 (file)
@@ -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
       {
index de0dbe5..abd2170 100755 (executable)
@@ -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()
index 5706fe7..df91546 100755 (executable)
@@ -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;
   }
index df0dc06..252e3ac 100755 (executable)
@@ -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(
index 35c7860..7f34a08 100644 (file)
@@ -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());
       }