|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.swing.SaveTreeData
public class SaveTreeData
Saves data stored in a JTree to a file is several different formats.
Field Summary | |
---|---|
protected static FileExtensionFilter |
txtFilter
TXT extension file filter. |
Constructor Summary | |
---|---|
protected |
SaveTreeData()
Don't allow instantiation but do allow overrides. |
Method Summary | |
---|---|
static void |
saveTreeDataToFile(javax.swing.JTree tree,
java.lang.String title,
java.lang.String fileName)
Saves the tree data to a file. |
static void |
saveTreeDataToFile(java.awt.Window parentWindow,
javax.swing.JTree tree,
java.lang.String title)
Saves the tree model data to a file. |
static java.lang.String |
treeDataToText(javax.swing.JTree tree,
java.lang.String title)
Convert contents of a JTree to text file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static FileExtensionFilter txtFilter
Constructor Detail |
---|
protected SaveTreeData()
Method Detail |
---|
public static java.lang.String treeDataToText(javax.swing.JTree tree, java.lang.String title)
tree
- The tree containing the data to
convert to command separated values.title
- Title for tree.
public static void saveTreeDataToFile(javax.swing.JTree tree, java.lang.String title, java.lang.String fileName)
tree
- Tree holding data to save.title
- The title for the data. Null if no title.fileName
- The file name to which to save the data. public static void saveTreeDataToFile(java.awt.Window parentWindow, javax.swing.JTree tree, java.lang.String title)
parentWindow
- Parent window for file dialog.tree
- The tree whose data is to be saved.title
- The title for the tree data.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |