*\r
* @param e DOCUMENT ME!\r
*/\r
- public void fontSize_actionPerformed(ActionEvent e)\r
+ public void font_actionPerformed(ActionEvent e)\r
{\r
if (treeCanvas == null)\r
{\r
return;\r
}\r
\r
- String size = fontSize.getText().substring(fontSize.getText().indexOf("-") +\r
- 1);\r
-\r
- Object selection = JOptionPane.showInternalInputDialog(Desktop.desktop,\r
- "Select font size", "Font size", JOptionPane.QUESTION_MESSAGE,\r
- null,\r
- new String[]\r
- {\r
- "1", "2", "4", "6", "8", "10", "12", "14", "16", "18", "20"\r
- }, "Font Size - " + size);\r
-\r
- if (selection != null)\r
- {\r
- fontSize.setText("Font Size - " + selection);\r
+ FontChooser fontchooser = new FontChooser(this);\r
+ }\r
\r
- int i = Integer.parseInt(selection.toString());\r
- treeCanvas.setFontSize(i);\r
- }\r
+ public Font getFont()\r
+ {\r
+ return treeCanvas.font;\r
+ }\r
\r
- scrollPane.setViewportView(treeCanvas);\r
+ public void setFont(Font font)\r
+ {\r
+ if(treeCanvas!=null)\r
+ treeCanvas.setFont(font);\r
}\r
\r
/**\r