comparison jface/snippets/Snippet043NoColumnTreeViewerKeyboardEditing.d @ 143:42c3056512ba

redirect the jface examples to the new collection wrappers
author Frank Benoit <benoit@tionex.de>
date Thu, 07 Aug 2008 22:21:50 +0200
parents 2b4e94cafb85
children
comparison
equal deleted inserted replaced
142:7dca96709d29 143:42c3056512ba
6 * http://www.eclipse.org/legal/epl-v10.html 6 * http://www.eclipse.org/legal/epl-v10.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Tom Schindl - initial API and implementation 9 * Tom Schindl - initial API and implementation
10 * Port to the D programming language: 10 * Port to the D programming language:
11 * yidabu at gmail dot com ( D China http://www.d-programming-language-china.org/ ) 11 * yidabu at gmail dot com ( D China http://www.d-programming-language-china.org/ )
12 *******************************************************************************/ 12 *******************************************************************************/
13 13
14 module dwtx.jface.snippets.Snippet043NoColumnTreeViewerKeyboardEditing; 14 module dwtx.jface.snippets.Snippet043NoColumnTreeViewerKeyboardEditing;
15 15
16 import dwtx.jface.viewers.CellEditor; 16 import dwtx.jface.viewers.CellEditor;
39 import dwt.dwthelper.utils; 39 import dwt.dwthelper.utils;
40 40
41 import tango.util.Convert; 41 import tango.util.Convert;
42 import tango.util.container.LinkedList; 42 import tango.util.container.LinkedList;
43 43
44 version(JIVE) import jive.stacktrace;
45
44 46
45 void main(String[] args) { 47 void main(String[] args) {
46 Display display = new Display(); 48 Display display = new Display();
47 Shell shell = new Shell(display); 49 Shell shell = new Shell(display);
48 shell.setLayout(new FillLayout()); 50 shell.setLayout(new FillLayout());
54 display.sleep(); 56 display.sleep();
55 } 57 }
56 58
57 display.dispose(); 59 display.dispose();
58 } 60 }
59 61
60 /** 62 /**
61 * Demonstrates how to use keyboard-editing support in a TreeViewer with no column 63 * Demonstrates how to use keyboard-editing support in a TreeViewer with no column
62 * 64 *
63 * @author Tom Schindl <tom.schindl@bestsolution.at> 65 * @author Tom Schindl <tom.schindl@bestsolution.at>
64 * 66 *
65 */ 67 */
66 public class Snippet043NoColumnTreeViewerKeyboardEditing { 68 public class Snippet043NoColumnTreeViewerKeyboardEditing {
67 alias LinkedList!(MyModel) ArrayList; 69 alias LinkedList!(MyModel) ArrayList;
68 public this(Shell shell) { 70 public this(Shell shell) {
69 Button b = new Button(shell, DWT.PUSH); 71 Button b = new Button(shell, DWT.PUSH);
74 TreeViewer v; 76 TreeViewer v;
75 this(TreeViewer v_) 77 this(TreeViewer v_)
76 { 78 {
77 this.v = v_; 79 this.v = v_;
78 } 80 }
79 81
80 public void widgetDefaultSelected(SelectionEvent e) { 82 public void widgetDefaultSelected(SelectionEvent e) {
81 83
82 } 84 }
83 85
84 public void widgetSelected(SelectionEvent e) { 86 public void widgetSelected(SelectionEvent e) {