1 | /** |
2 | * |
3 | */ |
4 | package de.uka.ipd.sdq.sensorframework.visualisation.dialogs; |
5 | |
6 | import org.eclipse.jface.viewers.LabelProvider; |
7 | import org.eclipse.swt.SWT; |
8 | import org.eclipse.swt.graphics.Point; |
9 | import org.eclipse.swt.widgets.Composite; |
10 | import org.eclipse.swt.widgets.Control; |
11 | import org.eclipse.swt.widgets.Shell; |
12 | import org.eclipse.ui.dialogs.ElementListSelectionDialog; |
13 | |
14 | /** |
15 | * Dialog possible make selection from actions in Menu/Visualasetions are |
16 | * contained. |
17 | * |
18 | * @author Roman Andrej |
19 | */ |
20 | public class ActionListSelectionDialog extends ElementListSelectionDialog { |
21 | |
22 | /** Default dialog size. */ |
23 | private int width = 400; |
24 | private int height = 300; |
25 | |
26 | /** |
27 | * @param parent |
28 | * shell |
29 | * @param labelProvider for super class |
30 | */ |
31 | public ActionListSelectionDialog(Shell parent, LabelProvider labelProvider) { |
32 | super(parent, labelProvider); |
33 | super.setShellStyle(SWT.NONE); |
34 | } |
35 | |
36 | /** |
37 | * @param parent |
38 | * shell |
39 | * @param labelProvider |
40 | * for super class |
41 | * @param width |
42 | * the x coordinate of the new point |
43 | * @param height |
44 | * the y coordinate of the new point |
45 | */ |
46 | public ActionListSelectionDialog(Shell parent, LabelProvider labelProvider, |
47 | int width, int height) { |
48 | super(parent, labelProvider); |
49 | super.setShellStyle(SWT.NONE); |
50 | this.width = width; |
51 | this.height = height; |
52 | } |
53 | |
54 | /* (non-Javadoc) |
55 | * @see org.eclipse.ui.dialogs.SelectionStatusDialog#createButtonBar(org.eclipse.swt.widgets.Composite) |
56 | */ |
57 | @Override |
58 | protected Control createButtonBar(Composite parent) { |
59 | // Delete OK and CANCEL butons |
60 | return null; |
61 | } |
62 | |
63 | /* (non-Javadoc) |
64 | * @see org.eclipse.jface.dialogs.TitleAreaDialog#getInitialSize() |
65 | */ |
66 | @Override |
67 | protected Point getInitialSize() { |
68 | return new Point(width, height); |
69 | } |
70 | } |