public void saveOrientation(String saveName, float[] pymolView) { if (saveName.equalsIgnoreCase("DELETE")) { deleteSavedType("Orientation_"); return; } Orientation o = new Orientation(vwr, saveName.equalsIgnoreCase("default"), pymolView); o.saveName = lastOrientation = "Orientation_" + saveName; saved.put(o.saveName, o); }
String getSavedOrientationText(String saveName) { Orientation o; if (saveName != null) { o = getOrientationFor(saveName); return (o == null ? "" : o.getMoveToText(true)); } SB sb = new SB(); for (Entry<String, Object> e : saved.entrySet()) { String name = e.getKey(); if (name.startsWith("Orientation_")) sb.append(((Orientation) e.getValue()).getMoveToText(true)); } return sb.toString(); }
public boolean restoreOrientation(String saveName, float timeSeconds, boolean isAll) { Orientation o = getOrientationFor(saveName); return (o != null && o.restore(timeSeconds, isAll)); }