COMMON: Added NewIconDialog option 31/16131/1
authorchanghyun1.lee <changhyun1.lee@samsung.com>
Fri, 7 Feb 2014 09:53:48 +0000 (18:53 +0900)
committerchanghyun1.lee <changhyun1.lee@samsung.com>
Fri, 7 Feb 2014 09:53:48 +0000 (18:53 +0900)
Change-Id: Id0f5cd04fa89a2a4e8666183dd999219a6dafd6a
Signed-off-by: changhyun1.lee <changhyun1.lee@samsung.com>
org.tizen.common/src/org/tizen/common/ui/dialog/NewIconDialog.java

index ec3fed3..09c046b 100644 (file)
@@ -93,13 +93,15 @@ public class NewIconDialog extends SelectionStatusDialog {
     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);
     }
@@ -143,7 +145,11 @@ public class NewIconDialog extends SelectionStatusDialog {
 
         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));
@@ -182,6 +188,11 @@ public class NewIconDialog extends SelectionStatusDialog {
         setHelpAvailable(false);
         validate();
 
+        if (!bOption) {
+            lblOptionLabel.setEnabled(false);
+            fApplyEffectCheck.setEnabled(false);
+            fBtnMakeCircular.setEnabled(false);
+        }
         return grid;
     }