public class SymbolLibrary extends javax.swing.tree.DefaultTreeModel implements ILibraryModel
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
rootDirString |
Modifier | Constructor and Description |
---|---|
protected |
SymbolLibrary(java.io.File rootDir) |
Modifier and Type | Method and Description |
---|---|
void |
addElement(java.lang.Object element,
java.lang.String elementName,
java.lang.Object containerFolder) |
void |
addFolder(java.lang.Object parentFolder,
java.lang.String folderName) |
void |
addTreeModelListener(javax.swing.event.TreeModelListener l) |
java.lang.Object |
getChild(java.lang.Object parent,
int index) |
int |
getChildCount(java.lang.Object parent) |
java.lang.Object |
getElement(java.lang.Object containerFolder,
java.lang.String elementName) |
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child) |
static SymbolLibrary |
getInstance() |
java.lang.Object |
getRoot() |
boolean |
isLeaf(java.lang.Object node) |
void |
removeElement(java.lang.Object element,
java.lang.Object containerFolder) |
void |
removeFolder(java.lang.Object folderToRemove) |
void |
removeTreeModelListener(javax.swing.event.TreeModelListener l) |
void |
valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue) |
asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getListeners, getPathToRoot, getPathToRoot, getTreeModelListeners, insertNodeInto, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, setAsksAllowsChildren, setRoot
public static SymbolLibrary getInstance()
public java.lang.Object getRoot()
getRoot
in interface javax.swing.tree.TreeModel
getRoot
in class javax.swing.tree.DefaultTreeModel
public int getChildCount(java.lang.Object parent)
getChildCount
in interface javax.swing.tree.TreeModel
getChildCount
in class javax.swing.tree.DefaultTreeModel
public boolean isLeaf(java.lang.Object node)
isLeaf
in interface javax.swing.tree.TreeModel
isLeaf
in class javax.swing.tree.DefaultTreeModel
public void addTreeModelListener(javax.swing.event.TreeModelListener l)
addTreeModelListener
in interface javax.swing.tree.TreeModel
addTreeModelListener
in class javax.swing.tree.DefaultTreeModel
public void removeTreeModelListener(javax.swing.event.TreeModelListener l)
removeTreeModelListener
in interface javax.swing.tree.TreeModel
removeTreeModelListener
in class javax.swing.tree.DefaultTreeModel
public void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
valueForPathChanged
in interface javax.swing.tree.TreeModel
valueForPathChanged
in class javax.swing.tree.DefaultTreeModel
public java.lang.Object getChild(java.lang.Object parent, int index)
getChild
in interface javax.swing.tree.TreeModel
getChild
in class javax.swing.tree.DefaultTreeModel
public int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
getIndexOfChild
in interface javax.swing.tree.TreeModel
getIndexOfChild
in class javax.swing.tree.DefaultTreeModel
public java.lang.Object getElement(java.lang.Object containerFolder, java.lang.String elementName)
getElement
in interface ILibraryModel
public void addElement(java.lang.Object element, java.lang.String elementName, java.lang.Object containerFolder)
addElement
in interface ILibraryModel
public void addFolder(java.lang.Object parentFolder, java.lang.String folderName)
addFolder
in interface ILibraryModel
public void removeElement(java.lang.Object element, java.lang.Object containerFolder)
removeElement
in interface ILibraryModel
public void removeFolder(java.lang.Object folderToRemove)
removeFolder
in interface ILibraryModel