comparison org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet218.d @ 29:4e5843b771cc

First snippets buildable on windows
author Frank Benoit <benoit@tionex.de>
date Sun, 22 Mar 2009 19:55:00 +0100
parents 69b1fa94a4a8
children 9f4c18c268b2
comparison
equal deleted inserted replaced
28:69b1fa94a4a8 29:4e5843b771cc
53 53
54 54
55 Display display = new Display(); 55 Display display = new Display();
56 Shell shell = new Shell(display); 56 Shell shell = new Shell(display);
57 shell.setLayout(new FillLayout()); 57 shell.setLayout(new FillLayout());
58 StyledText styledText = new StyledText(shell, SWT.WRAP | DWT.BORDER); 58 StyledText styledText = new StyledText(shell, SWT.WRAP | SWT.BORDER);
59 styledText.setText(text); 59 styledText.setText(text);
60 FontData data = display.getSystemFont().getFontData()[0]; 60 FontData data = display.getSystemFont().getFontData()[0];
61 Font font = new Font(display, data.getName(), 16f, SWT.BOLD); 61 Font font = new Font(display, data.getName(), 16f, SWT.BOLD);
62 styledText.setFont(font); 62 styledText.setFont(font);
63 styledText.setForeground(display.getSystemColor (SWT.COLOR_BLUE)); 63 styledText.setForeground(display.getSystemColor (SWT.COLOR_BLUE));