public class FileTreeModel extends DefaultTreeModel implements FileTreeNode.FileTreeNodeListener
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CHINESE_ENCODING |
static String |
DEFAULT_ENCODING |
static String |
DEFAULT_NEGRA_ENCODING |
asksAllowsChildren, listenerList
Constructor and Description |
---|
FileTreeModel(FileTreeNode root) |
Modifier and Type | Method and Description |
---|---|
void |
addFileFolder(EnumMap<TregexGUI.FilterType,String> filters,
File[] files)
Forks off a new thread to load your files based on the filters you set in the interface
|
void |
addTreeModelListener(TreeModelListener l) |
protected void |
fireTreeStructureChanged(TreePath parentPath) |
FileTreeNode |
getChild(Object parent,
int childNum) |
int |
getChildCount(Object parent) |
static String |
getCurEncoding() |
int |
getIndexOfChild(Object parent,
Object child) |
FileTreeNode |
getRoot() |
static TreeReaderFactory |
getTRF() |
boolean |
isEmpty()
Returns true if the root has no children; false otherwise
|
boolean |
isLeaf(Object node) |
void |
removeTreeModelListener(TreeModelListener l) |
static void |
setCurEncoding(String curEncoding) |
static void |
setTRF(TreeReaderFactory trf) |
void |
treeNodeChanged(FileTreeNode n) |
asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getListeners, getPathToRoot, getPathToRoot, getTreeModelListeners, insertNodeInto, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, setAsksAllowsChildren, setRoot, valueForPathChanged
public static final String DEFAULT_ENCODING
public static final String DEFAULT_CHINESE_ENCODING
public static final String DEFAULT_NEGRA_ENCODING
public FileTreeModel(FileTreeNode root)
public void addTreeModelListener(TreeModelListener l)
addTreeModelListener
in interface TreeModel
addTreeModelListener
in class DefaultTreeModel
protected void fireTreeStructureChanged(TreePath parentPath)
public FileTreeNode getChild(Object parent, int childNum)
getChild
in interface TreeModel
getChild
in class DefaultTreeModel
public int getChildCount(Object parent)
getChildCount
in interface TreeModel
getChildCount
in class DefaultTreeModel
public int getIndexOfChild(Object parent, Object child)
getIndexOfChild
in interface TreeModel
getIndexOfChild
in class DefaultTreeModel
public boolean isLeaf(Object node)
isLeaf
in interface TreeModel
isLeaf
in class DefaultTreeModel
public void removeTreeModelListener(TreeModelListener l)
removeTreeModelListener
in interface TreeModel
removeTreeModelListener
in class DefaultTreeModel
public void treeNodeChanged(FileTreeNode n)
treeNodeChanged
in interface FileTreeNode.FileTreeNodeListener
public boolean isEmpty()
public FileTreeNode getRoot()
getRoot
in interface TreeModel
getRoot
in class DefaultTreeModel
public void addFileFolder(EnumMap<TregexGUI.FilterType,String> filters, File[] files)
public static TreeReaderFactory getTRF()
public static void setTRF(TreeReaderFactory trf)
public static String getCurEncoding()
public static void setCurEncoding(String curEncoding)