ProgressDialog : modify button listener setter method 44/34244/1
authorheeyoung <heeyoung1008.hwang@samsung.com>
Thu, 22 Jan 2015 09:44:51 +0000 (18:44 +0900)
committerheeyoung <heeyoung1008.hwang@samsung.com>
Thu, 22 Jan 2015 09:44:51 +0000 (18:44 +0900)
Change-Id: I2d74d4010dd77ca63ffc867ccf04d37a01376619
Signed-off-by: heeyoung <heeyoung1008.hwang@samsung.com>
org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/widgets/da/base/ProgressDialog.java

index 2742c78..1960bbe 100644 (file)
@@ -56,6 +56,8 @@ public class ProgressDialog {
        private String warningText = DAWidgetConstants.EMPTY_STRING;
        private int width = 300;
        private int height = 100;
+       private DACustomButtonClickEventListener cancelButtonListener = null;
+       private DACustomButtonClickEventListener okButtonListener = null;
 
        private Listener shellMouseListener = new Listener() {
                boolean down = false;
@@ -232,6 +234,10 @@ public class ProgressDialog {
                        progress.setBarRect(new Rectangle(12, 45, rect.width - 24, 22));
                        progress.setUpperPoint(new Point(41, 18));
                        progress.setBottomPoint(new Point(12, 76));
+                       
+                       if (null != cancelButtonListener) {
+                               progress.setCancelButtonListener(cancelButtonListener);
+                       }
                        break;
                case Progress.PROGRESS_STYLE_WARNING:
                        progress.setBarStartColor(ColorResources.RED);
@@ -245,6 +251,10 @@ public class ProgressDialog {
                        progress.setWarningFontColor(ColorResources.STOP_PROGRESS_INFO_FONT_COLOR);
                        progress.setWarningPoint(new Point(81, 40));
                        progress.setWarningImage(ImageResources.DIALOG_WARNING_ICON);
+                       
+                       if (null != okButtonListener) {
+                               progress.setOkButtonListener(okButtonListener);
+                       }
                        break;
                }
        }
@@ -253,6 +263,7 @@ public class ProgressDialog {
                if (progress != null) {
                        progress.setCancelButtonListener(listener);
                }
+               cancelButtonListener = listener;
        }
 
        public void setCancelEnabled(final boolean enable) {
@@ -270,6 +281,7 @@ public class ProgressDialog {
                if (progress != null) {
                        progress.setOkButtonListener(listener);
                }
+               okButtonListener = listener;
        }
        
        public void setOkEnabled(final boolean enable) {