Mercurial > projects > dwt-samples
comparison draw2d/UmlExample.d @ 135:425c1adb5de5
Example with temporary fix with Display.getCurrent()
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 03 Aug 2008 02:19:19 +0200 |
parents | 2ddf4a05e444 |
children | 7dca96709d29 |
comparison
equal
deleted
inserted
replaced
134:2ddf4a05e444 | 135:425c1adb5de5 |
---|---|
1 /++ | |
2 + Original sources from http://www.eclipse.org/articles/Article-GEF-Draw2d/GEF-Draw2d.html | |
3 + Ported to the D programming language | |
4 + Frank Benoit <benoit@tionex.de> | |
5 +/ | |
6 | |
1 module umlexample.UmlExample; | 7 module umlexample.UmlExample; |
2 | 8 |
3 import dwt.dwthelper.utils; | 9 import dwt.dwthelper.utils; |
4 import dwt.dwthelper.ByteArrayInputStream; | 10 import dwt.dwthelper.ByteArrayInputStream; |
5 | 11 |
95 | 101 |
96 /** | 102 /** |
97 * A test class to display a UMLFigure | 103 * A test class to display a UMLFigure |
98 */ | 104 */ |
99 public static void main(){ | 105 public static void main(){ |
100 Display d = new Display(); | 106 Display d = Display.getCurrent(); |
101 final Shell shell = new Shell(d); | 107 final Shell shell = new Shell(d); |
102 shell.setSize(400, 400); | 108 shell.setSize(400, 400); |
103 shell.setText("UMLClassFigure Test"); | 109 shell.setText("UMLClassFigure Test"); |
104 LightweightSystem lws = new LightweightSystem(shell); | 110 LightweightSystem lws = new LightweightSystem(shell); |
105 Figure contents = new Figure(); | 111 Figure contents = new Figure(); |