/**
* update alignment layout for viewport settings
- *
- * @param wrap
- * DOCUMENT ME!
*/
public void updateLayout()
{
idSpaceFillerPanel1.setVisible(!wrap);
+ AlignViewportI complement = av.getCodingComplement();
+ if (complement != null)
+ {
+ SplitFrame splitFrame = (SplitFrame) alignFrame
+ .getSplitViewContainer();
+ splitFrame.adjustLayout();
+ }
repaint();
}
.getCodingComplement()).antiAlias = ap.av.antiAlias;
SplitFrame sv = (SplitFrame) ap.alignFrame.getSplitViewContainer();
sv.adjustLayout();
- sv.repaint();
}
-
}
/**
SplitFrame splitFrame = (SplitFrame) ap.alignFrame
.getSplitViewContainer();
splitFrame.adjustLayout();
- splitFrame.repaint();
}
}
SplitFrame splitFrame = (SplitFrame) ap.alignFrame
.getSplitViewContainer();
splitFrame.adjustLayout();
- splitFrame.repaint();
}
}
final SplitFrame splitFrame = (SplitFrame) ap.alignFrame
.getSplitViewContainer();
splitFrame.adjustLayout();
- splitFrame.repaint();
}
/**
*/
public void adjustLayout()
{
+ final AlignViewport topViewport = ((AlignFrame) getTopFrame()).viewport;
+ final AlignViewport bottomViewport = ((AlignFrame) getBottomFrame()).viewport;
+
/*
- * Ensure sequence ids are the same width so sequences line up
+ * Ensure sequence ids are the same width so sequences line up;
+ * reduce the idwidth of a panel with a longer wrapped left scale
*/
- int w1 = ((AlignFrame) getTopFrame()).getViewport().getIdWidth();
- int w2 = ((AlignFrame) getBottomFrame()).getViewport().getIdWidth();
+ int w1 = topViewport.getIdWidth();
+ int w2 = bottomViewport.getIdWidth();
+ int topScaleLeft = topViewport.getWrapAlignment()
+ ? ((AlignFrame) getTopFrame()).alignPanel
+ .getSeqPanel().seqCanvas.getLabelWidthWest()
+ : 0;
+ int bottomScaleLeft = bottomViewport.getWrapAlignment()
+ ? ((AlignFrame) getBottomFrame()).alignPanel
+ .getSeqPanel().seqCanvas.getLabelWidthWest()
+ : 0;
int w3 = Math.max(w1, w2);
- if (w1 != w3)
- {
- ((AlignFrame) getTopFrame()).getViewport().setIdWidth(w3);
- }
- if (w2 != w3)
- {
- ((AlignFrame) getBottomFrame()).getViewport().setIdWidth(w3);
- }
+ topViewport
+ .setIdWidth(w3 - Math.max(0, topScaleLeft - bottomScaleLeft));
+ bottomViewport
+ .setIdWidth(w3 - Math.max(0, bottomScaleLeft - topScaleLeft));
/*
* Scale protein to either 1 or 3 times character width of 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
int scale = protein.isScaleProteinAsCdna() ? 3 : 1;
protein.setCharWidth(scale * cdna.getViewStyle().getCharWidth());
}
+
+ repaint();
}
/**