01: /*
02: * Copyright Javelin Software, All rights reserved.
03: */
04:
05: package com.javelin.swinglets.event;
06:
07: import java.awt.*;
08: import java.awt.event.*;
09:
10: import javax.swing.tree.*;
11:
12: /**
13: * STree defines a tree.
14: * <P>
15: * This fires a TreeActionEvent BEFORE the tree is expanded or collapsed
16: * This means STree.isExpanded( event.getTreePath() ) will determine if
17: * the tree path is currently expanded.
18: * <p>
19: * The modifier is the row number.
20: *
21: * @author Robin Sharp
22: */
23:
24: public class TreeActionEvent extends ActionEvent {
25: /**
26: * Construct a TreeActionEvent
27: */
28: public TreeActionEvent(Object source, int id, TreePath treePath,
29: int row) {
30: super (source, id, null, row);
31:
32: this .treePath = treePath;
33: }
34:
35: /**
36: * Get the TreePath that was selected.
37: */
38: public TreePath getTreePath() {
39: return treePath;
40: }
41:
42: // PRIVATE /////////////////////////////////////////////////////
43:
44: protected TreePath treePath;
45: }
|