Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.hq.bizapp.shared.uibeans
Class TreeNode

    java.lang.Object
      org.hyperic.hq.bizapp.shared.uibeans.TreeNode

All Implemented Interfaces:
  java.io.Serializable, ITreeNode

Direct Known Subclasses:
  ResourceTreeNode

    public class TreeNode

extends java.lang.Object
implements ITreeNode, java.io.Serializable

Implementation of the tree node interface for rendering the navigation map.

See Also:
  Serialized Form

Field Summary
`protected java.util.ArrayList` | `downChildren` Children that are one level down from this node.
`static int` | `NO_CTYPE` Constant representing no ctype.
`protected java.util.ArrayList` | `upChildren` Children that are one level up from this node.

Constructor Summary
`TreeNode(java.lang.String name, java.lang.String desc)` Creates a new `TreeNode` instance.

Method Summary
`void` | `addDownChild(ITreeNode child)` Add a child one level below this node.
`void` | `addDownChildren(ITreeNode[] children)` Add several children one level below this node.
`void` | `addRectangle(int x, int y, int cx, int cy)` Set the rectangle of coordinates for the image map.
`void` | `addUpChild(ITreeNode child)` Add a child one level above this node.
`void` | `addUpChildren(ITreeNode[] children)` Add several children one level above this node.
`void` | `clear()` Describe `clear` method here.
`boolean` | `equals(java.lang.Object o)` Determines whether two objects are equal.
`java.lang.String` | `getDescription()` Get the description.
`ITreeNode[]` | `getDownChildren()` Get the children one level down from this node.
`int` | `getDownChildrenCount()` Return the number of children one level below this node.
`java.lang.String` | `getName()` Get the name.
`java.awt.Rectangle[]` | `getRectangles()` Get the rectangles of coordinates for the image map.
`ITreeNode[]` | `getUpChildren()` Get the children one level up from this node.
`int` | `getUpChildrenCount()` Return the number of children one level above this node.
`boolean` | `hasDownChildren()` Returns true if this node has children one level below.
`int` | `hashCode()` Returns the hashcode of this object.
`boolean` | `hasUpChildren()` Returns true if this node has children one level above.
`boolean` | `isSelected()` Returns true if the node is selected, false otherwise.
`void` | `replaceDownChildren(ITreeNode[] children)` Replace down children
`void` | `replaceUpChildren(ITreeNode[] children)` Replace up children
`void` | `reset()` Clears the internal state of the node.
`void` | `setDescription(java.lang.String desc)` Set the description.
`void` | `setName(java.lang.String name)` Set the name.
`void` | `setSelected(boolean selected)` Set whether or not this node is selected.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### NO_CTYPE

    public static final int NO_CTYPE

  Constant representing no ctype.

  See Also:
    Constant Field Values

### upChildren

    protected java.util.ArrayList upChildren

  Children that are one level up from this node.

### downChildren

    protected java.util.ArrayList downChildren

  Children that are one level down from this node.

Constructor Detail

### TreeNode

    public TreeNode(java.lang.String name,
                    java.lang.String desc)

  Creates a new `TreeNode` instance.

  Parameters:
    `name` - the name
    `desc` - the description

Method Detail

### getName

    public java.lang.String getName()

  Get the name.

  Specified by:
    `getName` in interface `ITreeNode`
  Returns:
    the name of the node

### setName

    public void setName(java.lang.String name)

  Set the name.

  Parameters:
    `name` - the name of the node

### getDescription

    public java.lang.String getDescription()

  Get the description.

  Specified by:
    `getDescription` in interface `ITreeNode`
  Returns:
    the description of the node

### setDescription

    public void setDescription(java.lang.String desc)

  Set the description.

  Parameters:
    `desc` - the description of the node

### getRectangles

    public java.awt.Rectangle[] getRectangles()

  Get the rectangles of coordinates for the image map.

  Specified by:
    `getRectangles` in interface `ITreeNode`
  Returns:
    the coordinate rectangles

### addRectangle

    public void addRectangle(int x,
                             int y,
                             int cx,
                             int cy)

  Set the rectangle of coordinates for the image map.

  Specified by:
    `addRectangle` in interface `ITreeNode`
  Parameters:
    `x` - top left corner horizontal position
    `y` - top left corner horizontal position
    `cx` - width
    `cy` - height

### isSelected

    public boolean isSelected()

  Returns true if the node is selected, false otherwise.

  Specified by:
    `isSelected` in interface `ITreeNode`
  Returns:
    true or false

### setSelected

    public void setSelected(boolean selected)

  Set whether or not this node is selected.

  Parameters:
    `selected` - true or false

### addUpChild

    public void addUpChild(ITreeNode child)

  Add a child one level above this node.

  Parameters:
    `child` - the child to add

### addUpChildren

    public void addUpChildren(ITreeNode[] children)

  Add several children one level above this node.

  Parameters:
    `children` - the children to add

### getUpChildren

    public ITreeNode[] getUpChildren()

  Get the children one level up from this node.

  Specified by:
    `getUpChildren` in interface `ITreeNode`
  Returns:
    the children above this node

### getUpChildrenCount

    public int getUpChildrenCount()

  Return the number of children one level above this node.

  Returns:
    the number of children

### hasUpChildren

    public boolean hasUpChildren()

  Returns true if this node has children one level above.

  Specified by:
    `hasUpChildren` in interface `ITreeNode`
  Returns:
    true or false

### addDownChild

    public void addDownChild(ITreeNode child)

  Add a child one level below this node.

  Parameters:
    `child` - the child to add

### addDownChildren

    public void addDownChildren(ITreeNode[] children)

  Add several children one level below this node.

  Parameters:
    `children` - the children to add

### replaceDownChildren

    public void replaceDownChildren(ITreeNode[] children)

  Replace down children

  Parameters:
    `children` - the children to replace

### replaceUpChildren

    public void replaceUpChildren(ITreeNode[] children)

  Replace up children

  Parameters:
    `children` - the children to replace

### getDownChildren

    public ITreeNode[] getDownChildren()

  Get the children one level down from this node.

  Specified by:
    `getDownChildren` in interface `ITreeNode`
  Returns:
    the children above this node

### getDownChildrenCount

    public int getDownChildrenCount()

  Return the number of children one level below this node.

  Returns:
    the number of children

### hasDownChildren

    public boolean hasDownChildren()

  Returns true if this node has children one level below.

  Specified by:
    `hasDownChildren` in interface `ITreeNode`
  Returns:
    true or false

### clear

    public void clear()

  Describe `clear` method here.

### reset

    public void reset()

  Clears the internal state of the node. The list of rectangles must be cleared at a minumum. This method is called by the ResourceTree.reset() method.

  Specified by:
    `reset` in interface `ITreeNode`
  See Also:
    `net.covalent.image.widget.ResourceTree#reset()`

### equals

    public boolean equals(java.lang.Object o)

  Determines whether two objects are equal.

  Overrides:
    `equals` in class `java.lang.Object`
  Returns:
    true or false

### hashCode

    public int hashCode()

  Returns the hashcode of this object.

  Overrides:
    `hashCode` in class `java.lang.Object`
  Returns:
    hash code.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.