Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Scale.addListener()


    final Scale scale = new Scale(shell, SWT.HORIZONTAL);
    scale.setBounds(10, 570, 400, 80);
    scale.setMaximum(255);
    scale.setMinimum(50);
    scale.setPageIncrement(10);
    scale.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        int perspectiveValue = scale.getMaximum() - scale.getSelection() +  scale.getMinimum();
        shell.setAlpha(perspectiveValue);
      }
    });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.