comparison org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet170.d @ 112:9f4c18c268b2

Update to compile and execute with dmd 2.052.
author kntroh
date Wed, 16 Mar 2011 21:53:53 +0900
parents 4e5843b771cc
children
comparison
equal deleted inserted replaced
111:b6e9904989ed 112:9f4c18c268b2
27 import org.eclipse.swt.widgets.Tree; 27 import org.eclipse.swt.widgets.Tree;
28 import org.eclipse.swt.widgets.TreeItem; 28 import org.eclipse.swt.widgets.TreeItem;
29 import org.eclipse.swt.widgets.TreeColumn; 29 import org.eclipse.swt.widgets.TreeColumn;
30 import org.eclipse.swt.layout.FillLayout; 30 import org.eclipse.swt.layout.FillLayout;
31 31
32 import tango.util.Convert; 32 version(Tango){
33 import tango.util.Convert;
34 } else { // Phobos
35 import std.conv;
36 }
33 37
34 import java.lang.all; 38 import java.lang.all;
35 39
36 void main() { 40 void main() {
37 Display display = new Display(); 41 Display display = new Display();
38 final Shell shell = new Shell(display); 42 Shell shell = new Shell(display);
39 shell.setLayout(new FillLayout()); 43 shell.setLayout(new FillLayout());
40 Tree tree = new Tree(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); 44 Tree tree = new Tree(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
41 tree.setHeaderVisible(true); 45 tree.setHeaderVisible(true);
42 TreeColumn column1 = new TreeColumn(tree, SWT.LEFT); 46 TreeColumn column1 = new TreeColumn(tree, SWT.LEFT);
43 column1.setText("Column 1"); 47 column1.setText("Column 1");