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

Quick Search    Search Deep

com.robrohan.treebeard
Class TreeView  view TreeView download TreeView.java

java.lang.Object
  extended bycom.robrohan.treebeard.TreeView
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.TreeSelectionListener

public class TreeView
extends java.lang.Object
implements javax.swing.event.TreeSelectionListener

This is the TreeView pane in an Ent. NOTE: should this be in the editor kit directory?


Field Summary
private  javax.swing.JTree baseTree
           
 java.lang.String currentNode
          the current selected node
 java.lang.String currentPath
          the current selected path
private  javax.swing.tree.DefaultTreeModel defaultTreeModel
           
static int PATH
          path view flag (show document paths)
(package private)  javax.swing.tree.DefaultMutableTreeNode root
           
 java.lang.String rootNodeString
          what to show for the root node (default "/")
 java.lang.String SAXFactory
          The SAX factory to use (set in settings)
static int TEMPLATE
          template view flag (show templates)
private  int type
           
 
Constructor Summary
TreeView()
          Creates a new instance of TreeView
 
Method Summary
 int getType()
          get the currently set view type (PATH, TEMPLATE, etc)
static void main(java.lang.String[] args)
          Used for test, and this can run as a simple standalone xml viewer
private  javax.swing.JTree makeNewTree(java.io.InputStream xml)
           
private  void makeTree(javax.swing.tree.DefaultTreeModel treeModel, javax.swing.tree.DefaultMutableTreeNode base, java.io.InputStream xml)
          Does the actual Tree construction
private  void prolog()
           
 void setType(int to)
          Set the type of view this tree view will have (PATH, TEMPLATE, etc)
 javax.swing.JTree treeData(java.io.File xmlURI)
          makes a tree from a file object (wrapper for makeTree)
 javax.swing.JTree treeData(java.io.InputStream instream)
          makes a tree from a stream (wrapper for makeTree)
 javax.swing.JTree treeData(java.lang.String xmlURI)
          loads an xml file into a tree form for display (wrapper for makeTree)
 void valueChanged(javax.swing.event.TreeSelectionEvent treeSelectionEvent)
          Handles tree selections
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATH

public static final int PATH
path view flag (show document paths)

See Also:
Constant Field Values

TEMPLATE

public static final int TEMPLATE
template view flag (show templates)

See Also:
Constant Field Values

SAXFactory

public java.lang.String SAXFactory
The SAX factory to use (set in settings)


baseTree

private javax.swing.JTree baseTree

defaultTreeModel

private javax.swing.tree.DefaultTreeModel defaultTreeModel

root

javax.swing.tree.DefaultMutableTreeNode root

currentPath

public java.lang.String currentPath
the current selected path


currentNode

public java.lang.String currentNode
the current selected node


rootNodeString

public java.lang.String rootNodeString
what to show for the root node (default "/")


type

private int type
Constructor Detail

TreeView

public TreeView()
Creates a new instance of TreeView

Method Detail

setType

public void setType(int to)
Set the type of view this tree view will have (PATH, TEMPLATE, etc)


getType

public int getType()
get the currently set view type (PATH, TEMPLATE, etc)


prolog

private void prolog()

treeData

public javax.swing.JTree treeData(java.lang.String xmlURI)
                           throws java.io.IOException,
                                  org.xml.sax.SAXException,
                                  javax.xml.parsers.ParserConfigurationException
loads an xml file into a tree form for display (wrapper for makeTree)


treeData

public javax.swing.JTree treeData(java.io.InputStream instream)
                           throws java.io.IOException,
                                  org.xml.sax.SAXException,
                                  javax.xml.parsers.ParserConfigurationException
makes a tree from a stream (wrapper for makeTree)


treeData

public javax.swing.JTree treeData(java.io.File xmlURI)
                           throws java.io.IOException,
                                  org.xml.sax.SAXException,
                                  javax.xml.parsers.ParserConfigurationException
makes a tree from a file object (wrapper for makeTree)


makeNewTree

private javax.swing.JTree makeNewTree(java.io.InputStream xml)
                               throws java.io.IOException,
                                      org.xml.sax.SAXException,
                                      javax.xml.parsers.ParserConfigurationException

makeTree

private void makeTree(javax.swing.tree.DefaultTreeModel treeModel,
                      javax.swing.tree.DefaultMutableTreeNode base,
                      java.io.InputStream xml)
               throws java.io.IOException,
                      org.xml.sax.SAXException,
                      javax.xml.parsers.ParserConfigurationException
Does the actual Tree construction


valueChanged

public void valueChanged(javax.swing.event.TreeSelectionEvent treeSelectionEvent)
Handles tree selections

Specified by:
valueChanged in interface javax.swing.event.TreeSelectionListener

main

public static void main(java.lang.String[] args)
Used for test, and this can run as a simple standalone xml viewer