Initial Commit
[packages] / xemacs-packages / jde / java / src / jde / debugger / command / NullModel.java
1 package jde.debugger.gui;
2
3 import javax.swing.tree.MutableTreeNode;
4 import javax.swing.tree.TreeNode;
5
6 import jde.debugger.JDEException;
7
8
9
10 /** A TreeNode for null object references.
11  * @author <a href="mailto:udalrich@carolingia.org">Troy Daniels</a>
12  * @since 2.3.2
13  * @version $Revision: 1.1 $
14  */
15 class NullModel extends ReferenceModel {
16   /**  Constructor
17    */
18   NullModel() {
19     super();
20   }
21
22
23   /** Get the number of children.
24    * @return The number of fields that we should be displaying.
25    */
26   public int getChildCount() { return 0; }
27
28   /** Returns if the node allows children */
29   public boolean getAllowsChildren() { return false; }
30
31   /** Create a child at the given index.
32    * @return A tree node for the child at the given index */
33   MutableTreeNode createChildAt(int index) throws JDEException {
34     throw new JDEException(getClass().getName() + " does not allow children");
35   }
36
37   /** Get a string to represent the value of the variable */
38   String getValue() { return "null"; }
39
40
41   /** Update the values in the children
42    * @param children The array of old child values
43    */
44   void updateChildren(TreeNode[] children) {}
45 }