import jalview.structure.StructureSelectionManager;
import java.awt.BorderLayout;
+import java.awt.Component;
import java.awt.GridLayout;
+import java.awt.MouseInfo;
import java.awt.Panel;
+import java.awt.Point;
+import java.awt.Rectangle;
public class SplitFrame extends EmbmenuFrame
{
*/
public void init()
{
- setMenuBar(null);
- outermost = new Panel(new GridLayout(2, 1));
-
- Panel topPanel = new Panel();
- Panel bottomPanel = new Panel();
- outermost.add(topPanel);
- outermost.add(bottomPanel);
-
- addAlignFrameComponents(topFrame, topPanel);
- addAlignFrameComponents(bottomFrame, bottomPanel);
+ constructSplit();
/*
* Try to make and add dna/protein sequence mappings
ssm.addCommandListener(protein);
}
- /*
- * Expand protein to 3 times character width of dna
- */
+ setCharacterWidth(protein, cdna);
+ }
+
+ /**
+ *
+ */
+ protected void constructSplit()
+ {
+ setMenuBar(null);
+ outermost = new Panel(new GridLayout(2, 1));
+
+ Panel topPanel = new Panel();
+ Panel bottomPanel = new Panel();
+ outermost.add(topPanel);
+ outermost.add(bottomPanel);
+
+ addAlignFrameComponents(topFrame, topPanel);
+ addAlignFrameComponents(bottomFrame, bottomPanel);
+ }
+
+ /**
+ * Expand protein to 3 times character width of dna
+ *
+ * @param protein
+ * @param cdna
+ */
+ protected void setCharacterWidth(AlignViewport protein, AlignViewport cdna)
+ {
if (protein != null && cdna != null)
{
ViewStyleI vs = protein.getViewStyle();
vs.setCharWidth(3 * vs.getCharWidth());
protein.setViewStyle(vs);
}
-
}
/**