org.objectweb.jac.aspects.gui.web
Class Tree
java.lang.Object
org.objectweb.jac.aspects.gui.web.AbstractView
org.objectweb.jac.aspects.gui.web.Tree
- All Implemented Interfaces:
- HTMLViewer, TreeListener, View, ViewIdentity
- public class Tree
- extends AbstractView
- implements View, HTMLViewer, TreeListener
This class defines a Swing component tree view for objects that are
related to a root object through relations or collections.
- See Also:
GuiAC
Methods inherited from class org.objectweb.jac.aspects.gui.web.AbstractView |
closeForm, equalsView, equalsView, eventURL, eventURL, genBody, genEventAndActionButton, genPage, genStyleSheets, getBaseURL, getCloseBorder, getContext, getDescription, getFactory, getId, getId, getLabel, getMessage, getOpenBorder, getParameters, getParentView, getRootView, getStyle, getType, getViewBorder, iconElement, iconElement, isClosed, isDescendantOf, isInForm, openForm, printAttributes, setAttribute, setColumn, setContext, setDescription, setFactory, setFocus, setLabel, setMessage, setParameters, setParentView, setRow, setSize, setStyle, setStyleSheet, setTable, setType, setViewBorder, showButton, showFormButtons, showFormButtons |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.jac.aspects.gui.View |
getContext, getDescription, getFactory, getLabel, getMessage, getParentView, getRootView, getStyle, getViewBorder, isClosed, isDescendantOf, setContext, setDescription, setFactory, setFocus, setLabel, setMessage, setParentView, setSize, setStyle, setViewBorder |
Tree
public Tree(ViewFactory factory,
DisplayContext context,
String pathDef,
boolean showRelations)
- Constructs a new tree view.
- Parameters:
pathDef
- designate root objects of the treeshowRelations
- wether to build a node for relation items
close
public void close(boolean validate)
- Description copied from interface:
View
- Close this view. This should be upcalled when the view is closed
in order to free resources or close other dependant views.
- Specified by:
close
in interface View
- Overrides:
close
in class AbstractView
genHTML
public void genHTML(PrintWriter out)
- Description copied from interface:
HTMLViewer
- Generate the HTML code for the editor.
- Specified by:
genHTML
in interface HTMLViewer
- Parameters:
out
- the writer where to write the HTML code.
isExpanded
protected boolean isExpanded(AbstractNode node)
genNode
protected void genNode(PrintWriter out,
AbstractNode node,
String curPath)
onSelectNode
public void onSelectNode(String nodePath)
- Description copied from interface:
TreeListener
- Called when a node of the tree is selected by the user.
- Specified by:
onSelectNode
in interface TreeListener
onExpandNode
public void onExpandNode(String nodePath)
- Specified by:
onExpandNode
in interface TreeListener
onCollapseNode
public void onCollapseNode(String nodePath)
- Specified by:
onCollapseNode
in interface TreeListener
pathToNode
protected AbstractNode pathToNode(String nodePath)