Mercurial > projects > dwt-samples
annotate examples/clipboard/ClipboardExample.d @ 123:698e70d0dca3
Fix build for non-TANGOSVN
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 21 Jul 2008 20:28:53 +0200 |
parents | be3a48f1d596 |
children | ae94c6a65f9e |
rev | line source |
---|---|
78 | 1 /******************************************************************************* |
2 * Copyright (c) 2000, 2004 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 * D Port: | |
11 * Jesse Phillips <Jesse.K.Phillips+D> gmail.com | |
12 *******************************************************************************/ | |
13 module examples.clipboard.ClipboardExample; | |
14 | |
15 import dwt.DWT; | |
16 import dwt.custom.ScrolledComposite; | |
17 import dwt.custom.StyledText; | |
18 import dwt.dnd.Clipboard; | |
19 import dwt.dnd.FileTransfer; | |
20 import dwt.dnd.HTMLTransfer; | |
21 import dwt.dnd.RTFTransfer; | |
22 import dwt.dnd.TextTransfer; | |
23 import dwt.dnd.Transfer; | |
24 import dwt.events.SelectionAdapter; | |
25 import dwt.events.SelectionEvent; | |
26 import dwt.graphics.Point; | |
27 import dwt.graphics.Rectangle; | |
28 import dwt.layout.FillLayout; | |
29 import dwt.layout.GridData; | |
30 import dwt.layout.GridLayout; | |
31 import dwt.widgets.Button; | |
32 import dwt.widgets.Combo; | |
33 import dwt.widgets.Composite; | |
34 import dwt.widgets.DirectoryDialog; | |
35 import dwt.widgets.Display; | |
36 import dwt.widgets.FileDialog; | |
37 import dwt.widgets.Group; | |
38 import dwt.widgets.Label; | |
39 import dwt.widgets.List; | |
40 import dwt.widgets.Shell; | |
41 import dwt.widgets.Table; | |
42 import dwt.widgets.TableItem; | |
43 import dwt.widgets.Text; | |
44 import dwt.dwthelper.utils; | |
45 | |
46 import tango.io.Stdout; | |
109
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
47 version(JIVE) import jive.stacktrace; |
123 | 48 version(TANGOSVN){ |
49 import tango.io.model.IFile; | |
50 } | |
51 else{ | |
52 import tango.io.FileConst; | |
53 } | |
78 | 54 class ClipboardExample { |
55 static const int SIZE = 60; | |
56 Clipboard clipboard; | |
57 Shell shell; | |
58 Text copyText; | |
59 Text pasteText; | |
60 Text copyRtfText; | |
61 Text pasteRtfText; | |
62 Text copyHtmlText; | |
63 Text pasteHtmlText; | |
64 Table copyFileTable; | |
65 Table pasteFileTable; | |
66 Text text; | |
67 Combo combo; | |
68 StyledText styledText; | |
69 Label status; | |
70 | |
71 public void open(Display display) { | |
72 clipboard = new Clipboard(display); | |
73 shell = new Shell (display); | |
74 shell.setText("DWT Clipboard"); | |
75 shell.setLayout(new FillLayout()); | |
76 | |
77 ScrolledComposite sc = new ScrolledComposite(shell, DWT.H_SCROLL | DWT.V_SCROLL); | |
78 Composite parent = new Composite(sc, DWT.NONE); | |
79 sc.setContent(parent); | |
80 parent.setLayout(new GridLayout(2, true)); | |
81 | |
82 Group copyGroup = new Group(parent, DWT.NONE); | |
83 copyGroup.setText("Copy From:"); | |
84 GridData data = new GridData(GridData.FILL_BOTH); | |
85 copyGroup.setLayoutData(data); | |
86 copyGroup.setLayout(new GridLayout(3, false)); | |
87 | |
88 Group pasteGroup = new Group(parent, DWT.NONE); | |
89 pasteGroup.setText("Paste To:"); | |
90 data = new GridData(GridData.FILL_BOTH); | |
91 pasteGroup.setLayoutData(data); | |
92 pasteGroup.setLayout(new GridLayout(3, false)); | |
93 | |
94 Group controlGroup = new Group(parent, DWT.NONE); | |
95 controlGroup.setText("Control API:"); | |
96 data = new GridData(GridData.FILL_BOTH); | |
97 data.horizontalSpan = 2; | |
98 controlGroup.setLayoutData(data); | |
99 controlGroup.setLayout(new GridLayout(5, false)); | |
100 | |
109
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
101 /* Enable with Available Types */ |
78 | 102 Group typesGroup = new Group(parent, DWT.NONE); |
103 typesGroup.setText("Available Types"); | |
104 data = new GridData(GridData.FILL_BOTH); | |
105 data.horizontalSpan = 2; | |
106 typesGroup.setLayoutData(data); | |
107 typesGroup.setLayout(new GridLayout(2, false)); | |
108 /**/ | |
109 | |
110 status = new Label(parent, DWT.BORDER); | |
111 data = new GridData(GridData.FILL_HORIZONTAL); | |
112 data.horizontalSpan = 2; | |
113 data.heightHint = 60; | |
114 status.setLayoutData(data); | |
115 | |
116 createTextTransfer(copyGroup, pasteGroup); | |
109
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
117 createRTFTransfer(copyGroup, pasteGroup); |
78 | 118 createHTMLTransfer(copyGroup, pasteGroup); |
109
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
119 createFileTransfer(copyGroup, pasteGroup); |
78 | 120 createMyTransfer(copyGroup, pasteGroup); |
121 createControlTransfer(controlGroup); | |
109
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
122 createAvailableTypes(typesGroup); |
78 | 123 |
124 sc.setMinSize(parent.computeSize(DWT.DEFAULT, DWT.DEFAULT)); | |
125 sc.setExpandHorizontal(true); | |
126 sc.setExpandVertical(true); | |
127 | |
128 Point size = shell.computeSize(DWT.DEFAULT, DWT.DEFAULT); | |
129 Rectangle monitorArea = shell.getMonitor().getClientArea(); | |
130 shell.setSize(Math.min(size.x, monitorArea.width - 20), Math.min(size.y, monitorArea.height - 20)); | |
131 shell.open(); | |
132 while (!shell.isDisposed ()) { | |
133 if (!display.readAndDispatch ()) display.sleep (); | |
134 } | |
135 clipboard.dispose(); | |
136 } | |
137 void createTextTransfer(Composite copyParent, Composite pasteParent) { | |
138 | |
139 // TextTransfer | |
140 Label l = new Label(copyParent, DWT.NONE); | |
141 l.setText("TextTransfer:"); //$NON-NLS-1$ | |
142 copyText = new Text(copyParent, DWT.MULTI | DWT.BORDER | DWT.V_SCROLL | DWT.H_SCROLL); | |
143 copyText.setText("some\nplain\ntext"); | |
144 GridData data = new GridData(GridData.FILL_HORIZONTAL); | |
145 data.heightHint = data.widthHint = SIZE; | |
146 copyText.setLayoutData(data); | |
147 Button b = new Button(copyParent, DWT.PUSH); | |
148 b.setText("Copy"); | |
149 b.addSelectionListener(new class SelectionAdapter { | |
150 public void widgetSelected(SelectionEvent e) { | |
151 auto data = copyText.getText(); | |
152 if (data.length > 0) { | |
153 status.setText(""); | |
154 auto obj = new Object[1]; | |
155 auto trans = new TextTransfer[1]; | |
156 obj[0] = cast(Object) new ArrayWrapperString(data); | |
157 trans[0] = TextTransfer.getInstance(); | |
158 clipboard.setContents(obj, trans); | |
159 } else { | |
160 status.setText("nothing to copy"); | |
161 } | |
162 } | |
163 }); | |
164 | |
165 l = new Label(pasteParent, DWT.NONE); | |
166 l.setText("TextTransfer:"); //$NON-NLS-1$ | |
167 pasteText = new Text(pasteParent, DWT.READ_ONLY | DWT.MULTI | DWT.BORDER | DWT.V_SCROLL | DWT.H_SCROLL); | |
168 data = new GridData(GridData.FILL_HORIZONTAL); | |
169 data.heightHint = data.widthHint = SIZE; | |
170 pasteText.setLayoutData(data); | |
171 b = new Button(pasteParent, DWT.PUSH); | |
172 b.setText("Paste"); | |
173 b.addSelectionListener(new class SelectionAdapter { | |
174 public void widgetSelected(SelectionEvent e) { | |
175 auto data = cast(ArrayWrapperString) clipboard.getContents(TextTransfer.getInstance()); | |
176 if (data !is null) { | |
177 status.setText(""); | |
178 pasteText.setText("begin paste>"~data.array~"<end paste"); | |
179 } else { | |
180 status.setText("nothing to paste"); | |
181 } | |
182 } | |
183 }); | |
184 } | |
185 void createRTFTransfer(Composite copyParent, Composite pasteParent){ | |
186 // RTF Transfer | |
187 Label l = new Label(copyParent, DWT.NONE); | |
188 l.setText("RTFTransfer:"); //$NON-NLS-1$ | |
189 copyRtfText = new Text(copyParent, DWT.MULTI | DWT.BORDER | DWT.V_SCROLL | DWT.H_SCROLL); | |
190 copyRtfText.setText("some\nrtf\ntext"); | |
191 GridData data = new GridData(GridData.FILL_HORIZONTAL); | |
192 data.heightHint = data.widthHint = SIZE; | |
193 copyRtfText.setLayoutData(data); | |
194 Button b = new Button(copyParent, DWT.PUSH); | |
195 b.setText("Copy"); | |
196 b.addSelectionListener(new class SelectionAdapter { | |
197 public void widgetSelected(SelectionEvent e) { | |
198 auto data = copyRtfText.getText(); | |
199 if (data.length > 0) { | |
200 status.setText(""); | |
201 data = "{\\rtf1{\\colortbl;\\red255\\green0\\blue0;}\\uc1\\b\\i " ~ data ~ "}"; | |
202 auto obj = new Object[1]; | |
203 auto trans = new Transfer[1]; | |
204 obj[0] = cast(Object) new ArrayWrapperString(data); | |
205 trans[0] = RTFTransfer.getInstance(); | |
206 clipboard.setContents(obj, trans); | |
207 } else { | |
208 status.setText("nothing to copy"); | |
209 } | |
210 } | |
211 }); | |
212 | |
213 l = new Label(pasteParent, DWT.NONE); | |
214 l.setText("RTFTransfer:"); //$NON-NLS-1$ | |
215 pasteRtfText = new Text(pasteParent, DWT.READ_ONLY | DWT.MULTI | DWT.BORDER | DWT.V_SCROLL | DWT.H_SCROLL); | |
216 data = new GridData(GridData.FILL_HORIZONTAL); | |
217 data.heightHint = data.widthHint = SIZE; | |
218 pasteRtfText.setLayoutData(data); | |
219 b = new Button(pasteParent, DWT.PUSH); | |
220 b.setText("Paste"); | |
221 b.addSelectionListener(new class SelectionAdapter { | |
222 public void widgetSelected(SelectionEvent e) { | |
223 auto data = cast(ArrayWrapperString) clipboard.getContents(RTFTransfer.getInstance()); | |
224 if (data !is null) { | |
225 status.setText(""); | |
226 pasteRtfText.setText("begin paste>"~data.array~"<end paste"); | |
227 } else { | |
228 status.setText("nothing to paste"); | |
229 } | |
230 } | |
231 }); | |
232 } | |
233 void createHTMLTransfer(Composite copyParent, Composite pasteParent){ | |
234 // HTML Transfer | |
235 Label l = new Label(copyParent, DWT.NONE); | |
236 l.setText("HTMLTransfer:"); //$NON-NLS-1$ | |
237 copyHtmlText = new Text(copyParent, DWT.MULTI | DWT.BORDER | DWT.V_SCROLL | DWT.H_SCROLL); | |
238 copyHtmlText.setText("<b>Hello World</b>"); | |
239 GridData data = new GridData(GridData.FILL_HORIZONTAL); | |
240 data.heightHint = data.widthHint = SIZE; | |
241 copyHtmlText.setLayoutData(data); | |
242 Button b = new Button(copyParent, DWT.PUSH); | |
243 b.setText("Copy"); | |
244 b.addSelectionListener(new class SelectionAdapter { | |
245 public void widgetSelected(SelectionEvent e) { | |
246 auto data = copyHtmlText.getText(); | |
247 if (data.length > 0) { | |
248 status.setText(""); | |
249 auto obj = new Object[1]; | |
250 auto trans = new Transfer[1]; | |
251 obj[0] = cast(Object) new ArrayWrapperString(data); | |
252 trans[0] = HTMLTransfer.getInstance(); | |
253 clipboard.setContents(obj, trans); | |
254 } else { | |
255 status.setText("nothing to copy"); | |
256 } | |
257 } | |
258 }); | |
259 | |
260 l = new Label(pasteParent, DWT.NONE); | |
261 l.setText("HTMLTransfer:"); //$NON-NLS-1$ | |
262 pasteHtmlText = new Text(pasteParent, DWT.READ_ONLY | DWT.MULTI | DWT.BORDER | DWT.V_SCROLL | DWT.H_SCROLL); | |
263 data = new GridData(GridData.FILL_HORIZONTAL); | |
264 data.heightHint = data.widthHint = SIZE; | |
265 pasteHtmlText.setLayoutData(data); | |
266 b = new Button(pasteParent, DWT.PUSH); | |
267 b.setText("Paste"); | |
268 b.addSelectionListener(new class SelectionAdapter { | |
269 public void widgetSelected(SelectionEvent e) { | |
270 auto data = cast(ArrayWrapperString) clipboard.getContents(HTMLTransfer.getInstance()); | |
271 if (data !is null) { | |
272 status.setText(""); | |
273 pasteHtmlText.setText("begin paste>"~data.array~"<end paste"); | |
274 } else { | |
275 status.setText("nothing to paste"); | |
276 } | |
277 } | |
278 }); | |
279 } | |
280 void createFileTransfer(Composite copyParent, Composite pasteParent){ | |
281 //File Transfer | |
282 Label l = new Label(copyParent, DWT.NONE); | |
283 l.setText("FileTransfer:"); //$NON-NLS-1$ | |
284 | |
285 Composite c = new Composite(copyParent, DWT.NONE); | |
286 c.setLayout(new GridLayout(2, false)); | |
287 GridData data = new GridData(GridData.FILL_HORIZONTAL); | |
288 c.setLayoutData(data); | |
289 | |
290 copyFileTable = new Table(c, DWT.MULTI | DWT.BORDER); | |
291 data = new GridData(GridData.FILL_HORIZONTAL); | |
292 data.heightHint = data.widthHint = SIZE; | |
293 data.horizontalSpan = 2; | |
294 copyFileTable.setLayoutData(data); | |
295 | |
296 Button b = new Button(c, DWT.PUSH); | |
297 b.setText("Select file(s)"); | |
298 b.addSelectionListener(new class SelectionAdapter { | |
299 public void widgetSelected(SelectionEvent e) { | |
300 FileDialog dialog = new FileDialog(shell, DWT.OPEN | DWT.MULTI); | |
301 auto result = dialog.open(); | |
302 if (result !is null && result.length > 0){ | |
303 //copyFileTable.removeAll(); | |
304 //This cannot be used | |
123 | 305 version(TANGOSVN){ |
109
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
306 auto separator = tango.io.model.IFile.FileConst.PathSeparatorString; |
123 | 307 } |
308 else{ | |
309 auto separator = tango.io.FileConst.FileConst.PathSeparatorString; | |
310 } | |
78 | 311 auto path = dialog.getFilterPath(); |
312 auto names = dialog.getFileNames(); | |
313 for (int i = 0; i < names.length; i++) { | |
314 TableItem item = new TableItem(copyFileTable, DWT.NONE); | |
315 item.setText(path~separator~names[i]); | |
316 } | |
317 } | |
318 } | |
319 }); | |
320 b = new Button(c, DWT.PUSH); | |
321 b.setText("Select directory"); | |
322 b.addSelectionListener(new class SelectionAdapter { | |
323 public void widgetSelected(SelectionEvent e) { | |
324 DirectoryDialog dialog = new DirectoryDialog(shell, DWT.OPEN); | |
325 auto result = dialog.open(); | |
326 if (result !is null && result.length > 0){ | |
327 //copyFileTable.removeAll(); | |
328 TableItem item = new TableItem(copyFileTable, DWT.NONE); | |
329 item.setText(result); | |
330 } | |
331 } | |
332 }); | |
333 | |
334 b = new Button(copyParent, DWT.PUSH); | |
335 b.setText("Copy"); | |
336 b.addSelectionListener(new class SelectionAdapter { | |
337 public void widgetSelected(SelectionEvent e) { | |
338 TableItem[] items = copyFileTable.getItems(); | |
339 if (items.length > 0){ | |
340 status.setText(""); | |
341 auto data = new char[][items.length]; | |
342 for (int i = 0; i < data.length; i++) { | |
343 data[i] = items[i].getText(); | |
344 } | |
345 auto obj = new Object[1]; | |
346 auto trans = new Transfer[1]; | |
347 obj[0] = cast(Object) new ArrayWrapperString2(data); | |
348 trans[0] = FileTransfer.getInstance(); | |
349 clipboard.setContents(obj, trans); | |
350 } else { | |
351 status.setText("nothing to copy"); | |
352 } | |
353 } | |
354 }); | |
355 | |
356 l = new Label(pasteParent, DWT.NONE); | |
357 l.setText("FileTransfer:"); //$NON-NLS-1$ | |
358 pasteFileTable = new Table(pasteParent, DWT.MULTI | DWT.BORDER); | |
359 data = new GridData(GridData.FILL_HORIZONTAL); | |
360 data.heightHint = data.widthHint = SIZE; | |
361 pasteFileTable.setLayoutData(data); | |
362 b = new Button(pasteParent, DWT.PUSH); | |
363 b.setText("Paste"); | |
364 b.addSelectionListener(new class SelectionAdapter { | |
365 public void widgetSelected(SelectionEvent e) { | |
366 auto data = cast(ArrayWrapperString2) clipboard.getContents(FileTransfer.getInstance()); | |
367 if (data !is null && data.array.length > 0) { | |
368 status.setText(""); | |
369 pasteFileTable.removeAll(); | |
370 foreach (s; data.array) { | |
371 TableItem item = new TableItem(pasteFileTable, DWT.NONE); | |
372 item.setText(s); | |
373 } | |
374 } else { | |
375 status.setText("nothing to paste"); | |
376 } | |
377 } | |
378 }); | |
379 } | |
380 void createMyTransfer(Composite copyParent, Composite pasteParent){ | |
381 // MyType Transfer | |
382 // TODO | |
383 } | |
384 void createControlTransfer(Composite parent){ | |
385 Label l = new Label(parent, DWT.NONE); | |
386 l.setText("Text:"); | |
387 Button b = new Button(parent, DWT.PUSH); | |
388 b.setText("Cut"); | |
389 b.addSelectionListener(new class SelectionAdapter { | |
390 public void widgetSelected(SelectionEvent e) { | |
391 text.cut(); | |
392 } | |
393 }); | |
394 b = new Button(parent, DWT.PUSH); | |
395 b.setText("Copy"); | |
396 b.addSelectionListener(new class SelectionAdapter { | |
397 public void widgetSelected(SelectionEvent e) { | |
398 text.copy(); | |
399 } | |
400 }); | |
401 b = new Button(parent, DWT.PUSH); | |
402 b.setText("Paste"); | |
403 b.addSelectionListener(new class SelectionAdapter { | |
404 public void widgetSelected(SelectionEvent e) { | |
405 text.paste(); | |
406 } | |
407 }); | |
408 text = new Text(parent, DWT.BORDER | DWT.MULTI | DWT.H_SCROLL | DWT.V_SCROLL); | |
409 GridData data = new GridData(GridData.FILL_HORIZONTAL); | |
410 data.heightHint = data.widthHint = SIZE; | |
411 text.setLayoutData(data); | |
412 | |
413 l = new Label(parent, DWT.NONE); | |
414 l.setText("Combo:"); | |
415 b = new Button(parent, DWT.PUSH); | |
416 b.setText("Cut"); | |
417 b.addSelectionListener(new class SelectionAdapter { | |
418 public void widgetSelected(SelectionEvent e) { | |
419 combo.cut(); | |
420 } | |
421 }); | |
422 b = new Button(parent, DWT.PUSH); | |
423 b.setText("Copy"); | |
424 b.addSelectionListener(new class SelectionAdapter { | |
425 public void widgetSelected(SelectionEvent e) { | |
426 combo.copy(); | |
427 } | |
428 }); | |
429 b = new Button(parent, DWT.PUSH); | |
430 b.setText("Paste"); | |
431 b.addSelectionListener(new class SelectionAdapter { | |
432 public void widgetSelected(SelectionEvent e) { | |
433 combo.paste(); | |
434 } | |
435 }); | |
436 combo = new Combo(parent, DWT.NONE); | |
437 char[][] str = new char[][4]; | |
438 str[0] = "Item 1"; | |
439 str[1] = "Item 2"; | |
440 str[2] = "Item 3"; | |
441 str[3] = "A longer Item"; | |
442 combo.setItems(str); | |
443 | |
444 l = new Label(parent, DWT.NONE); | |
445 l.setText("StyledText:"); | |
446 l = new Label(parent, DWT.NONE); | |
447 l.setVisible(false); | |
448 b = new Button(parent, DWT.PUSH); | |
449 b.setText("Copy"); | |
450 b.addSelectionListener(new class SelectionAdapter { | |
451 public void widgetSelected(SelectionEvent e) { | |
452 styledText.copy(); | |
453 } | |
454 }); | |
455 b = new Button(parent, DWT.PUSH); | |
456 b.setText("Paste"); | |
457 b.addSelectionListener(new class SelectionAdapter { | |
458 public void widgetSelected(SelectionEvent e) { | |
459 styledText.paste(); | |
460 } | |
461 }); | |
462 styledText = new StyledText(parent, DWT.BORDER | DWT.MULTI | DWT.H_SCROLL | DWT.V_SCROLL); | |
463 data = new GridData(GridData.FILL_HORIZONTAL); | |
464 data.heightHint = data.widthHint = SIZE; | |
465 styledText.setLayoutData(data); | |
466 } | |
109
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
467 |
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
468 List list; |
78 | 469 void createAvailableTypes(Composite parent){ |
109
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
470 list = new List(parent, DWT.BORDER | DWT.H_SCROLL | DWT.V_SCROLL); |
78 | 471 GridData data = new GridData(GridData.FILL_BOTH); |
472 data.heightHint = 100; | |
473 list.setLayoutData(data); | |
474 Button b = new Button(parent, DWT.PUSH); | |
475 b.setText("Get Available Types"); | |
476 b.addSelectionListener(new class SelectionAdapter { | |
477 public void widgetSelected(SelectionEvent e) { | |
478 list.removeAll(); | |
479 auto names = clipboard.getAvailableTypeNames(); | |
480 for (int i = 0; i < names.length; i++) { | |
481 list.add(names[i]); | |
482 } | |
483 } | |
484 }); | |
485 } | |
486 } | |
487 void main() { | |
488 Display display = new Display(); | |
489 (new ClipboardExample()).open(display); | |
490 display.dispose(); | |
491 } | |
492 |