1 /*
2 * @(#)$Id: NodeInfo.java 715 2009-07-30 10:19:37Z kurmannu $
3 *
4 * Author : Ueli Kurmann, igesture@uelikurmann.ch
5 *
6 *
7 * Purpose :
8 *
9 * -----------------------------------------------------------------------
10 *
11 * Revision Information:
12 *
13 * Date Who Reason
14 *
15 * 23.03.2008 ukurmann Initial Release
16 *
17 * -----------------------------------------------------------------------
18 *
19 * Copyright 1999-2009 ETH Zurich. All Rights Reserved.
20 *
21 * This software is the proprietary information of ETH Zurich.
22 * Use is subject to license terms.
23 *
24 */
25
26 package org.ximtec.igesture.tool.explorer.core;
27
28 import java.util.List;
29
30 import javax.swing.Icon;
31 import javax.swing.JPopupMenu;
32 import javax.swing.tree.TreePath;
33
34 import org.ximtec.igesture.tool.core.Controller;
35
36 /**
37 * NodeInfo. Defines the structure of an Exlorer Tree.
38 *
39 * @author UeliKurmann
40 * @version 1.0
41 * @since igesture
42 */
43 public interface NodeInfo {
44
45 /**
46 * Rerturns the type of the node
47 *
48 * @return
49 */
50 Class<?> getType();
51
52 /**
53 * Returns the name of the node
54 *
55 * @param object
56 * @return
57 */
58 String getName(Object object);
59
60 /**
61 * Returns the tool tip of the node
62 *
63 * @return
64 */
65 String getTooltip();
66
67 /**
68 * Returns the icon of the node
69 *
70 * @return
71 */
72 Icon getIcon();
73
74 /**
75 * Returns a list of children
76 *
77 * @param node
78 * @return
79 */
80 List<Object> getChildren(Object node);
81
82 /**
83 * Returns true if the current node is a leaf
84 *
85 * @param node
86 * the node
87 * @return true if the current node is a leaf.
88 */
89 boolean isLeaf(Object node);
90
91 /**
92 * Returns the view of the node
93 *
94 * @param controller
95 * @param node
96 * @return
97 */
98 ExplorerTreeView getView(Controller controller, Object node);
99
100 /**
101 * Returns the context menu of a node.
102 *
103 * @param node
104 * @return
105 */
106 JPopupMenu getPopupMenu(TreePath node);
107
108 /**
109 * Returns the expanded icon
110 * @return the expanded icon
111 */
112 Icon getExpandedIcon();
113
114 }