List of usage examples for javax.swing.text.html HTMLWriter HTMLWriter
public HTMLWriter(Writer w, HTMLDocument doc)
From source file:plugin.notes.gui.NotesTreeNode.java
/** Saves this node's data. */ public void save() { if (dirty) {// w w w .j ava 2 s . c o m try { File notes = new File(dir.getAbsolutePath() + File.separator + DATA_HTML); if (!notes.exists()) { notes.createNewFile(); } if (pane != null) { FileWriter fw = new FileWriter(notes); HTMLWriter hw = new HTMLWriter(fw, notesDoc); hw.write(); fw.flush(); fw.close(); dirty = false; } } catch (Exception e) { Logging.errorPrint(e.getMessage(), e); } } }