01: //** Copyright Statement ***************************************************
02: //The Salmon Open Framework for Internet Applications (SOFIA)
03: // Copyright (C) 1999 - 2002, Salmon LLC
04: //
05: // This program is free software; you can redistribute it and/or
06: // modify it under the terms of the GNU General Public License version 2
07: // as published by the Free Software Foundation;
08: //
09: // This program is distributed in the hope that it will be useful,
10: // but WITHOUT ANY WARRANTY; without even the implied warranty of
11: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: // GNU General Public License for more details.
13: //
14: // You should have received a copy of the GNU General Public License
15: // along with this program; if not, write to the Free Software
16: // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17: //
18: // For more information please visit http://www.salmonllc.com
19: //** End Copyright Statement ***************************************************
20: package com.salmonllc.html.events;
21:
22: /////////////////////////
23: //$Archive: /JADE/SourceCode/com/salmonllc/html/events/TreeExpandContractEvent.java $
24: //$Author: Dan $
25: //$Revision: 7 $
26: //$Modtime: 10/30/02 2:40p $
27: /////////////////////////
28:
29: import com.salmonllc.html.treeControl.*;
30:
31: /**
32: * This object will be created and passed to every TreeExpand or TreeContract event method.
33: * @see TreeListener
34: */
35:
36: public class TreeExpandContractEvent extends java.awt.AWTEvent {
37: TreeBuffer _tb;
38: int _handle;
39: boolean _isExpanding;
40:
41: /**
42: * This method constructs a new Event.
43: */
44:
45: public TreeExpandContractEvent(Object source, int handle,
46: boolean exp, TreeBuffer tb) {
47: super (source, 0);
48: _handle = handle;
49: _isExpanding = exp;
50: _tb = tb;
51: }
52:
53: /**
54: * This method returns the handle of the tree item that was expanded or contracted.
55: */
56: public int getHandle() {
57: return _handle;
58: }
59:
60: /**
61: * This method returns the treeBuffer for the tree control that was clicked.
62: */
63: public TreeBuffer getTreeBuffer() {
64: return _tb;
65: }
66:
67: /**
68: * This method returns true if the tree item is expanding and false if it is contracting.
69: */
70:
71: public boolean isExpanding() {
72: return _isExpanding;
73: }
74: }
|