Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jac.aspects.gui.web
Class Tree  view Tree download Tree.java

java.lang.Object
  extended byjac.aspects.gui.web.AbstractView
      extended byjac.aspects.gui.web.Tree
All Implemented Interfaces:
HTMLViewer, TreeListener, jac.aspects.gui.View

public class Tree
extends AbstractView
implements jac.aspects.gui.View, HTMLViewer, TreeListener

This class defines a Swing component tree view for objects that are related to a root object through relations or collections.


Field Summary
(package private)  java.util.HashSet expandedNodes
           
(package private)  jac.aspects.gui.TreeModel model
           
(package private)  jac.aspects.gui.RootNode rootNode
           
(package private)  boolean showRelations
           
 
Fields inherited from class jac.aspects.gui.web.AbstractView
closed, column, context, description, factory, height, isCellViewer, javascript, label, message, parameters, parentView, row, style, styleSheet, table, type, viewBorder, width
 
Constructor Summary
Tree(jac.aspects.gui.ViewFactory factory, jac.aspects.gui.DisplayContext context, java.lang.String pathDef, boolean showRelations)
          Constructs a new tree view.
 
Method Summary
 void close()
          This method is called by the system when the view is closed.
 void genHTML(java.io.PrintWriter out)
          Generate the HTML code for the editor.
protected  void genNode(java.io.PrintWriter out, jac.aspects.gui.AbstractNode node, java.lang.String curPath)
           
protected  boolean isExpanded(jac.aspects.gui.AbstractNode node)
           
 void onCollapseNode(java.lang.String nodePath)
           
 void onExpandNode(java.lang.String nodePath)
           
 void onSelectNode(java.lang.String nodePath)
          Called when a node of the tree is selected by the user.
protected  jac.aspects.gui.AbstractNode pathToNode(java.lang.String nodePath)
           
 
Methods inherited from class jac.aspects.gui.web.AbstractView
equals, eventURL, eventURL, genBody, genPage, getCloseBorder, getContext, getDescription, getFactory, getId, getId, getLabel, getMessage, getOpenBorder, getParameters, getParentView, getRootView, getStyle, getType, getViewBorder, iconElement, iconElement, isClosed, isInForm, setColumn, setContext, setDescription, setFactory, setFocus, setHeight, setLabel, setMessage, setParameters, setParentView, setRow, setStyle, setStyleSheet, setTable, setType, setViewBorder, setWidth, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jac.aspects.gui.View
getParentView, getSubstance, refreshView, refreshViewItem, setFocus
 
Methods inherited from interface jac.aspects.gui.web.HTMLViewer
setStyleSheet
 

Field Detail

model

jac.aspects.gui.TreeModel model

showRelations

boolean showRelations

rootNode

jac.aspects.gui.RootNode rootNode

expandedNodes

java.util.HashSet expandedNodes
Constructor Detail

Tree

public Tree(jac.aspects.gui.ViewFactory factory,
            jac.aspects.gui.DisplayContext context,
            java.lang.String pathDef,
            boolean showRelations)
Constructs a new tree view.

Method Detail

close

public void close()
Description copied from interface: jac.aspects.gui.View
This method is called by the system when the view is closed.

Specified by:
close in interface jac.aspects.gui.View
Overrides:
close in class AbstractView

genHTML

public void genHTML(java.io.PrintWriter out)
Description copied from interface: HTMLViewer
Generate the HTML code for the editor.

Specified by:
genHTML in interface HTMLViewer

isExpanded

protected boolean isExpanded(jac.aspects.gui.AbstractNode node)

genNode

protected void genNode(java.io.PrintWriter out,
                       jac.aspects.gui.AbstractNode node,
                       java.lang.String curPath)

onSelectNode

public void onSelectNode(java.lang.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(java.lang.String nodePath)
Specified by:
onExpandNode in interface TreeListener

onCollapseNode

public void onCollapseNode(java.lang.String nodePath)
Specified by:
onCollapseNode in interface TreeListener

pathToNode

protected jac.aspects.gui.AbstractNode pathToNode(java.lang.String nodePath)