private BufferedImage fMaskImage;
private BufferedImage fIconImage;
private Button fBtnMakeCircular;
+ private boolean bOption;
public String iconFileName = ICON_FILE_NAME;
- public NewIconDialog(Shell parentShell, IProject project) {
+ public NewIconDialog(Shell parentShell, IProject project, boolean enableOption) {
super(parentShell);
setTitle(Messages.NewIconDialog_Title);
fProject = project;
+ bOption = enableOption;
setStatusLineAboveButtons(true);
}
fPreviewLabel = new Label(grid, SWT.NONE);
fPreviewLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));
- fPreviewLabel.setText(String.format("Preview(%1$dx%2$d)", ICON_SIZE, ICON_SIZE));
+ if (bOption) {
+ fPreviewLabel.setText(String.format("Preview(%1$dx%2$d)", ICON_SIZE, ICON_SIZE));
+ } else {
+ fPreviewLabel.setText("Preview");
+ }
lblOptionLabel = new Label(grid, SWT.NONE);
lblOptionLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
setHelpAvailable(false);
validate();
+ if (!bOption) {
+ lblOptionLabel.setEnabled(false);
+ fApplyEffectCheck.setEnabled(false);
+ fBtnMakeCircular.setEnabled(false);
+ }
return grid;
}