JAL-1925 update source version in license
[jalview.git] / src / jalview / appletgui / AppletJmol.java
index e889467..d894a47 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
+ * Copyright (C) 2015 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -179,10 +179,8 @@ public class AppletJmol extends EmbmenuFrame implements
   {
     this.ap = ap;
     jmb = new AppletJmolBinding(this, ap.getStructureSelectionManager(),
-            new PDBEntry[]
-            { pdbentry }, new SequenceI[][]
-            { seq }, new String[][]
-            { chains }, protocol);
+            new PDBEntry[] { pdbentry }, new SequenceI[][] { seq },
+            new String[][] { chains }, protocol);
     jmb.setColourBySequence(true);
     if (pdbentry.getId() == null || pdbentry.getId().length() < 1)
     {
@@ -347,7 +345,9 @@ public class AppletJmol extends EmbmenuFrame implements
           }
           if (freader == null)
           {
-            throw new Exception(MessageManager.getString("exception.invalid_datasource_couldnt_obtain_reader"));
+            throw new Exception(
+                    MessageManager
+                            .getString("exception.invalid_datasource_couldnt_obtain_reader"));
           }
           jmb.viewer.openReader(pdbentry.getFile(), pdbentry.getId(),
                   freader);
@@ -558,7 +558,7 @@ public class AppletJmol extends EmbmenuFrame implements
     if (evt.getKeyCode() == KeyEvent.VK_ENTER && scriptWindow.isVisible())
     {
       jmb.eval(inputLine.getText());
-      history.append("\n$ " + inputLine.getText());
+      addToHistory("$ " + inputLine.getText());
       inputLine.setText("");
     }
 
@@ -701,4 +701,18 @@ public class AppletJmol extends EmbmenuFrame implements
     }
     return ap;
   }
+
+  /**
+   * Append the given text to the history object
+   * 
+   * @param text
+   */
+  public void addToHistory(String text)
+  {
+    // actually currently never initialised
+    if (history != null)
+    {
+      history.append("\n" + text);
+    }
+  }
 }