import jalview.api.ViewStyleI;
import jalview.api.analysis.ScoreModelI;
import jalview.bin.Cache;
+import jalview.bin.Jalview;
import jalview.commands.CommandI;
import jalview.commands.EditCommand;
import jalview.commands.EditCommand.Action;
*/
void init()
{
- progressBar = new ProgressBar(this.statusPanel, this.statusBar);
+ if (!Jalview.isHeadlessMode())
+ {
+ progressBar = new ProgressBar(this.statusPanel, this.statusBar);
+ }
avc = new jalview.controller.AlignViewController(this, viewport,
alignPanel);
{
warningMessage("Cannot save file " + fileName + " using format "
+ format, "Alignment output format not supported");
- saveAs_actionPerformed(null);
- // JBPNote need to have a raise_gui flag here
+ if (!Jalview.isHeadlessMode())
+ {
+ saveAs_actionPerformed(null);
+ }
return false;
}
return ed;
}
- private static int[] getStartEnd(int[] aligmentStartEnd,
+ public static int[] getStartEnd(int[] aligmentStartEnd,
List<int[]> hiddenCols)
{
int startPos = aligmentStartEnd[0];
for (int[] hiddenCol : hiddenCols)
{
// System.out.println("comparing : " + hiddenCol[0] + "-" + hiddenCol[1]);
-
lowestRange = (hiddenCol[0] <= startPos) ? hiddenCol : lowestRange;
higestRange = (hiddenCol[1] >= endPos) ? hiddenCol : higestRange;
}
if (closeAllTabs)
{
+ /*
+ * this will raise an INTERNAL_FRAME_CLOSED event and this method will
+ * be called recursively, with the frame now in 'closed' state
+ */
this.setClosed(true);
}
} catch (Exception ex)
}
/*
- * Views share the same edits, undo and redo stacks, mappings.
+ * Views share the same edits undo and redo stacks
*/
newap.av.setHistoryList(viewport.getHistoryList());
newap.av.setRedoList(viewport.getRedoList());
- newap.av.getAlignment().setCodonFrames(
- viewport.getAlignment().getCodonFrames());
+
+ /*
+ * Views share the same mappings; need to deregister any new mappings
+ * created by copyAlignPanel, and register the new reference to the shared
+ * mappings
+ */
+ newap.av.replaceMappings(viewport.getAlignment());
newap.av.viewName = getNewViewName(viewTitle);
// temporary flag until SplitFrame is released
boolean asSplitFrame = Cache.getDefault(
- Preferences.ENABLE_SPLIT_FRAME, false);
+ Preferences.ENABLE_SPLIT_FRAME, true);
if (asSplitFrame)
{
/*
"Exception during translation. Please report this !", ex);
final String msg = MessageManager
.getString("label.error_when_translating_sequences_submit_bug_report");
- final String title = MessageManager
+ final String errorTitle = MessageManager
.getString("label.implementation_error")
+ MessageManager.getString("translation_failed");
- JOptionPane.showMessageDialog(Desktop.desktop, msg, title,
+ JOptionPane.showMessageDialog(Desktop.desktop, msg, errorTitle,
JOptionPane.ERROR_MESSAGE);
return;
}
{
final String msg = MessageManager
.getString("label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation");
- final String title = MessageManager
+ final String errorTitle = MessageManager
.getString("label.translation_failed");
- JOptionPane.showMessageDialog(Desktop.desktop, msg, title,
+ JOptionPane.showMessageDialog(Desktop.desktop, msg, errorTitle,
JOptionPane.WARNING_MESSAGE);
}
else
"label.translation_of_params", new Object[]
{ this.getTitle() });
af.setTitle(newTitle);
- if (Cache.getDefault(Preferences.ENABLE_SPLIT_FRAME, false))
+ if (Cache.getDefault(Preferences.ENABLE_SPLIT_FRAME, true))
{
final SequenceI[] seqs = viewport.getSelectionAsNewSequence();
- viewport.openSplitFrame(af, new Alignment(seqs),
- al.getCodonFrames());
+ viewport.openSplitFrame(af, new Alignment(seqs));
}
else
{
sf.setComplementVisible(this, show);
}
}
-
}
class PrintThread extends Thread