1 /*
2 * Created on 01.04.2004
3 */
4 package org.xpcards;
5
6
7 import org.eclipse.jface.viewers.TreeViewer;
8 import org.eclipse.swt.widgets.Composite;
9 import org.eclipse.swt.widgets.Control;
10 import org.xpcards.model.ModelContentProvider;
11 import org.xpcards.model.ModelLabelProvider;
12
13 /***
14 * @author galu02
15 */
16 public class ProjectsTreeView {
17
18 private String name = "Projects View";
19 private TreeViewer treeViewer = null;
20 private XPCards application = null;
21
22
23 public ProjectsTreeView(XPCards application, Composite parent) {
24
25 treeViewer = new TreeViewer(parent);
26 this.application = application;
27
28 treeViewer.setContentProvider(new ModelContentProvider());
29 treeViewer.setLabelProvider(new ModelLabelProvider());
30 treeViewer.expandAll();
31 }
32
33
34
35 public Control getControl() {
36 return treeViewer.getControl();
37 }
38
39 /***
40 * @return
41 */
42 public String getName() {
43 return name;
44 }
45
46 /***
47 * @param string
48 */
49 public void setName(String string) {
50 name = string;
51 }
52
53 /***
54 * @param input
55 */
56 public void setInput(Object input) {
57 System.err.println("Set input :" + input);
58 treeViewer.setInput(input);
59 }
60
61 }
This page was automatically generated by Maven