secondaryPanelHolder.add(ssPanel, BorderLayout.CENTER);\r
idPanelHolder.add(idPanel, BorderLayout.CENTER);\r
idPanel.addNotify();\r
+\r
+ javax.swing.JFrame f = new javax.swing.JFrame();\r
+ f.addNotify();\r
+ FontMetrics fm = f.getGraphics().getFontMetrics(av.font);\r
+ AlignmentI al = av.getAlignment();\r
+\r
+ int i = 0;\r
+ int idWidth = 0;\r
+ while (i < al.getHeight() && al.getSequenceAt(i) != null)\r
+ {\r
+ SequenceI s = al.getSequenceAt(i);\r
+ String str = s.getDisplayId();\r
+ if (fm.stringWidth(str) > idWidth)\r
+ idWidth = fm.stringWidth(str);\r
+ i++;\r
+ }\r
+ hscrollFillerPanel.setPreferredSize(new Dimension(idWidth, 12));\r
+\r
scalePanelHolder.add(scalePanel, BorderLayout.CENTER);\r
scorePanelHolder.add(scorePanel, BorderLayout.CENTER);\r
seqPanelHolder.add(seqPanel, BorderLayout.CENTER);\r
\r
public void RefreshPanels()\r
{\r
- javax.swing.SwingUtilities.invokeLater(new Runnable()\r
- {\r
- public void run()\r
- {\r
-\r
requestFocus();\r
invalidate();\r
idPanelHolder.setPreferredSize(idPanel.idCanvas.getPreferredSize());\r
- hscrollFillerPanel.setPreferredSize(new Dimension(idPanel.idCanvas.\r
- getPreferredSize().width, 12));\r
+ if(idPanel.idCanvas.getPreferredSize()!=null)\r
+ hscrollFillerPanel.setPreferredSize(new Dimension(idPanel.idCanvas.getPreferredSize().width, 12));\r
idSpaceFillerPanel1.setPreferredSize(new Dimension(500,\r
av.charHeight / 2 + 12));\r
scalePanelHolder.setPreferredSize(new Dimension(500,\r
if (overviewPanel != null)\r
overviewPanel.updateOverviewImage();\r
\r
- }\r
- });\r
-\r
validate();\r
repaint();\r
}\r