AlignViewport av = af.viewport;\r
\r
JalviewModel object = new JalviewModel();\r
- object.setVamsasModel(new VamsasModel());\r
+ object.setVamsasModel(new jalview.binding.VamsasModel());\r
\r
object.setCreationDate(new java.util.Date(timeStamp));\r
object.setVersion(jalview.bin.Cache.getProperty("VERSION"));\r
tree.setThreshold(tp.treeCanvas.threshold);\r
\r
tree.setFitToWindow(tp.fitToWindow.getState());\r
- tree.setFontSize(tp.treeCanvas.fontSize);\r
+ tree.setFontName(tp.getTreeFont().getName());\r
+ tree.setFontSize(tp.getTreeFont().getSize());\r
+ tree.setFontStyle(tp.getTreeFont().getStyle());\r
tree.setMarkUnlinked(tp.placeholdersMenu.getState());\r
+\r
tree.setShowBootstrap(tp.bootstrapMenu.getState());\r
tree.setShowDistances(tp.distanceMenu.getState());\r
\r
}\r
while (jarentry != null);\r
}\r
+ catch(java.net.UnknownHostException ex)\r
+ {\r
+ ex.printStackTrace();\r
+ System.err.println("Couldn't locate Jalview XML file : " +\r
+ ex + "\n");\r
+ JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+ "Couldn't locate " + file,\r
+ "URL not found",\r
+ JOptionPane.WARNING_MESSAGE);\r
+\r
+ }\r
catch (Exception ex)\r
{\r
ex.printStackTrace();\r
System.err.println("Exception whilst loading jalview XML file : " +\r
ex + "\n");\r
JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
- "Couldn't locate " + file,\r
- "URL not found",\r
+ "Error loading " + file,\r
+ "Error loading Jalview file",\r
JOptionPane.WARNING_MESSAGE);\r
\r
}\r
\r
tp.fitToWindow.setState(tree.getFitToWindow());\r
tp.fitToWindow_actionPerformed(null);\r
- tp.treeCanvas.fontSize = tree.getFontSize();\r
- tp.fontSize.setText("Font Size - " + tree.getFontSize());\r
- tp.placeholdersMenu.setState(tree.getMarkUnlinked());\r
- tp.placeholdersMenu_actionPerformed(null);\r
- tp.bootstrapMenu.setState(tree.getShowBootstrap());\r
- tp.bootstrapMenu_actionPerformed(null);\r
- tp.distanceMenu.setState(tree.getShowDistances());\r
- tp.distanceMenu_actionPerformed(null);\r
+\r
+ if(tree.getFontName()!=null)\r
+ tp.setTreeFont(new java.awt.Font(tree.getFontName(),\r
+ tree.getFontStyle(),\r
+ tree.getFontSize()));\r
+ else\r
+ tp.setTreeFont(new java.awt.Font(view.getFontName(),\r
+ view.getFontStyle(),\r
+ tree.getFontSize()));\r
+\r
+ tp.showPlaceholders(tree.getMarkUnlinked());\r
+ tp.showBootstrap(tree.getShowBootstrap());\r
+ tp.showDistances(tree.getShowDistances());\r
+\r
tp.treeCanvas.threshold = tree.getThreshold();\r
\r
if (tree.getCurrentTree())\r