View Javadoc

1   package de.matthias_burbach.deputy.swing;
2   
3   import javax.swing.tree.DefaultMutableTreeNode;
4   
5   import de.matthias_burbach.deputy.core.rule.Rule;
6   
7   /***
8    * Is the base class of all rule tree nodes.
9    *
10   * @author Matthias Burbach
11   */
12  public abstract class RuleTreeNode extends DefaultMutableTreeNode {
13      /*(non-Javadoc)
14       * @see javax.swing.tree.TreeNode#getChildCount()
15       */
16      /***
17       * {@inheritDoc}
18       */
19      public int getChildCount() {
20          return super.getChildCount();
21      }
22  
23      /*(non-Javadoc)
24       * @see javax.swing.tree.TreeNode#isLeaf()
25       */
26      /***
27       * {@inheritDoc}
28       */
29      public boolean isLeaf() {
30          return false;
31      }
32  
33      /***
34       * @return The rule to display.
35       */
36      public abstract Rule getRule();
37  }