|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.guiseframework.platform.AbstractDepictor<C>
com.guiseframework.platform.AbstractComponentDepictor<C>
com.guiseframework.platform.web.AbstractWebComponentDepictor<C>
com.guiseframework.platform.web.AbstractDecoratedWebComponentDepictor<C>
com.guiseframework.platform.web.WebTreeControlDepictor<C>
C - The type of component being depicted.public class WebTreeControlDepictor<C extends TreeControl>
Strategy for rendering a tree component as an XHTML <div> element.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.guiseframework.platform.AbstractComponentDepictor |
|---|
AbstractComponentDepictor.DepictedCompositeComponentListener |
| Nested classes/interfaces inherited from class com.guiseframework.platform.AbstractDepictor |
|---|
AbstractDepictor.DepictedPropertyChangeListener |
| Field Summary | |
|---|---|
static java.lang.String |
TREE_NODE_COLLAPSED_IMAGE_RESOURCE_KEY
The resource bundle key for the tree node expanded image URI. |
static java.lang.String |
TREE_NODE_EXPANDED_IMAGE_RESOURCE_KEY
The resource bundle key for the tree node collapsed image URI. |
static java.lang.String |
TREE_NODE_LEAF_IMAGE_RESOURCE_KEY
The resource bundle key for the tree node leaf image URI. |
| Fields inherited from class com.guiseframework.platform.web.AbstractWebComponentDepictor |
|---|
BODY_END_PATTERN, BODY_START_PATTERN |
| Fields inherited from class com.guiseframework.platform.AbstractComponentDepictor |
|---|
childPropertyChangeListener |
| Fields inherited from interface com.guiseframework.platform.Depictor |
|---|
GENERAL_PROPERTY |
| Constructor Summary | |
|---|---|
WebTreeControlDepictor()
Default constructor using the XHTML <div> element. |
|
| Method Summary | ||
|---|---|---|
protected void |
depictChildren()
Updates the views of any children. |
|
TreeNodeModel<?> |
getTreeNode(long treeNodeID)
Determines the tree node associated with the given ID. |
|
long |
getTreeNodeID(TreeNodeModel<?> treeNode)
Determines the ID of the given tree node in this view. |
|
protected
|
getTreeNodeStyleIDs(TreeModel treeModel,
TreeNodeModel<T> treeNode,
java.lang.String prefix,
java.lang.String suffix)
Retrieves the style IDs for a tree node. |
|
void |
processEvent(PlatformEvent event)
Processes an event from the platform. |
|
protected
|
updateTreeNodeChildViews(TreeModel treeModel,
TreeNodeModel<T> treeNode)
Updates the views of a tree node's children, if any. |
|
protected
|
updateTreeNodeView(TreeModel treeModel,
TreeNodeModel<T> treeNode)
Updates the view of a tree node. |
|
| Methods inherited from class com.guiseframework.platform.web.AbstractDecoratedWebComponentDepictor |
|---|
depictBegin, depictEnd, getBodyLocalName, getBodyNamespaceURI, isEmptyBodyElementAllowed, writeDecoratorBegin, writeDecoratorEnd |
| Methods inherited from class com.guiseframework.platform.AbstractComponentDepictor |
|---|
depictChild, depictedObjectPropertyChange, getDepictedCompositeComponentListener, getErrorMessage, installed, uninstalled |
| Methods inherited from class com.guiseframework.platform.AbstractDepictor |
|---|
getDepictedObject, getDepictedPropertyChangeListener, getIgnoredProperties, getModifiedProperties, getSession, isDepicted, setDepicted, setPropertyModified |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.guiseframework.platform.Depictor |
|---|
getDepictedObject, getSession, installed, isDepicted, setDepicted, uninstalled |
| Field Detail |
|---|
public static final java.lang.String TREE_NODE_COLLAPSED_IMAGE_RESOURCE_KEY
public static final java.lang.String TREE_NODE_EXPANDED_IMAGE_RESOURCE_KEY
public static final java.lang.String TREE_NODE_LEAF_IMAGE_RESOURCE_KEY
| Constructor Detail |
|---|
public WebTreeControlDepictor()
<div> element.
| Method Detail |
|---|
public long getTreeNodeID(TreeNodeModel<?> treeNode)
treeNode - The tree node for which an ID should be returned.
public TreeNodeModel<?> getTreeNode(long treeNodeID)
treeNodeID - An ID assigned to a tree node.
null if there is no tree node associated with the ID.public void processEvent(PlatformEvent event)
processEvent in interface Depictor<C extends TreeControl>processEvent in class AbstractComponentDepictor<C extends TreeControl>event - The event to be processed.
java.lang.IllegalArgumentException - if the given event is a relevant DepictEvent with a source of a different depicted object.
protected <T> java.util.Set<java.lang.String> getTreeNodeStyleIDs(TreeModel treeModel,
TreeNodeModel<T> treeNode,
java.lang.String prefix,
java.lang.String suffix)
T - The type of value contained in the tree node.
This version returns the base tree node style ID #TREE_NODE_CLASS with the given prefix/suffix, if any,
along with styles representing the expandeded or collapseed state and whether the node is a leaf.treeModel - The component model.treeNode - The tree node.prefix - The prefix that needs to be added to the base style, or null if there is no prefix to add.suffix - The suffix that needs to be added to the base style, or null if there is no suffix to add.
protected void depictChildren()
throws java.io.IOException
depictChildren in class AbstractComponentDepictor<C extends TreeControl>java.io.IOException - if there is an error updating the child views.DepictContext.State#UPDATE_VIEW
protected <T> void updateTreeNodeView(TreeModel treeModel,
TreeNodeModel<T> treeNode)
throws java.io.IOException
T - The type of value contained in the tree node.treeModel - The component model.treeNode - The tree node.
java.io.IOException - if there is an error updating the tree node view.
protected <T> void updateTreeNodeChildViews(TreeModel treeModel,
TreeNodeModel<T> treeNode)
throws java.io.IOException
T - The type of value contained in the tree node.treeModel - The component model.treeNode - The tree node the views of the children of which should be updated.
java.io.IOException - if there is an error updating the child tree node views.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||