|
Lines 24-29
Link Here
|
| 24 |
import org.eclipse.swt.events.SelectionAdapter; |
24 |
import org.eclipse.swt.events.SelectionAdapter; |
| 25 |
import org.eclipse.swt.events.SelectionEvent; |
25 |
import org.eclipse.swt.events.SelectionEvent; |
| 26 |
import org.eclipse.swt.events.SelectionListener; |
26 |
import org.eclipse.swt.events.SelectionListener; |
|
|
27 |
import org.eclipse.swt.graphics.Font; |
| 27 |
import org.eclipse.swt.layout.GridData; |
28 |
import org.eclipse.swt.layout.GridData; |
| 28 |
import org.eclipse.swt.layout.GridLayout; |
29 |
import org.eclipse.swt.layout.GridLayout; |
| 29 |
import org.eclipse.swt.widgets.Button; |
30 |
import org.eclipse.swt.widgets.Button; |
|
Lines 111-116
Link Here
|
| 111 |
Composite composite = new Composite(parent, SWT.NULL); |
112 |
Composite composite = new Composite(parent, SWT.NULL); |
| 112 |
composite.setLayout(new GridLayout()); |
113 |
composite.setLayout(new GridLayout()); |
| 113 |
composite.setLayoutData(new GridData(GridData.FILL_BOTH)); |
114 |
composite.setLayoutData(new GridData(GridData.FILL_BOTH)); |
|
|
115 |
composite.setFont(parent.getFont()); |
| 114 |
|
116 |
|
| 115 |
WorkbenchHelp.setHelp(composite, IHelpContextIds.NEW_PROJECT_WIZARD_PAGE); |
117 |
WorkbenchHelp.setHelp(composite, IHelpContextIds.NEW_PROJECT_WIZARD_PAGE); |
| 116 |
|
118 |
|
|
Lines 131-146
Link Here
|
| 131 |
* @param parent the parent composite |
133 |
* @param parent the parent composite |
| 132 |
*/ |
134 |
*/ |
| 133 |
private final void createProjectLocationGroup(Composite parent) { |
135 |
private final void createProjectLocationGroup(Composite parent) { |
| 134 |
|
136 |
Font font = parent.getFont(); |
| 135 |
// project specification group |
137 |
// project specification group |
| 136 |
Composite projectGroup = new Composite(parent, SWT.NONE); |
138 |
Composite projectGroup = new Composite(parent, SWT.NONE); |
| 137 |
GridLayout layout = new GridLayout(); |
139 |
GridLayout layout = new GridLayout(); |
| 138 |
layout.numColumns = 3; |
140 |
layout.numColumns = 3; |
| 139 |
projectGroup.setLayout(layout); |
141 |
projectGroup.setLayout(layout); |
| 140 |
projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); |
142 |
projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); |
| 141 |
|
143 |
projectGroup.setFont(font); |
|
|
144 |
|
| 142 |
// new project label |
145 |
// new project label |
| 143 |
Label projectContentsLabel = new Label(projectGroup, SWT.NONE); |
146 |
Label projectContentsLabel = new Label(projectGroup, SWT.NONE); |
|
|
147 |
projectContentsLabel.setFont(font); |
| 144 |
projectContentsLabel.setText(WorkbenchMessages.getString("WizardNewProjectCreationPage.projectContentsLabel")); //$NON-NLS-1$ |
148 |
projectContentsLabel.setText(WorkbenchMessages.getString("WizardNewProjectCreationPage.projectContentsLabel")); //$NON-NLS-1$ |
| 145 |
|
149 |
|
| 146 |
GridData labelData = new GridData(); |
150 |
GridData labelData = new GridData(); |
|
Lines 150-155
Link Here
|
| 150 |
final Button useDefaultsButton = new Button(projectGroup, SWT.CHECK | SWT.RIGHT); |
154 |
final Button useDefaultsButton = new Button(projectGroup, SWT.CHECK | SWT.RIGHT); |
| 151 |
useDefaultsButton.setText(WorkbenchMessages.getString("WizardNewProjectCreationPage.useDefaultLabel")); //$NON-NLS-1$ |
155 |
useDefaultsButton.setText(WorkbenchMessages.getString("WizardNewProjectCreationPage.useDefaultLabel")); //$NON-NLS-1$ |
| 152 |
useDefaultsButton.setSelection(useDefaults); |
156 |
useDefaultsButton.setSelection(useDefaults); |
|
|
157 |
useDefaultsButton.setFont(font); |
| 153 |
|
158 |
|
| 154 |
GridData buttonData = new GridData(); |
159 |
GridData buttonData = new GridData(); |
| 155 |
buttonData.horizontalSpan = 3; |
160 |
buttonData.horizontalSpan = 3; |
|
Lines 180-185
Link Here
|
| 180 |
* @param parent the parent composite |
185 |
* @param parent the parent composite |
| 181 |
*/ |
186 |
*/ |
| 182 |
private final void createProjectNameGroup(Composite parent) { |
187 |
private final void createProjectNameGroup(Composite parent) { |
|
|
188 |
Font font = parent.getFont(); |
| 183 |
// project specification group |
189 |
// project specification group |
| 184 |
Composite projectGroup = new Composite(parent, SWT.NONE); |
190 |
Composite projectGroup = new Composite(parent, SWT.NONE); |
| 185 |
GridLayout layout = new GridLayout(); |
191 |
GridLayout layout = new GridLayout(); |
|
Lines 189-194
Link Here
|
| 189 |
|
195 |
|
| 190 |
// new project label |
196 |
// new project label |
| 191 |
Label projectLabel = new Label(projectGroup, SWT.NONE); |
197 |
Label projectLabel = new Label(projectGroup, SWT.NONE); |
|
|
198 |
projectLabel.setFont(font); |
| 192 |
projectLabel.setText(WorkbenchMessages.getString("WizardNewProjectCreationPage.nameLabel")); //$NON-NLS-1$ |
199 |
projectLabel.setText(WorkbenchMessages.getString("WizardNewProjectCreationPage.nameLabel")); //$NON-NLS-1$ |
| 193 |
|
200 |
|
| 194 |
// new project name entry field |
201 |
// new project name entry field |
|
Lines 196-201
Link Here
|
| 196 |
GridData data = new GridData(GridData.FILL_HORIZONTAL); |
203 |
GridData data = new GridData(GridData.FILL_HORIZONTAL); |
| 197 |
data.widthHint = SIZING_TEXT_FIELD_WIDTH; |
204 |
data.widthHint = SIZING_TEXT_FIELD_WIDTH; |
| 198 |
projectNameField.setLayoutData(data); |
205 |
projectNameField.setLayoutData(data); |
|
|
206 |
projectNameField.setFont(font); |
| 199 |
|
207 |
|
| 200 |
// Set the initial value first before listener |
208 |
// Set the initial value first before listener |
| 201 |
// to avoid handling an event during the creation. |
209 |
// to avoid handling an event during the creation. |
|
Lines 211-219
Link Here
|
| 211 |
* @param boolean - the initial enabled state of the widgets created |
219 |
* @param boolean - the initial enabled state of the widgets created |
| 212 |
*/ |
220 |
*/ |
| 213 |
private void createUserSpecifiedProjectLocationGroup(Composite projectGroup, boolean enabled) { |
221 |
private void createUserSpecifiedProjectLocationGroup(Composite projectGroup, boolean enabled) { |
| 214 |
|
222 |
Font font = projectGroup.getFont(); |
| 215 |
// location label |
223 |
// location label |
| 216 |
locationLabel = new Label(projectGroup, SWT.NONE); |
224 |
locationLabel = new Label(projectGroup, SWT.NONE); |
|
|
225 |
locationLabel.setFont(font); |
| 217 |
locationLabel.setText(WorkbenchMessages.getString("WizardNewProjectCreationPage.locationLabel")); //$NON-NLS-1$ |
226 |
locationLabel.setText(WorkbenchMessages.getString("WizardNewProjectCreationPage.locationLabel")); //$NON-NLS-1$ |
| 218 |
locationLabel.setEnabled(enabled); |
227 |
locationLabel.setEnabled(enabled); |
| 219 |
|
228 |
|
|
Lines 222-231
Link Here
|
| 222 |
GridData data = new GridData(GridData.FILL_HORIZONTAL); |
231 |
GridData data = new GridData(GridData.FILL_HORIZONTAL); |
| 223 |
data.widthHint = SIZING_TEXT_FIELD_WIDTH; |
232 |
data.widthHint = SIZING_TEXT_FIELD_WIDTH; |
| 224 |
locationPathField.setLayoutData(data); |
233 |
locationPathField.setLayoutData(data); |
|
|
234 |
locationPathField.setFont(font); |
| 225 |
locationPathField.setEnabled(enabled); |
235 |
locationPathField.setEnabled(enabled); |
| 226 |
|
236 |
|
| 227 |
// browse button |
237 |
// browse button |
| 228 |
browseButton = new Button(projectGroup, SWT.PUSH); |
238 |
browseButton = new Button(projectGroup, SWT.PUSH); |
|
|
239 |
browseButton.setFont(font); |
| 229 |
browseButton.setText(WorkbenchMessages.getString("WizardNewProjectCreationPage.browseLabel")); //$NON-NLS-1$ |
240 |
browseButton.setText(WorkbenchMessages.getString("WizardNewProjectCreationPage.browseLabel")); //$NON-NLS-1$ |
| 230 |
browseButton.addSelectionListener(new SelectionAdapter() { |
241 |
browseButton.addSelectionListener(new SelectionAdapter() { |
| 231 |
public void widgetSelected(SelectionEvent event) { |
242 |
public void widgetSelected(SelectionEvent event) { |