?? wizardnewmidletsuitecreationpage.java
字號:
/**
* Copyright (c) 2003-2006 Craig Setera
* All Rights Reserved.
* Licensed under the Eclipse Public License - v 1.0
* For more information see http://www.eclipse.org/legal/epl-v10.html
*/
package eclipseme.ui.internal.wizards;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
/**
* A specializatino of the {@link WizardNewProjectCreationPage} that
* adds the ability to specify whether or not the newly created
* midlet suite project should support preprocessing.
* <p />
* Copyright (c) 2003-2006 Craig Setera<br>
* All Rights Reserved.<br>
* Licensed under the Eclipse Public License - v 1.0<p/>
* <br>
* $Revision: 1.3 $
* <br>
* $Date: 2006/11/26 14:13:16 $
* <br>
* @author Craig Setera
*/
public class WizardNewMidletSuiteCreationPage extends WizardNewProjectCreationPage {
/** The name of the main page as registered in the wizard */
public static final String MAIN_PAGE_NAME = "NewProjectCreationPage";
private Button preprocessedButton;
private boolean preprocessingEnabled;
/**
* Construct a new instance.
*/
public WizardNewMidletSuiteCreationPage() {
super(MAIN_PAGE_NAME);
}
/**
* @see org.eclipse.ui.dialogs.WizardNewProjectCreationPage#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent) {
super.createControl(parent);
// Snag the composite created by the superclass and add to
// the composite
Composite composite = (Composite) getControl();
// Add an extra composite to get the layout to match up the
// components vertically
Composite layoutComposite = new Composite(composite, SWT.NONE);
layoutComposite.setLayout(new GridLayout(1, true));
layoutComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
preprocessedButton = new Button(layoutComposite, SWT.CHECK);
preprocessedButton.setText("Enable Preprocessing");
preprocessedButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
preprocessedButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
preprocessingEnabled = preprocessedButton.getSelection();
}
});
}
/**
* Return a boolean concerning whether preprocessing is enabled for the
* newly created project.
*
* @return the preprocessingEnabled
*/
public boolean isPreprocessingEnabled() {
return preprocessingEnabled;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -