Mercurial > projects > dwt2
comparison org.eclipse.jface/src/org/eclipse/jface/viewers/TreeExpansionEvent.d @ 12:bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 14 Mar 2009 18:23:29 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
11:43904fec5dca | 12:bc29606a740c |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2000, 2006 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module org.eclipse.jface.viewers.TreeExpansionEvent; | |
14 | |
15 import org.eclipse.jface.viewers.AbstractTreeViewer; | |
16 | |
17 import java.lang.all;//.EventObject; | |
18 import java.util.EventObject; | |
19 | |
20 /** | |
21 * Event object describing a tree node being expanded | |
22 * or collapsed. The source of these events is the tree viewer. | |
23 * | |
24 * @see ITreeViewerListener | |
25 */ | |
26 public class TreeExpansionEvent : EventObject { | |
27 | |
28 /** | |
29 * Generated serial version UID for this class. | |
30 * @since 3.1 | |
31 */ | |
32 private static const long serialVersionUID = 3618414930227835185L; | |
33 | |
34 /** | |
35 * The element that was expanded or collapsed. | |
36 */ | |
37 private Object element; | |
38 | |
39 /** | |
40 * Creates a new event for the given source and element. | |
41 * | |
42 * @param source the tree viewer | |
43 * @param element the element | |
44 */ | |
45 public this(AbstractTreeViewer source, Object element) { | |
46 super(source); | |
47 this.element = element; | |
48 } | |
49 | |
50 /** | |
51 * Returns the element that got expanded or collapsed. | |
52 * | |
53 * @return the element | |
54 */ | |
55 public Object getElement() { | |
56 return element; | |
57 } | |
58 | |
59 /** | |
60 * Returns the originator of the event. | |
61 * | |
62 * @return the originating tree viewer | |
63 */ | |
64 public AbstractTreeViewer getTreeViewer() { | |
65 return cast(AbstractTreeViewer) source; | |
66 } | |
67 } |