JAL-1645 JAL-1355 UI/i18n: added missing messages, moved ‘…’ into action messages...
[jalview.git] / src / jalview / appletgui / AlignFrame.java
index 2b30cd5..0861f2d 100644 (file)
@@ -26,6 +26,7 @@ import jalview.api.AlignViewControllerGuiI;
 import jalview.api.AlignViewControllerI;
 import jalview.api.AlignViewportI;
 import jalview.api.FeatureRenderer;
+import jalview.api.FeatureSettingsControllerI;
 import jalview.api.SequenceStructureBinding;
 import jalview.bin.JalviewLite;
 import jalview.commands.CommandI;
@@ -59,7 +60,6 @@ import jalview.schemes.NucleotideColourScheme;
 import jalview.schemes.PIDColourScheme;
 import jalview.schemes.PurinePyrimidineColourScheme;
 import jalview.schemes.RNAHelicesColourChooser;
-import jalview.schemes.RNAInteractionColourScheme;
 import jalview.schemes.StrandColourScheme;
 import jalview.schemes.TCoffeeColourScheme;
 import jalview.schemes.TaylorColourScheme;
@@ -211,7 +211,6 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     if (hiddenSeqs != null && hiddenSeqs.length > 0)
     {
       viewport.hideSequence(hiddenSeqs);
-      viewport.setHasHiddenRows(true);
     }
     if (columnSelection != null)
     {
@@ -929,7 +928,9 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
               : showForSequences);
         aa.visible = visible;
     }
-    alignPanel.validateAnnotationDimensions(false);
+    alignPanel.validateAnnotationDimensions(true);
+    validate();
+    repaint();
   }
 
   private void setAnnotationSortOrder(SequenceAnnotationOrder order)
@@ -1228,10 +1229,10 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     {
       changeColour(new PurinePyrimidineColourScheme());
     }
-    else if (source == RNAInteractionColour)
-    {
-      changeColour(new RNAInteractionColourScheme());
-    }
+    // else if (source == RNAInteractionColour)
+    // {
+    // changeColour(new RNAInteractionColourScheme());
+    // }
     else if (source == RNAHelixColour)
     {
       new RNAHelicesColourChooser(viewport, alignPanel);
@@ -1342,9 +1343,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
             { e.getActionCommand() }), 600, 500);
 
     FeatureRenderer fr = this.alignPanel.cloneFeatureRenderer();
-    viewport.setFeatureRenderer(fr);
-    viewport.setIncludeHiddenRegion(false);
-    cap.setText(new AppletFormatAdapter(viewport).formatSequences(
+    cap.setText(new AppletFormatAdapter(alignPanel).formatSequences(
             e.getActionCommand(), viewport.getAlignment(),
             viewport.getShowJVSuffix()));
   }
@@ -2575,7 +2574,6 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
 
   public void changeColour(ColourSchemeI cs)
   {
-    int threshold = 0;
 
     if (cs != null)
     {
@@ -2598,15 +2596,6 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     }
     viewport.setGlobalColourScheme(cs);
 
-    if (alignPanel.getOverviewPanel() != null)
-    {
-      alignPanel.getOverviewPanel().updateOverviewImage();
-    }
-
-    jalview.structure.StructureSelectionManager
-            .getStructureSelectionManager(viewport.applet)
-            .sequenceColoursChanged(alignPanel);
-
     alignPanel.paintAlignment(true);
   }
 
@@ -3002,10 +2991,10 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
           MessageManager.getString("label.load_features_annotations"));
 
   MenuItem outputFeatures = new MenuItem(
-          MessageManager.getString("label.export_features").concat("..."));
+          MessageManager.getString("label.export_features"));
 
   MenuItem outputAnnotations = new MenuItem(
-          MessageManager.getString("label.export_annotations").concat("..."));
+          MessageManager.getString("label.export_annotations"));
 
   MenuItem closeMenuItem = new MenuItem(
           MessageManager.getString("action.close"));
@@ -3071,7 +3060,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
 
   MenuItem purinePyrimidineColour = new MenuItem();
 
-  MenuItem RNAInteractionColour = new MenuItem();
+  // MenuItem RNAInteractionColour = new MenuItem();
 
   MenuItem RNAHelixColour = new MenuItem();
 
@@ -3254,8 +3243,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     removeAllGapsMenuItem.setLabel(MessageManager
             .getString("action.remove_all_gaps"));
     removeAllGapsMenuItem.addActionListener(this);
-    removeRedundancyMenuItem.setLabel(MessageManager.getString(
-            "action.remove_redundancy").concat("..."));
+    removeRedundancyMenuItem.setLabel(MessageManager
+            .getString("action.remove_redundancy"));
     removeRedundancyMenuItem.addActionListener(this);
 
     /*
@@ -3279,7 +3268,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     grpsFromSelection.addActionListener(this);
     createGroup.setLabel(MessageManager.getString("action.create_group"));
     unGroup.setLabel(MessageManager.getString("action.remove_group"));
-    annotationColumnSelection.setLabel("Select by Annotation");
+    annotationColumnSelection.setLabel(MessageManager
+            .getString("action.select_by_annotation"));
     annotationColumnSelection.addActionListener(this);
 
     /*
@@ -3309,7 +3299,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     hideAllSelection.addActionListener(this);
     showAllHidden.addActionListener(this);
     featureSettings.setLabel(MessageManager
-            .getString("label.feature_settings"));
+            .getString("action.feature_settings"));
     featureSettings.addActionListener(this);
     sequenceFeatures.setLabel(MessageManager
             .getString("label.show_sequence_features"));
@@ -3441,9 +3431,9 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     purinePyrimidineColour.setLabel(MessageManager
             .getString("label.purine_pyrimidine"));
     purinePyrimidineColour.addActionListener(this);
-    RNAInteractionColour.setLabel(MessageManager
-            .getString("label.rna_interaction"));
-    RNAInteractionColour.addActionListener(this);
+    // RNAInteractionColour.setLabel(MessageManager
+    // .getString("label.rna_interaction"));
+    // RNAInteractionColour.addActionListener(this);
     RNAHelixColour.setLabel(MessageManager
             .getString("action.by_rna_helixes"));
     RNAHelixColour.addActionListener(this);
@@ -3874,7 +3864,6 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
   public SequenceStructureBinding addStructureViewInstance(
           Object jmolviewer, String[] sequenceIds)
   {
-    // TODO method never called - remove?
     Viewer viewer = null;
     try
     {
@@ -3951,7 +3940,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     boolean needtoadd = false;
     if (toaddpdb != null)
     {
-      Vector pdbe = toaddpdb.getPDBId();
+      Vector pdbe = toaddpdb.getAllPDBEntries();
       PDBEntry pdbentry = null;
       if (pdbe != null && pdbe.size() > 0)
       {
@@ -4210,4 +4199,36 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
   {
     this.splitFrame = sf;
   }
+
+    // may not need this
+  @Override
+  public void setShowSeqFeatures(boolean b)
+  {
+    // showSeqFeatures.setSelected(b);
+    viewport.setShowSequenceFeatures(b);
+
+  }
+
+  @Override
+  public void setMenusForViewport()
+  {
+    // setMenusFromViewport(viewport);
+
+  }
+  @Override
+  public void refreshFeatureUI(boolean enableIfNecessary)
+  {
+    if (enableIfNecessary)
+    {
+      sequenceFeatures.setState(true);
+      alignPanel.av.setShowSequenceFeatures(true);
+    }
+  }
+
+  @Override
+  public FeatureSettingsControllerI getFeatureSettingsUI()
+  {
+    return alignPanel.av.featureSettings;
+  }
+
 }