/*
- * 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)
+ * Copyright (C) 2015 The Jalview Authors
*
* This file is part of Jalview.
*
{
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)
{
}
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);
if (evt.getKeyCode() == KeyEvent.VK_ENTER && scriptWindow.isVisible())
{
jmb.eval(inputLine.getText());
- history.append("\n$ " + inputLine.getText());
+ addToHistory("$ " + inputLine.getText());
inputLine.setText("");
}
}
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);
+ }
+ }
}