1 |
alfonx |
714 |
package skrueger.swing.checkboxtree; |
2 |
|
|
|
3 |
|
|
public class CheckBoxNode { |
4 |
|
|
String text; |
5 |
|
|
|
6 |
|
|
boolean selected; |
7 |
|
|
|
8 |
|
|
public CheckBoxNode(String text, boolean selected) { |
9 |
|
|
this.text = text; |
10 |
|
|
this.selected = selected; |
11 |
|
|
} |
12 |
|
|
|
13 |
|
|
public boolean isSelected() { |
14 |
|
|
return selected; |
15 |
|
|
} |
16 |
|
|
|
17 |
|
|
public void setSelected(boolean newValue) { |
18 |
|
|
selected = newValue; |
19 |
|
|
} |
20 |
|
|
|
21 |
|
|
public String getText() { |
22 |
|
|
return text; |
23 |
|
|
} |
24 |
|
|
|
25 |
|
|
public void setText(String newValue) { |
26 |
|
|
text = newValue; |
27 |
|
|
} |
28 |
|
|
|
29 |
|
|
public String toString() { |
30 |
|
|
return getClass().getName() + "[" + text + "/" + selected + "]"; |
31 |
|
|
} |
32 |
|
|
|
33 |
|
|
} |