*/\r
public void updateFromPreferences()\r
{\r
- showFullId = Preferences.showFullId;\r
- showAnnotation = Preferences.showAnnotation;\r
- showConservation = Preferences.showConservation;\r
- showQuality = Preferences.showQuality;\r
- showIdentity = Preferences.showIdentity;\r
- showFullId = Preferences.showFullId;\r
-\r
- String fontName = Preferences.fontName;\r
- String fontStyle = Preferences.fontStyle;\r
- String fontSize = Cache.getProperty("FONT_SIZE");\r
-\r
- if ((fontName != null) && (fontStyle != null) && (fontSize != null))\r
- {\r
- int style = 0;\r
+ showFullId = Cache.getDefault("SHOW_FULL_ID", true);\r
+ showAnnotation = Cache.getDefault("SHOW_ANNOTATIONS", true);\r
+ showConservation = Cache.getDefault("SHOW_CONSERVATION", true);\r
\r
- if (fontStyle.equals("bold"))\r
- {\r
- style = 1;\r
- }\r
- else if (fontStyle.equals("italic"))\r
- {\r
- style = 2;\r
- }\r
+ showQuality = Cache.getDefault("SHOW_QUALITY", true);\r
+ showIdentity = Cache.getDefault("SHOW_IDENTITY", true);\r
\r
- setFont(new Font(fontName, style, Integer.parseInt(fontSize)));\r
- }\r
- else\r
- {\r
- setFont(font);\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
+ int style = 0;\r
+\r
+ if (fontStyle.equals("bold"))\r
+ {\r
+ style = 1;\r
+ }\r
+ else if (fontStyle.equals("italic"))\r
+ {\r
+ style = 2;\r
+ }\r
+\r
+ setFont(new Font(fontName, style, Integer.parseInt(fontSize)));\r
+\r
+\r
+ alignment.setGapCharacter( Cache.getDefault("GAP_SYMBOL", "-").charAt(0) );\r
\r
- alignment.setGapCharacter(Preferences.gapSymbol);\r
\r
// We must set conservation and consensus before setting colour,\r
// as Blosum and Clustal require this to be done\r
updateConservation();\r
updateConsensus();\r
\r
- if (Preferences.defaultColour != null)\r
+ if (jalview.bin.Cache.getProperty("DEFAULT_COLOUR") != null)\r
{\r
- globalColourScheme = ColourSchemeProperty.getColour(alignment,\r
- Preferences.defaultColour);\r
+ globalColourScheme = ColourSchemeProperty.getColour(alignment,\r
+ jalview.bin.Cache.getProperty("DEFAULT_COLOUR"));\r
\r
if (globalColourScheme instanceof UserColourScheme)\r
{\r
}\r
}\r
\r
+\r
+\r
/**\r
* DOCUMENT ME!\r
*\r