|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pajes.html.Tag
org.pajes.html.TraversableElement
org.pajes.html.Container
org.pajes.html.Paje
org.pajes.html.tree.TreePaje
public class TreePaje
Creates a frame set containing a client-side tree control.
This class also contains static methods to return an appropriate line of
JavaScript that will call the various tree modification functions. Use
TreeFactory.create(java.text.MessageFormat, java.util.Enumeration>, org.pajes.html.PajeFactory.Document) to create new instances of TreePaje.
| Nested Class Summary | |
|---|---|
class |
TreePaje.Node
Inner class representing a node of the tree. |
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_NODE_NAME_PREFIX
The prefix for the default node name. |
static java.lang.String |
DOCUMENT_FRAME
The name of the frame that will contain the result when the user selects a node in the tree. |
static java.lang.String |
ROOT_NODE_NAME
The name of the root node ("root"). |
static java.lang.String |
TREE_FRAME
The name of the frame that will contain the tree display. |
| Fields inherited from class org.pajes.html.Tag |
|---|
ON_CLICK_ATTRIBUTE, TAG_CLOSE, TAG_LEFT, TAG_RIGHT |
| Constructor Summary | |
|---|---|
TreePaje()
Creates an HTML document containing a Tree frame set. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Allows a tag to be cloned. |
static java.lang.String |
jsChangeNodeDescription(java.lang.String name,
java.lang.String description)
Returns a line of JavaScript that will alter the text of the specified node in the tree. |
static java.lang.String |
jsChangeNodeURL(java.lang.String name,
java.lang.String url)
Returns a line of JavaScript that will alter the URL of the specified node in the tree. |
static java.lang.String |
jsCloseNode(java.lang.String name)
Returns a line of JavaScript that will close the specified node in the tree. |
static java.lang.String |
jsCreateNode(java.lang.String name,
java.lang.String description,
java.lang.String url)
Returns a line of JavaScript that will create a new node. |
static java.lang.String |
jsHighlightNode(java.lang.String name,
boolean on)
Returns a line of JavaScript that will alter the highlighting of a specified node in the tree. |
static java.lang.String |
jsInsertNode(java.lang.String name,
java.lang.String parent,
java.lang.String sibling,
boolean insertAsPreviousSibling)
Returns a line of JavaScript that will insert the specified node in the tree. |
static java.lang.String |
jsMoveNode(java.lang.String name,
java.lang.String parent,
java.lang.String sibling,
boolean insertAsPreviousSibling)
Returns a line of JavaScript that will move the specified node from its current parent to a new parent. |
static java.lang.String |
jsOpenNode(java.lang.String name)
Returns a line of JavaScript that will open the specified node in the tree. |
static java.lang.String |
jsOpenParentNode(java.lang.String name)
Returns a line of JavaScript that will open the parent of the specified node in the tree. |
static java.lang.String |
jsRedrawTree()
Returns a line of JavaScript that will redraw the tree. |
static java.lang.String |
jsRemoveNode(java.lang.String name)
Returns a line of JavaScript that will remove the specified node from the tree. |
TreePaje.Node |
makeNode(java.lang.String description,
java.lang.String url,
boolean isOpen)
Creates a new Node with a default name of DEFAULT_NODE_NAME_PREFIX suffixed with a sequential number starting at
0. |
TreePaje.Node |
makeNode(java.lang.String name,
java.lang.String description,
java.lang.String url,
boolean isOpen)
Creates a new Node. |
TreePaje |
setBaseHREF(java.lang.String url)
Sets the base HREF of documents that will appear in the DOCUMENT_FRAME. |
TreePaje.Node |
setRootNode(java.lang.String description,
java.lang.String url,
boolean isOpen)
Sets the top-most (root) tree node. |
TreePaje |
setTreeTitle(java.lang.String treeTitle)
Sets the title of the tree, which will appear above the root node. |
| Methods inherited from class org.pajes.html.Paje |
|---|
add, add, destroy, getBody, getDocType, getDocTypeHeader, getHead, getXMLEncoding, getXMLVersion, isFirstClone, replace, setCached, setDestroyAfterWrite, setDocType, setDocType, setOnLoadAlert, setXHTMLCompliance, setXMLEncoding, setXMLVersion, toString, useCompression, usePersistentConnection, write, write |
| Methods inherited from class org.pajes.html.Container |
|---|
add, add, addContent, clear, delete, delete, get, getContent, getContents, getPosition, insert, set, setContent, setContent, size, writeContent |
| Methods inherited from class org.pajes.html.TraversableElement |
|---|
dump, dump, getAll, getFieldByName, getFirstFieldByName, getFirstTagByAttribute, getFirstTagByClass, getFirstTagByID, getFirstTagByName, getTagByAttribute, getTagByClass, getTagByID, getTagByName, setWritable |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.pajes.html.Traversable |
|---|
isWritable |
| Methods inherited from interface org.pajes.html.HTML |
|---|
getContainer, getDocument, getId, getParent, getWritePermission, isChildOf, isChildOf, setContainer, setParent, setWritePermission |
| Field Detail |
|---|
public static final java.lang.String ROOT_NODE_NAME
public static final java.lang.String DEFAULT_NODE_NAME_PREFIX
makeNode(String, String, boolean),
Constant Field Valuespublic static final java.lang.String DOCUMENT_FRAME
public static final java.lang.String TREE_FRAME
| Constructor Detail |
|---|
public TreePaje()
TreeFactory.create(java.text.MessageFormat, java.util.Enumeration>, org.pajes.html.PajeFactory.Document).
| Method Detail |
|---|
public static java.lang.String jsChangeNodeDescription(java.lang.String name,
java.lang.String description)
Note that this JavaScript function is for use after the tree has been
displayed, and should be called only from an HTML page returned to the
DOCUMENT_FRAME.
name - the JavaScript variable name of the node.description - the description to appear on the tree.
public static java.lang.String jsChangeNodeURL(java.lang.String name,
java.lang.String url)
Note that this JavaScript function is for use after the tree has been
displayed, and should be called only from an HTML page returned to the
DOCUMENT_FRAME.
name - the JavaScript variable name of the node.url - the destination URL when this node is selected. If null,
selecting the node will have no effect.
public static java.lang.String jsCloseNode(java.lang.String name)
Note that this JavaScript function is for use after the tree has been
displayed, and should be called only from an HTML page returned to the
DOCUMENT_FRAME.
name - the JavaScript variable name of the node.
public static java.lang.String jsCreateNode(java.lang.String name,
java.lang.String description,
java.lang.String url)
Note that this JavaScript function is for use after the tree has been
displayed, and should be called only from an HTML page returned to the
DOCUMENT_FRAME.
name - the JavaScript name of this node. This must be unique within
the tree.description - the description to appear on the tree.url - the destination URL when this node is selected. If null,
selecting the node will have no effect.
public static java.lang.String jsHighlightNode(java.lang.String name,
boolean on)
Note that this JavaScript function is for use after the tree has been
displayed, and should be called only from an HTML page returned to the
DOCUMENT_FRAME.
name - the JavaScript variable name of the node.on - if true, highlights the node.
public static java.lang.String jsInsertNode(java.lang.String name,
java.lang.String parent,
java.lang.String sibling,
boolean insertAsPreviousSibling)
jsCreateNode(java.lang.String, java.lang.String, java.lang.String) to return the JavaScript statement that will create a new
node.
Note that this JavaScript function is for use after the tree has been
displayed, and should be called only from an HTML page returned to the
DOCUMENT_FRAME.
name - the JavaScript variable name of the node.parent - the JavaScript variable name of the parent node to which this
node is to be added. If null, the node is inserted at the root
of the tree, after any existing root nodes.sibling - the JavaScript variable name of the sibling node. Use null to
add as the last child of the specified parent.insertAsPreviousSibling - if true, the specified node is inserted before the specified
sibling; if false, it is inserted after.
public static java.lang.String jsMoveNode(java.lang.String name,
java.lang.String parent,
java.lang.String sibling,
boolean insertAsPreviousSibling)
Note that this JavaScript function is for use after the tree has been
displayed, and should be called only from an HTML page returned to the
DOCUMENT_FRAME.
name - the JavaScript variable name of the node.parent - the JavaScript variable name of the new parent node to which
this node is to be added. If null, the node is inserted at the
root of the tree, after any existing root nodes.sibling - the JavaScript variable name of the sibling node. Use null to
add as the last child of the specified parent.insertAsPreviousSibling - if true, the specified node is inserted before the specified
sibling; if false, it is inserted after.
public static java.lang.String jsOpenNode(java.lang.String name)
Note that this JavaScript function is for use after the tree has been
displayed, and should be called only from an HTML page returned to the
DOCUMENT_FRAME.
name - the JavaScript variable name of the node.
public static java.lang.String jsOpenParentNode(java.lang.String name)
Note that this JavaScript function is for use after the tree has been
displayed, and should be called only from an HTML page returned to the
DOCUMENT_FRAME.
name - the JavaScript variable name of the node.
public static java.lang.String jsRedrawTree()
Note that this JavaScript function is for use after the tree has been
displayed, and should be called only from an HTML page returned to the
DOCUMENT_FRAME.
public static java.lang.String jsRemoveNode(java.lang.String name)
Note that this JavaScript function is for use after the tree has been
displayed, and should be called only from an HTML page returned to the
DOCUMENT_FRAME.
name - the JavaScript variable name of the node.
public java.lang.Object clone()
Container
clone in interface HTMLclone in class PajeObject.clone()
public TreePaje.Node makeNode(java.lang.String description,
java.lang.String url,
boolean isOpen)
DEFAULT_NODE_NAME_PREFIX suffixed with a sequential number starting at
0.
description - the description to appear on the tree.url - the destination URL when this node is selected. If null,
selecting the node will have no effect.isOpen - true if the initial state of this node is open (i.e. any child
elements are automatically displayed).
public TreePaje.Node makeNode(java.lang.String name,
java.lang.String description,
java.lang.String url,
boolean isOpen)
name - the JavaScript name of this node. This must be unique within
the tree.description - the description to appear on the tree.url - the destination URL when this node is selected. If null,
selecting the node will have no effect.isOpen - true if the initial state of this node is open (i.e. any child
elements are automatically displayed).
public TreePaje setBaseHREF(java.lang.String url)
DOCUMENT_FRAME.
url - the base HREF.
public TreePaje.Node setRootNode(java.lang.String description,
java.lang.String url,
boolean isOpen)
The root node is always named ROOT_NODE_NAME.
description - the description to appear on the tree.url - the destination URL when this node is selected.isOpen - true if the initial state of this node is open (i.e. any child
nodes are automatically displayed).
public TreePaje setTreeTitle(java.lang.String treeTitle)
treeTitle - the title of the page. Set to null (the default) to suppress
the tree title.
|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||