/**
* Do any tweaking and twerking of the layout wanted.
*/
- private void adjustLayout()
+ public void adjustLayout()
{
/*
* Ensure sequence ids are the same width for good alignment.
/*
* Set the character width for protein to 3 times that for dna.
*/
- final AlignViewport topViewport = ((AlignFrame) getTopFrame()).viewport;
- final AlignViewport bottomViewport = ((AlignFrame) getBottomFrame()).viewport;
- final AlignmentI topAlignment = topViewport.getAlignment();
- final AlignmentI bottomAlignment = bottomViewport.getAlignment();
- AlignmentViewport cdna = topAlignment.isNucleotide() ? topViewport
- : (bottomAlignment.isNucleotide() ? bottomViewport : null);
- AlignmentViewport protein = !topAlignment.isNucleotide() ? topViewport
- : (!bottomAlignment.isNucleotide() ? bottomViewport : null);
- if (protein != null && cdna != null)
+ boolean scaleThreeToOne = true; // TODO a new Preference option?
+ if (scaleThreeToOne)
{
- ViewStyleI vs = cdna.getViewStyle();
- vs.setCharWidth(3 * vs.getCharWidth());
- protein.setViewStyle(vs);
+ final AlignViewport topViewport = ((AlignFrame) getTopFrame()).viewport;
+ final AlignViewport bottomViewport = ((AlignFrame) getBottomFrame()).viewport;
+ final AlignmentI topAlignment = topViewport.getAlignment();
+ final AlignmentI bottomAlignment = bottomViewport.getAlignment();
+ AlignmentViewport cdna = topAlignment.isNucleotide() ? topViewport
+ : (bottomAlignment.isNucleotide() ? bottomViewport : null);
+ AlignmentViewport protein = !topAlignment.isNucleotide() ? topViewport
+ : (!bottomAlignment.isNucleotide() ? bottomViewport : null);
+ if (protein != null && cdna != null)
+ {
+ ViewStyleI vs = cdna.getViewStyle();
+ vs.setCharWidth(3 * vs.getCharWidth());
+ protein.setViewStyle(vs);
+ }
}
}