Mercurial > hg > de.mpg.mpiwg.itgroup.digilib.plugin
comparison src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/dialogs/RotateDialog.java @ 1:83c58ea33792
first release (continued)
author | dwinter |
---|---|
date | Mon, 03 Jan 2011 09:11:25 +0100 |
parents | |
children | e63a64652f4d |
comparison
equal
deleted
inserted
replaced
0:6829553d2378 | 1:83c58ea33792 |
---|---|
1 package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.dialogs; | |
2 | |
3 import org.eclipse.swt.SWT; | |
4 import org.eclipse.swt.widgets.Button; | |
5 import org.eclipse.swt.widgets.Composite; | |
6 import org.eclipse.swt.widgets.Display; | |
7 import org.eclipse.swt.widgets.Event; | |
8 import org.eclipse.swt.widgets.Listener; | |
9 import org.eclipse.swt.widgets.Shell; | |
10 import org.eclipse.swt.widgets.Text; | |
11 | |
12 import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImage; | |
13 import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; | |
14 | |
15 public class RotateDialog { | |
16 static boolean deleteFlag = false; | |
17 private Listener listener; | |
18 private Composite parent; | |
19 private String rotateValue; | |
20 | |
21 public RotateDialog(Listener listener,DigiImageController dc) { | |
22 this.listener=listener; | |
23 this.parent = dc.digiImage.getParent(); | |
24 this.rotateValue = String.valueOf(dc.digiImage | |
25 .getParameter().getRot()); | |
26 } | |
27 | |
28 public void open(){ | |
29 Shell shell = new Shell(parent.getDisplay()); | |
30 shell.setText("Rotate"); | |
31 shell.setSize(300, 200); | |
32 shell.open(); | |
33 | |
34 final Button button = new Button(shell, SWT.PUSH); | |
35 button.setText("Rotate"); | |
36 button.setBounds(20, 40, 80, 25); | |
37 | |
38 final Text text = new Text(shell, SWT.SHADOW_IN); | |
39 text.setBounds(140, 40, 100, 25); | |
40 text.setText(rotateValue); | |
41 | |
42 | |
43 | |
44 | |
45 | |
46 button.addListener(SWT.Selection, listener); | |
47 text.addListener(SWT.CHANGED, listener); | |
48 | |
49 | |
50 } | |
51 } | |
52 | |
53 | |
54 |