import jalview.structure.StructureSelectionManager;
import jalview.structure.VamsasSource;
import jalview.util.MessageManager;
+import jalview.util.StringUtils;
import jalview.viewmodel.AlignmentViewport;
import jalview.ws.params.AutoCalcSetting;
{
AlignmentPanel[] aps = PaintRefresher.getAssociatedPanels(this
.getSequenceSetId());
- AlignmentPanel ap = null;
for (int p = 0; aps != null && p < aps.length; p++)
{
if (aps[p].av == this)
*/
AlignFrame newAlignFrame = new AlignFrame(al, AlignFrame.DEFAULT_WIDTH,
AlignFrame.DEFAULT_HEIGHT);
+ newAlignFrame.setTitle(title);
/*
* Identify protein and dna alignments. Make a copy of this one if opening
*/
AlignFrame copyMe = new AlignFrame(thisAlignment,
AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
- copyMe.setTitle(""); // TODO would like this AlignFrame.title here
+ copyMe.setTitle(getAlignPanel().alignFrame.getTitle());
final AlignFrame proteinFrame = al.isNucleotide() ? copyMe
: newAlignFrame;
final AlignFrame cdnaFrame = al.isNucleotide() ? newAlignFrame
: copyMe;
- newAlignFrame.setTitle(title);
cdnaFrame.setVisible(true);
proteinFrame.setVisible(true);
+ String proteinShortName = StringUtils.getLastToken(
+ proteinFrame.getTitle(), "/");
+ String dnaShortName = StringUtils.getLastToken(cdnaFrame.getTitle(),
+ "/");
+ String linkedTitle = MessageManager.formatMessage(
+ "label.linked_view_title", dnaShortName, proteinShortName);
JInternalFrame splitFrame = new SplitFrame(cdnaFrame, proteinFrame);
- Desktop.addInternalFrame(splitFrame, title, AlignFrame.DEFAULT_WIDTH,
+ Desktop.addInternalFrame(splitFrame, linkedTitle,
+ AlignFrame.DEFAULT_WIDTH,
AlignFrame.DEFAULT_HEIGHT);
/*
- * Set the frames to list for each other's edit and sort commands.
+ * Set the frames to listen for each other's edit and sort commands.
*/
ssm.addCommandListener(cdnaFrame.getViewport());
ssm.addCommandListener(proteinFrame.getViewport());
/*
- * cDNA view will mirror edits, selection, sorting, show/hide on protein
+ * 'Coding complement' (dna/protein) views will mirror each others' edits,
+ * selections, sorting etc as decided from time to time by the relevant
+ * authorities.
*/
proteinFrame.getViewport().setCodingComplement(cdnaFrame.getViewport());
}