Ulm.XML.GUI
Class xnode

java.lang.Object
  |
  +--Ulm.XML.GUI.xnode

public class xnode
extends java.lang.Object

Data on XML node used during rendering. Copyright: Copyright (c) 2001 Ulm university, all rights reserved Company: Ulm university


Field Summary
 java.lang.String blue
          Node additional info, will be displayed in blue.
 javax.swing.JComponent component
          The whole different JComponent to display, if one is set.
 int diType
          Icon number, numbers are defined in XMLRenderer static int fields.
 java.lang.String header
          Node header
 int nchilds
          Number of childs, without text nodes.
 org.w3c.dom.Node node
          Node itself
 
Constructor Summary
xnode(org.w3c.dom.Node n)
          Create node with default header.
xnode(org.w3c.dom.Node n, javax.swing.JComponent c)
          Create node that will be displayed as this component.
xnode(org.w3c.dom.Node n, java.lang.String h)
          Create node with the given header.
xnode(org.w3c.dom.Node n, java.lang.String h, int dt)
          Create node with the given header and icon.
xnode(org.w3c.dom.Node n, java.lang.String h, int dt, java.lang.String _blue)
          Create node with the given header, icon and the additional blue text.
 
Method Summary
static int countChilds(org.w3c.dom.Node node)
          Count childs, not counting text nodes and attributes.
 java.lang.String getFullPath()
          Compute the full path from the root to this node.
 java.lang.String toString()
           
 void withChild(org.w3c.dom.Node n)
          Set the current node to be displayed with the given child in one line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

header

public java.lang.String header
Node header


blue

public java.lang.String blue
Node additional info, will be displayed in blue.


node

public org.w3c.dom.Node node
Node itself


diType

public int diType
Icon number, numbers are defined in XMLRenderer static int fields.


nchilds

public int nchilds
Number of childs, without text nodes.


component

public javax.swing.JComponent component
The whole different JComponent to display, if one is set.

Constructor Detail

xnode

public xnode(org.w3c.dom.Node n,
             javax.swing.JComponent c)
Create node that will be displayed as this component.


xnode

public xnode(org.w3c.dom.Node n)
Create node with default header. Count childs and asssign to nchilds.


xnode

public xnode(org.w3c.dom.Node n,
             java.lang.String h)
Create node with the given header. Count childs and asssign to nchilds.


xnode

public xnode(org.w3c.dom.Node n,
             java.lang.String h,
             int dt)
Create node with the given header and icon. Count childs and asssign to nchilds.


xnode

public xnode(org.w3c.dom.Node n,
             java.lang.String h,
             int dt,
             java.lang.String _blue)
Create node with the given header, icon and the additional blue text. Count childs and asssign to nchilds.

Method Detail

getFullPath

public java.lang.String getFullPath()
Compute the full path from the root to this node.


withChild

public void withChild(org.w3c.dom.Node n)
Set the current node to be displayed with the given child in one line.


countChilds

public static int countChilds(org.w3c.dom.Node node)
Count childs, not counting text nodes and attributes.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object