|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIPanel
javax.faces.component.html.HtmlPanelGroup
org.apache.myfaces.custom.tree.HtmlTree
public class HtmlTree
A tree data component. Unless otherwise specified, all attributes accept static values or EL expressions.
Tree implementation based on javax.swing.JTree.
The tree model is assigned by using a value binding named model
and is not stored in view state.
A hierarchy of HtmlTreeNodeobjects is used to represent the current
expanded state of the tree. The root node is held as a faces named *
rootNode.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.faces.component.html.HtmlPanelGroup |
|---|
javax.faces.component.html.HtmlPanelGroup.PropertyKeys |
| Field Summary | |
|---|---|
static String |
COMPONENT_FAMILY
|
static String |
COMPONENT_TYPE
|
static long |
DEFAULT_EXPIRE_LISTENERS
|
| Fields inherited from class javax.faces.component.UIComponent |
|---|
BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY |
| Constructor Summary | |
|---|---|
HtmlTree()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addToModelListeners()
|
void |
addTreeSelectionListener(TreeSelectionListener listener)
|
void |
collapseAll()
|
void |
collapsePath(TreePath path,
javax.faces.context.FacesContext context)
Ensures that the node identified by the specified path is collapsed and viewable. |
String |
createUniqueId(javax.faces.context.FacesContext context)
|
void |
decode(javax.faces.context.FacesContext context)
|
void |
encodeBegin(javax.faces.context.FacesContext context)
|
void |
encodeEnd(javax.faces.context.FacesContext context)
|
boolean |
equals(Object obj)
|
void |
expandAll()
|
void |
expandPath(TreePath path,
javax.faces.context.FacesContext context)
Ensures that the node identified by the specified path is expanded and viewable. |
String |
getColumnClasses()
|
long |
getExpireListeners()
Time interval the tree will remain registered as a TreeModelListener without being accessed |
String |
getFamily()
|
String |
getIconChildFirst()
|
String |
getIconChildLast()
|
String |
getIconChildMiddle()
|
String |
getIconClass()
|
String |
getIconLine()
|
String |
getIconNodeClose()
|
String |
getIconNodeCloseFirst()
|
String |
getIconNodeCloseLast()
|
String |
getIconNodeCloseMiddle()
|
String |
getIconNodeOpen()
|
String |
getIconNodeOpenFirst()
|
String |
getIconNodeOpenLast()
|
String |
getIconNodeOpenMiddle()
|
String |
getIconNoline()
|
IconProvider |
getIconProvider()
|
TreeModel |
getModel(javax.faces.context.FacesContext context)
|
String |
getNodeClass()
|
HtmlTreeNode |
getRootNode()
|
String |
getRowClasses()
|
String |
getSelectedNodeClass()
|
TreePath |
getSelectionPath()
|
protected String |
getStringValue(String value,
String vbName)
|
String |
getVar()
|
int |
hashCode()
|
boolean |
isExpanded(TreePath path,
javax.faces.context.FacesContext context)
|
void |
processDecodes(javax.faces.context.FacesContext context)
|
void |
processUpdates(javax.faces.context.FacesContext context)
|
void |
processValidators(javax.faces.context.FacesContext context)
|
void |
restoreItemStates(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIViewRoot previousRoot)
|
void |
restoreState(javax.faces.context.FacesContext context,
Object state)
|
Object |
saveState(javax.faces.context.FacesContext context)
|
void |
selectionChanged(HtmlTreeNode node)
|
void |
setColumnClasses(String columnClasses)
|
void |
setExpireListeners(long expireListeners)
|
void |
setIconChildFirst(String iconChildFirst)
|
void |
setIconChildLast(String iconChildLast)
|
void |
setIconChildMiddle(String iconChildMiddle)
|
void |
setIconClass(String iconClass)
|
void |
setIconLine(String iconLine)
|
void |
setIconNodeClose(String iconNodeClose)
|
void |
setIconNodeCloseFirst(String iconNodeCloseFirst)
|
void |
setIconNodeCloseLast(String iconNodeCloseLast)
|
void |
setIconNodeCloseMiddle(String iconNodeCloseMiddle)
|
void |
setIconNodeOpen(String iconNodeOpen)
|
void |
setIconNodeOpenFirst(String iconNodeOpenFirst)
|
void |
setIconNodeOpenLast(String iconNodeOpenLast)
|
void |
setIconNodeOpenMiddle(String iconNodeOpenMiddle)
|
void |
setIconNoline(String iconNoline)
|
void |
setIconProvider(IconProvider iconProvider)
|
void |
setNodeClass(String nodeClass)
|
void |
setRowClasses(String rowClasses)
|
void |
setSelectedNodeClass(String selectedNodeClass)
|
void |
setVar(String var)
|
void |
treeNodesChanged(TreeModelEvent e)
Invoked after a node (or a set of siblings) has changed in some way. |
void |
treeNodesInserted(TreeModelEvent e)
Invoked after nodes have been inserted into the tree. |
void |
treeNodesRemoved(TreeModelEvent e)
Invoked after nodes have been removed from the tree. |
void |
treeStructureChanged(TreeModelEvent e)
Invoked after the tree has drastically changed structure from a given node down. |
| Methods inherited from class javax.faces.component.html.HtmlPanelGroup |
|---|
getLayout, getStyle, getStyleClass, setLayout, setStyle, setStyleClass, setValueBinding, setValueExpression |
| Methods inherited from class javax.faces.component.UIComponentBase |
|---|
addClientBehavior, addFacesListener, broadcast, clearInitialState, encodeAll, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, invokeOnComponent, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, visitTree |
| Methods inherited from class javax.faces.component.UIComponent |
|---|
getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, subscribeToEvent, unsubscribeFromEvent |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String COMPONENT_TYPE
public static final String COMPONENT_FAMILY
public static final long DEFAULT_EXPIRE_LISTENERS
| Constructor Detail |
|---|
public HtmlTree()
| Method Detail |
|---|
public TreeModel getModel(javax.faces.context.FacesContext context)
public String createUniqueId(javax.faces.context.FacesContext context)
public void addTreeSelectionListener(TreeSelectionListener listener)
public IconProvider getIconProvider()
public void setIconProvider(IconProvider iconProvider)
public String getVar()
public void setVar(String var)
var - The var to set.
protected String getStringValue(String value,
String vbName)
public String getIconLine()
public void setIconLine(String iconLine)
public String getIconNoline()
public void setIconNoline(String iconNoline)
public String getIconChildFirst()
public void setIconChildFirst(String iconChildFirst)
public String getIconChildMiddle()
public void setIconChildMiddle(String iconChildMiddle)
public String getIconChildLast()
public void setIconChildLast(String iconChildLast)
public String getIconNodeOpen()
public void setIconNodeOpen(String iconNodeOpen)
public String getIconNodeOpenFirst()
public void setIconNodeOpenFirst(String iconNodeOpenFirst)
public String getIconNodeOpenMiddle()
public void setIconNodeOpenMiddle(String iconNodeOpenMiddle)
public String getIconNodeOpenLast()
public void setIconNodeOpenLast(String iconNodeOpenLast)
public String getIconNodeClose()
public void setIconNodeClose(String iconNodeClose)
public String getIconNodeCloseFirst()
public void setIconNodeCloseFirst(String iconNodeCloseFirst)
public String getIconNodeCloseMiddle()
public void setIconNodeCloseMiddle(String iconNodeCloseMiddle)
public String getIconNodeCloseLast()
public void setIconNodeCloseLast(String iconNodeCloseLast)
public String getNodeClass()
public void setNodeClass(String nodeClass)
public String getRowClasses()
public void setRowClasses(String rowClasses)
rowClasses - The rowClasses to set.public String getColumnClasses()
public void setColumnClasses(String columnClasses)
columnClasses - The columnClasses to set.public String getSelectedNodeClass()
public void setSelectedNodeClass(String selectedNodeClass)
selectedNodeClass - The selectedNodeClass to set.public String getIconClass()
public void setIconClass(String iconClass)
public long getExpireListeners()
public void setExpireListeners(long expireListeners)
public String getFamily()
getFamily in class javax.faces.component.html.HtmlPanelGroup
public void expandPath(TreePath path,
javax.faces.context.FacesContext context)
path - the TreePath identifying a node
public void collapsePath(TreePath path,
javax.faces.context.FacesContext context)
path - the TreePath identifying a node
public boolean isExpanded(TreePath path,
javax.faces.context.FacesContext context)
public TreePath getSelectionPath()
public void selectionChanged(HtmlTreeNode node)
public HtmlTreeNode getRootNode()
public Object saveState(javax.faces.context.FacesContext context)
saveState in interface javax.faces.component.StateHoldersaveState in class javax.faces.component.UIComponentBase
public void restoreState(javax.faces.context.FacesContext context,
Object state)
restoreState in interface javax.faces.component.StateHolderrestoreState in class javax.faces.component.UIComponentBasepublic void decode(javax.faces.context.FacesContext context)
decode in class javax.faces.component.UIComponentBasepublic void processDecodes(javax.faces.context.FacesContext context)
processDecodes in class javax.faces.component.UIComponentBasepublic void processValidators(javax.faces.context.FacesContext context)
processValidators in class javax.faces.component.UIComponentBasepublic void processUpdates(javax.faces.context.FacesContext context)
processUpdates in class javax.faces.component.UIComponentBase
public void encodeBegin(javax.faces.context.FacesContext context)
throws IOException
encodeBegin in class javax.faces.component.UIComponentBaseIOException
public void encodeEnd(javax.faces.context.FacesContext context)
throws IOException
encodeEnd in class javax.faces.component.UIComponentBaseIOException
public void restoreItemStates(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIViewRoot previousRoot)
public void treeNodesChanged(TreeModelEvent e)
TreeModelListenerInvoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their children arrays, but other attributes have changed and may affect presentation. Example: the name of a file has changed, but it is in the same location in the file system.
To indicate the root has changed, childIndices and children will be null.
Use e.getPath()
to get the parent of the changed node(s).
e.getChildIndices()
returns the index(es) of the changed node(s).
treeNodesChanged in interface TreeModelListenerpublic void treeNodesInserted(TreeModelEvent e)
TreeModelListenerInvoked after nodes have been inserted into the tree.
Use e.getPath()
to get the parent of the new node(s).
e.getChildIndices()
returns the index(es) of the new node(s)
in ascending order.
treeNodesInserted in interface TreeModelListenerpublic void treeNodesRemoved(TreeModelEvent e)
TreeModelListenerInvoked after nodes have been removed from the tree. Note that if a subtree is removed from the tree, this method may only be invoked once for the root of the removed subtree, not once for each individual set of siblings removed.
Use e.getPath()
to get the former parent of the deleted node(s).
e.getChildIndices()
returns, in ascending order, the index(es)
the node(s) had before being deleted.
treeNodesRemoved in interface TreeModelListenerpublic void treeStructureChanged(TreeModelEvent e)
TreeModelListenerInvoked after the tree has drastically changed structure from a given node down. If the path returned by e.getPath() is of length one and the first element does not identify the current root node the first element should become the new root of the tree.
Use e.getPath()
to get the path to the node.
e.getChildIndices()
returns null.
treeStructureChanged in interface TreeModelListenerpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic void addToModelListeners()
public void collapseAll()
public void expandAll()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||