|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
org.opensourcephysics.tools.LibraryTreeNode
public class LibraryTreeNode
A DefaultMutableTreeNode for a library collection tree.
| Field Summary | |
|---|---|
protected boolean |
editable
|
protected static java.util.HashMap<java.lang.String,java.net.URL> |
htmlURLs
|
protected LibraryResource |
record
|
protected java.util.ArrayList<LibraryResource> |
resources
|
protected static java.util.HashMap<java.lang.String,java.net.URL> |
targetURLs
|
protected LibraryTreePanel |
treePanel
|
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Constructor Summary | |
|---|---|
protected |
LibraryTreeNode(LibraryResource resource,
LibraryTreePanel treePanel)
Constructs a node with a LibraryResource. |
| Method Summary | |
|---|---|
protected boolean |
createChildNodes()
Creates the child nodes of this node if this is a collection node. |
protected java.lang.String |
getAbsoluteTarget()
Returns the absolute target path of this node's resource. |
protected java.lang.String |
getBasePath()
Returns the base path of this node's resource. |
protected java.util.ArrayList<LibraryResource> |
getChildResources(java.lang.String[] types)
Returns this node's child resources, if any, of a given set of types. |
protected java.lang.String |
getHTMLPath()
Returns the html path of this node's resource. |
protected java.lang.String |
getHTMLString()
Returns an HTML string that describes this node's resource. |
protected java.net.URL |
getHTMLURL()
Returns the html URL of this node's resource, or null if html path is empty or invalid. |
protected java.lang.String |
getName()
Returns the name of this node's resource. |
protected java.lang.String |
getTarget()
Returns the target of this node's resource. |
protected java.net.URL |
getTargetURL()
Returns the target URL of this node's resource, or null if target path is empty or invalid. |
protected boolean |
isEditable()
Determines if this node is editable. |
protected void |
setBasePath(java.lang.String path)
Sets the base path of this node's resource. |
protected void |
setEditable(boolean edit)
Sets the editable property for this node. |
protected void |
setHTMLPath(java.lang.String path)
Sets the html path of this node's resource. |
protected void |
setName(java.lang.String name)
Sets the name of this node's resource. |
protected void |
setTarget(java.lang.String path)
Sets the target of this node's resource. |
protected void |
setType(java.lang.String type)
Sets the type of this node's resource. |
java.lang.String |
toString()
Used by the tree node to get the display name. |
| Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static java.util.HashMap<java.lang.String,java.net.URL> htmlURLs
protected static java.util.HashMap<java.lang.String,java.net.URL> targetURLs
protected LibraryResource record
protected boolean editable
protected LibraryTreePanel treePanel
protected java.util.ArrayList<LibraryResource> resources
| Constructor Detail |
|---|
protected LibraryTreeNode(LibraryResource resource,
LibraryTreePanel treePanel)
resource - the resourcetreePanel - the LibraryTreePanel that will use the node| Method Detail |
|---|
protected boolean createChildNodes()
protected java.lang.String getName()
protected java.lang.String getBasePath()
protected java.lang.String getHTMLPath()
protected java.net.URL getHTMLURL()
protected java.lang.String getHTMLString()
protected java.lang.String getTarget()
protected java.lang.String getAbsoluteTarget()
protected java.net.URL getTargetURL()
public java.lang.String toString()
toString in class javax.swing.tree.DefaultMutableTreeNodeprotected boolean isEditable()
protected void setEditable(boolean edit)
edit - true to make this node editableprotected void setName(java.lang.String name)
name - the nameprotected void setTarget(java.lang.String path)
path - the target pathprotected void setHTMLPath(java.lang.String path)
path - the html pathprotected void setBasePath(java.lang.String path)
path - the base pathprotected void setType(java.lang.String type)
type - the typeprotected java.util.ArrayList<LibraryResource> getChildResources(java.lang.String[] types)
types - an array of resource types
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||