import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Rectangle;
* @author jm.jaemin.kim{@literal <jm.jaemin.kim>} (S-Core)
*/
public class RtosFlashWizardDialog extends WizardDialog {
- private Composite parent;
+
+ public static final String LAUNCHER_LABEL = "Flash"; //$NON-NLS-1$
+
private int x = 0;
private int y = 0;
- private final int width = OSChecker.isWindows() ? 485 : 555;
+ private final int width = OSChecker.isWindows() ? 550 : 620;
private final int height = 450;
public static FlashOption selectionOption = null;
private Shell shell;
- private Button make;
- private Button cancel;
+ private Button flash;
public RtosFlashWizardDialog(Shell parentShell, IWizard newWizard) {
super(parentShell, newWizard);
Rectangle bounds = null;
bounds = parentShell.getBounds();
setbounds(bounds);
- setShellStyle(SWT.MODELESS | SWT.TITLE | SWT.CLOSE);
}
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
this.shell = newShell;
- newShell.setLocation(x, y);
- newShell.setSize(width, height);
+ this.shell.setLocation(x, y);
+ this.shell.setSize(width, height);
}
protected void PressedFinished() {
super.finishPressed();
}
- // @Override
@Override
protected void createButtonsForButtonBar(Composite p) {
- this.parent = p;
- super.createButtonsForButtonBar(parent);
-
- String LAUNCHER_LABEL = "Flash"; //$NON-NLS-1$
+ super.createButtonsForButtonBar(p);
// LAUNCHER_LABEL
- make = getButton(IDialogConstants.FINISH_ID);
- make.setText(LAUNCHER_LABEL);
- make.addSelectionListener(new SelectionAdapter() {
+ flash = getButton(IDialogConstants.FINISH_ID);
+ flash.setText(LAUNCHER_LABEL);
+ flash.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
// TODO: something to launch
}
});
- setButtonLayoutData(make);
- // cancel = getButton(IDialogConstants.CANCEL_ID);
- // cancel.moveAbove(make);
+ setButtonLayoutData(flash);
}
}