1 package net.sourceforge.selfesteem.applet;
2
3 import javax.swing.tree.DefaultMutableTreeNode;
4
5 public class MyTreeNode extends DefaultMutableTreeNode {
6 private int _level;
7 private Integer _percent;
8
9 public MyTreeNode(Object userObject, int level) {
10 super(userObject);
11 String text = (String) userObject;
12 int j = text.indexOf('%');
13 if (j != -1) {
14 int i = text.lastIndexOf(' ', j);
15 _percent = new Integer(text.substring(i + 1, j));
16 }
17 _level = level;
18 }
19
20 public int getLevel() {
21 return _level;
22 }
23
24 public boolean isStory() {
25 return _level == 2;
26 }
27
28 public Integer getPercent() {
29 return _percent;
30 }
31 }
This page was automatically generated by Maven