SequenceGroup selectionGroup;\r
int charHeight;\r
int charWidth;\r
+ boolean validCharWidth;\r
int wrappedWidth;\r
- Font font = new Font("SansSerif", Font.PLAIN, 10);\r
+ Font font;\r
AlignmentI alignment;\r
ColumnSelection colSel = new ColumnSelection();\r
int threshold;\r
AlignmentAnnotation consensus;\r
AlignmentAnnotation conservation;\r
AlignmentAnnotation quality;\r
+ boolean autoCalculateConsensus = true;\r
\r
/** DOCUMENT ME!! */\r
public int ConsPercGaps = 25; // JBPNote : This should be a scalable property!\r
\r
boolean antiAlias = false;\r
\r
+ boolean padGaps = false;\r
+\r
\r
public AlignViewport(AlignmentI al, boolean dataset)\r
{\r
showQuality = Cache.getDefault("SHOW_QUALITY", true);\r
showIdentity = Cache.getDefault("SHOW_IDENTITY", true);\r
\r
+ autoCalculateConsensus = Cache.getDefault("AUTO_CALC_CONSENSUS", true);\r
+\r
+ padGaps = Cache.getDefault("PAD_GAPS", false);\r
+\r
String fontName = Cache.getDefault("FONT_NAME", "SansSerif");\r
String fontStyle = Cache.getDefault("FONT_STYLE", Font.PLAIN + "") ;\r
String fontSize = Cache.getDefault("FONT_SIZE", "10");\r
}\r
catch (OutOfMemoryError error)\r
{\r
- javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
- "Out of memory calculating conservation!!"\r
- +\r
- "\nSee help files for increasing Java Virtual Machine memory."\r
- , "Out of memory",\r
- javax.swing.JOptionPane.WARNING_MESSAGE);\r
+ javax.swing.SwingUtilities.invokeLater(new Runnable()\r
+ {\r
+ public void run()\r
+ {\r
+ javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+ "Out of memory calculating conservation!!"\r
+ +\r
+ "\nSee help files for increasing Java Virtual Machine memory."\r
+ , "Out of memory",\r
+ javax.swing.JOptionPane.WARNING_MESSAGE);\r
+ }\r
+ });\r
+\r
System.out.println("Conservation calculation: " + error);\r
System.gc();\r
\r
\r
}catch(OutOfMemoryError error)\r
{\r
- javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
- "Out of memory calculating consensus!!"\r
- +\r
- "\nSee help files for increasing Java Virtual Machine memory."\r
- , "Out of memory",\r
- javax.swing.JOptionPane.WARNING_MESSAGE);\r
+ javax.swing.SwingUtilities.invokeLater(new Runnable()\r
+ {\r
+ public void run()\r
+ {\r
+ javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+ "Out of memory calc45ulating consensus!!"\r
+ +\r
+ "\nSee help files for increasing Java Virtual Machine memory."\r
+ , "Out of memory",\r
+ javax.swing.JOptionPane.WARNING_MESSAGE);\r
+ }\r
+ });\r
+\r
+\r
System.out.println("Consensus calculation: " + error);\r
System.gc();\r
}\r
java.awt.FontMetrics fm = c.getFontMetrics(font);\r
setCharHeight(fm.getHeight());\r
setCharWidth(fm.charWidth('M'));\r
+ validCharWidth = true;\r
}\r
\r
/**\r