home *** CD-ROM | disk | FTP | other *** search
- import com.sun.java.swing.tree.DefaultMutableTreeNode;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
-
- class SampleTree$AddAction implements ActionListener {
- // $FF: synthetic field
- private final SampleTree this$0;
- public int addCount;
-
- public void actionPerformed(ActionEvent var1) {
- DefaultMutableTreeNode var3 = this.this$0.getSelectedNode();
- DefaultMutableTreeNode var4;
- if (var3 != null) {
- var4 = (DefaultMutableTreeNode)var3.getParent();
- } else {
- var4 = (DefaultMutableTreeNode)this.this$0.treeModel.getRoot();
- }
-
- int var2;
- if (var3 == null) {
- var2 = this.this$0.treeModel.getChildCount(var4);
- } else {
- var2 = var4.getIndex(var3) + 1;
- }
-
- this.this$0.treeModel.insertNodeInto(this.this$0.createNewNode("Added " + Integer.toString(this.addCount++)), var4, var2);
- }
-
- SampleTree$AddAction(SampleTree var1) {
- this.this$0 = var1;
- this.this$0 = var1;
- }
- }
-