KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ca > mcgill > sable > soot > testing > TestDialog


1 /* Soot - a J*va Optimization Framework
2  * Copyright (C) 2003 Jennifer Lhotak
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */

19
20
21
22 /*
23  * This library is free software; you can redistribute it and/or
24  * modify it under the terms of the GNU Lesser General Public
25  * License as published by the Free Software Foundation; either
26  * version 2.1 of the License, or (at your option) any later version.
27  *
28  * This library is distributed in the hope that it will be useful,
29  * but WITHOUT ANY WARRANTY; without even the implied warranty of
30  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31  * Lesser General Public License for more details.
32  *
33  * You should have received a copy of the GNU Lesser General Public
34  * License along with this library; if not, write to the
35  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
36  * Boston, MA 02111-1307, USA.
37  */

38 package ca.mcgill.sable.soot.testing;
39
40 import org.eclipse.core.runtime.IAdaptable;
41 import org.eclipse.jface.dialogs.Dialog;
42 import org.eclipse.jface.dialogs.IDialogSettings;
43 import org.eclipse.swt.widgets.*;
44 import org.eclipse.swt.*;
45 import org.eclipse.swt.layout.*;
46 import ca.mcgill.sable.soot.SootPlugin;
47
48 public class TestDialog extends Dialog {
49     protected IAdaptable input;
50     
51     private Label text_label;
52     
53         private Button jimp_button;
54     
55         private Button jasmin_button;
56     
57         private Button njimple_button;
58     
59         private Button jimple_button;
60     
61         private Button baf_button;
62     
63         private Button b_button;
64     
65         private Button grimp_button;
66     
67         private Button grimple_button;
68     
69         private Button class_button;
70     
71         private Button dava_button;
72     
73         private Button xml_button;
74     
75         private Label annotation_label;
76         private Text annotation_text;
77     
78
79     public TestDialog(Shell parentShell, IAdaptable input) {
80         super(parentShell);
81         
82         this.input = input;
83     }
84
85     protected Control createDialogArea(Composite parent) {
86         Composite composite = (Composite)super.createDialogArea(parent);
87     
88         GridLayout layout = new GridLayout();
89         layout.numColumns = 3;
90         composite.setLayout(layout);
91         this.getShell().setText("Select Soot Output Type:");
92         
93         jimp_button = new Button(composite, SWT.RADIO);
94         jimp_button.setText("jimp");
95
96         jasmin_button = new Button(composite, SWT.RADIO);
97         jasmin_button.setText("jasmin");
98
99         njimple_button = new Button(composite, SWT.RADIO);
100         njimple_button.setText("njimple");
101
102         jimple_button = new Button(composite, SWT.RADIO);
103         jimple_button.setText("jimple");
104
105         baf_button = new Button(composite, SWT.RADIO);
106         baf_button.setText("baf");
107
108         b_button = new Button(composite, SWT.RADIO);
109         b_button.setText("b");
110
111         grimp_button = new Button(composite, SWT.RADIO);
112         grimp_button.setText("grimp");
113
114         grimple_button = new Button(composite, SWT.RADIO);
115         grimple_button.setText("grimple");
116
117         class_button = new Button(composite, SWT.RADIO);
118         class_button.setText("class");
119
120         dava_button = new Button(composite, SWT.RADIO);
121         dava_button.setText("dava");
122
123         xml_button = new Button(composite, SWT.RADIO);
124         xml_button.setText("xml");
125
126         annotation_label = new Label(composite, SWT.CENTER);
127         annotation_label.setText("annotation");
128             
129         annotation_text = new Text(composite, SWT.CENTER | SWT.BORDER);
130         annotation_text.setSize(200,15);
131                                 
132         return composite;
133         
134     }
135     
136     protected void okPressed() {
137         IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
138         
139         
140         super.okPressed();
141                 
142     }
143
144 }
145
146
Popular Tags