Mercurial > hg > de.mpg.mpiwg.itgroup.digilib.core
view src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/dialogs/RotateDialog.java @ 24:1a7940ac5169
minor
author | dwinter |
---|---|
date | Wed, 05 Jan 2011 14:04:58 +0100 |
parents | e63a64652f4d |
children |
line wrap: on
line source
package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.dialogs; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; /** * Dialog to enter the roation angle. * @author dwinter * */ public class RotateDialog { static boolean deleteFlag = false; private Listener listener; private Composite parent; private String rotateValue; public RotateDialog(Listener listener,DigiImageController dc) { this.listener=listener; this.parent = dc.digiImage.getParent(); this.rotateValue = String.valueOf(dc.digiImage .getParameter().getRot()); } public void open(){ Shell shell = new Shell(parent.getDisplay()); shell.setText("Rotate"); shell.setSize(300, 200); shell.open(); final Button button = new Button(shell, SWT.PUSH); button.setText("Rotate"); button.setBounds(20, 40, 80, 25); final Text text = new Text(shell, SWT.SHADOW_IN); text.setBounds(140, 40, 100, 25); text.setText(rotateValue); button.addListener(SWT.Selection, listener); text.addListener(SWT.CHANGED, listener); } }