scalePanel = new ScalePanel(av, this);\r
idwidthAdjuster = new IdwidthAdjuster(this);\r
annotationPanel = new AnnotationPanel(this);\r
+\r
+ sequenceHolderPanel.add(annotationPanel, BorderLayout.SOUTH);\r
+\r
alabels = new AnnotationLabels(this);\r
\r
setAnnotationVisible(av.showAnnotation);\r
\r
idPanelHolder.add(idPanel, BorderLayout.CENTER);\r
idSpaceFillerPanel1.add(idwidthAdjuster, BorderLayout.CENTER);\r
- annotationScroller.add(annotationPanel);\r
annotationSpaceFillerHolder.add(alabels, BorderLayout.CENTER);\r
scalePanelHolder.add(scalePanel, BorderLayout.CENTER);\r
seqPanelHolder.add(seqPanel, BorderLayout.CENTER);\r
idPanel.idCanvas.setSize(d);\r
\r
hscrollFillerPanel.setSize(d.width, annotationPanel.getSize().height);\r
- annotationScroller.setSize(annotationPanel.getSize());\r
\r
idPanel.idCanvas.setSize(d.width, seqPanel.seqCanvas.getSize().height);\r
annotationSpaceFillerHolder.setSize(d.width,\r
{\r
// set idCanvas bufferedImage to null\r
// to prevent drawing old image\r
- idPanel.idCanvas.image =null;\r
+ idPanel.idCanvas.image = null;\r
FontMetrics fm = getFontMetrics(av.getFont());\r
\r
scalePanel.setSize(new Dimension(10, av.charHeight + fm.getDescent()));\r
idwidthAdjuster.setSize(new Dimension(10, av.charHeight + fm.getDescent()));\r
\r
-annotationPanel.image = null;\r
+ annotationPanel.image = null;\r
int ap = annotationPanel.adjustPanelHeight();\r
annotationPanel.repaint();\r
Dimension d = calculateIdWidth();\r
\r
Dimension calculateIdWidth()\r
{\r
- Frame frame = new Frame();\r
- frame.addNotify();\r
- Graphics g = frame.getGraphics();\r
- if (g == null)\r
+ if (av.nullFrame == null)\r
{\r
- Frame f = new Frame();\r
- f.addNotify();\r
- g = f.getGraphics();\r
+ av.nullFrame = new Frame();\r
+ av.nullFrame.addNotify();\r
}\r
\r
+ Graphics g = av.nullFrame.getGraphics();\r
+\r
FontMetrics fm = g.getFontMetrics(av.font);\r
AlignmentI al = av.getAlignment();\r
\r
i = 0;\r
if (al.getAlignmentAnnotation() != null)\r
{\r
- fm = g.getFontMetrics(frame.getFont());\r
+ fm = g.getFontMetrics(av.nullFrame.getFont());\r
while (i < al.getAlignmentAnnotation().length)\r
{\r
String label = al.getAlignmentAnnotation()[i].label;\r
if (!av.wrapAlignment)\r
{\r
annotationSpaceFillerHolder.setVisible(b);\r
- annotationScroller.setVisible(b);\r
+ annotationPanel.setVisible(b);\r
}\r
validate();\r
repaint();\r
\r
if (wrap)\r
{\r
- annotationScroller.setVisible(false);\r
+ annotationPanel.setVisible(false);\r
annotationSpaceFillerHolder.setVisible(false);\r
}\r
else if (av.showAnnotation)\r
{\r
- annotationScroller.setVisible(true);\r
+ annotationPanel.setVisible(true);\r
annotationSpaceFillerHolder.setVisible(true);\r
}\r
\r
BorderLayout borderLayout10 = new BorderLayout();\r
protected Panel hscrollFillerPanel = new Panel();\r
BorderLayout borderLayout11 = new BorderLayout();\r
- public Panel annotationScroller = new Panel();\r
BorderLayout borderLayout4 = new BorderLayout();\r
BorderLayout borderLayout2 = new BorderLayout();\r
\r
// this.setPreferredSize(new Dimension(220, 166));\r
seqPanelHolder.setBackground(Color.white);\r
idPanelHolder.setBackground(Color.white);\r
- annotationScroller.setLayout(borderLayout2);\r
sequenceHolderPanel.add(scalePanelHolder, BorderLayout.NORTH);\r
sequenceHolderPanel.add(seqPanelHolder, BorderLayout.CENTER);\r
seqPanelHolder.add(vscroll, BorderLayout.EAST);\r
- sequenceHolderPanel.add(annotationScroller, BorderLayout.SOUTH);\r
\r
// Panel3.add(secondaryPanelHolder, BorderLayout.SOUTH);\r
this.add(idPanelHolder, BorderLayout.WEST);\r