JAL-2295 status messages for Chimera attributes set and for failed
[jalview.git] / src / jalview / gui / ChimeraViewFrame.java
index 9b0d85b..fe4a000 100644 (file)
@@ -76,6 +76,10 @@ public class ChimeraViewFrame extends StructureViewerBase
 
   private Random random = new Random();
 
+  private int myWidth = 500;
+
+  private int myHeight = 150;
+
   /**
    * Initialise menu options.
    */
@@ -185,7 +189,9 @@ public class ChimeraViewFrame extends StructureViewerBase
    */
   protected void sendFeaturesToChimera()
   {
-    jmb.sendFeaturesToViewer(getAlignmentPanel());
+    int count = jmb.sendFeaturesToViewer(getAlignmentPanel());
+    statusBar.setText(MessageManager.formatMessage("label.attributes_set",
+            count));
   }
 
   /**
@@ -254,7 +260,7 @@ public class ChimeraViewFrame extends StructureViewerBase
       useAlignmentPanelForSuperposition(ap);
     }
     jmb.setColourBySequence(true);
-    setSize(400, 400); // probably should be a configurable/dynamic default here
+    setSize(myWidth, myHeight);
     initMenus();
 
     addingStructures = false;
@@ -851,10 +857,19 @@ public class ChimeraViewFrame extends StructureViewerBase
     return "Chimera";
   }
 
+  /**
+   * Sends commands to align structures according to associated alignment(s).
+   * 
+   * @return
+   */
   @Override
-  public void updateTitleAndMenus()
+  protected String alignStructs_withAllAlignPanels()
   {
-    super.updateTitleAndMenus();
-    viewerActionMenu.setVisible(true);
+    String reply = super.alignStructs_withAllAlignPanels();
+    if (reply != null)
+    {
+      statusBar.setText("Superposition failed: " + reply);
+    }
+    return reply;
   }
 }