|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.tools.JarTreeModel
public class JarTreeModel
A tree model to display files and jar/zip contents.
| Field Summary | |
|---|---|
protected java.util.Map<java.io.File,java.util.Map<java.lang.String,org.opensourcephysics.tools.JarTreeModel.JarNode>> |
pathMaps
|
protected java.io.File |
root
|
protected java.util.Map<java.io.File,org.opensourcephysics.tools.JarTreeModel.JarNode[]> |
topLevelNodeArrays
|
| Constructor Summary | |
|---|---|
JarTreeModel(java.io.File root)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addTreeModelListener(javax.swing.event.TreeModelListener l)
|
java.lang.Object |
getChild(java.lang.Object parent,
int index)
Gets the child node at a specified index. |
java.lang.Object |
getChild(java.lang.Object parent,
java.lang.String name)
Gets a child node with a given name. |
int |
getChildCount(java.lang.Object parent)
Determines the number of child nodes for the specified node. |
protected java.util.Collection<java.lang.Object[]> |
getDescendantPaths(java.lang.Object[] parentPath)
Returns all descendant paths for a parent path. |
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
Gets the index of the specified child node. |
org.opensourcephysics.tools.JarTreeModel.JarNode |
getJarNode(java.io.File jarFile,
java.lang.String path)
|
org.opensourcephysics.tools.JarTreeModel.JarNode[] |
getJarNodes(java.io.File jarFile)
|
java.lang.Object |
getRoot()
Gets the root of this tree model. |
boolean |
isLeaf(java.lang.Object node)
Returns true if the specified node is a leaf. |
void |
removeTreeModelListener(javax.swing.event.TreeModelListener l)
|
void |
valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newvalue)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.io.File root
protected java.util.Map<java.io.File,org.opensourcephysics.tools.JarTreeModel.JarNode[]> topLevelNodeArrays
protected java.util.Map<java.io.File,java.util.Map<java.lang.String,org.opensourcephysics.tools.JarTreeModel.JarNode>> pathMaps
| Constructor Detail |
|---|
public JarTreeModel(java.io.File root)
root - a directory file| Method Detail |
|---|
public java.lang.Object getRoot()
getRoot in interface javax.swing.tree.TreeModelpublic boolean isLeaf(java.lang.Object node)
isLeaf in interface javax.swing.tree.TreeModelnode - the tree node
public int getChildCount(java.lang.Object parent)
getChildCount in interface javax.swing.tree.TreeModelparent - the parent node
public java.lang.Object getChild(java.lang.Object parent,
int index)
getChild in interface javax.swing.tree.TreeModelparent - the parent nodeindex - the index
public int getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
getIndexOfChild in interface javax.swing.tree.TreeModelparent - the parent nodechild - the child node
public void valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newvalue)
valueForPathChanged in interface javax.swing.tree.TreeModelpublic void addTreeModelListener(javax.swing.event.TreeModelListener l)
addTreeModelListener in interface javax.swing.tree.TreeModelpublic void removeTreeModelListener(javax.swing.event.TreeModelListener l)
removeTreeModelListener in interface javax.swing.tree.TreeModel
public java.lang.Object getChild(java.lang.Object parent,
java.lang.String name)
parent - the parent nodename - the name
protected java.util.Collection<java.lang.Object[]> getDescendantPaths(java.lang.Object[] parentPath)
parent - the parent Object[] path
public org.opensourcephysics.tools.JarTreeModel.JarNode getJarNode(java.io.File jarFile,
java.lang.String path)
public org.opensourcephysics.tools.JarTreeModel.JarNode[] getJarNodes(java.io.File jarFile)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||