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