{
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);
+ }
+ }
}