28
|
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 *******************************************************************************/
|
|
11 module org.eclipse.swt.snippets.Snippet45;
|
|
12
|
|
13 import org.eclipse.swt.SWT;
|
|
14 import org.eclipse.swt.widgets.Display;
|
|
15 import org.eclipse.swt.widgets.Shell;
|
|
16 import org.eclipse.swt.widgets.Scale;
|
|
17
|
|
18 import java.lang.all;
|
|
19
|
|
20
|
|
21 public static void main (String [] args) {
|
|
22 Display display = new Display ();
|
|
23 Shell shell = new Shell (display);
|
|
24 Scale scale = new Scale (shell, SWT.BORDER);
|
|
25 scale.setSize (200, 64);
|
|
26 scale.setMaximum (40);
|
|
27 scale.setPageIncrement (5);
|
|
28 shell.open ();
|
|
29 while (!shell.isDisposed ()) {
|
|
30 if (!display.readAndDispatch ()) display.sleep ();
|
|
31 }
|
|
32 display.dispose ();
|
|
33 }
|
|
34
|