skin: hide a progress bar
authorgiwoong.kim <giwoong.kim@samsung.com>
Thu, 13 Dec 2012 08:01:27 +0000 (17:01 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Thu, 13 Dec 2012 08:01:27 +0000 (17:01 +0900)
default state is hidden

Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/skin/client/src/org/tizen/emulator/skin/layout/GeneralPurposeSkinComposer.java
tizen/src/skin/client/src/org/tizen/emulator/skin/layout/PhoneShapeSkinComposer.java
tizen/src/skin/client/src/org/tizen/emulator/skin/window/CustomProgressBar.java

index 2648e097470edcdacfe5a6ca29a82372c83eadbf..9194c700be83795b806911012c1b753a7fab3e1b 100644 (file)
@@ -267,10 +267,6 @@ public class GeneralPurposeSkinComposer implements ISkinComposer {
                if (skin.bootingProgress != null) {
                        skin.bootingProgress.setBounds(lcdBounds.x,
                                        lcdBounds.y + lcdBounds.height + 1, lcdBounds.width, 2);
-
-                       //TODO : delete this line
-                       skin.bootingProgress.setSelection(0); /* dispose */
-                       skin.bootingProgress = null;
                }
 
                /* custom window shape */
index 2ed182d2ce46d0b4608a082a44af4482fa401e1f..4ceb4c7234e283a933eb26952ee878f338928668 100644 (file)
@@ -211,10 +211,6 @@ public class PhoneShapeSkinComposer implements ISkinComposer {
                if (skin.bootingProgress != null) {
                        skin.bootingProgress.setBounds(lcdBounds.x,
                                        lcdBounds.y + lcdBounds.height + 1, lcdBounds.width, 2);
-
-                       //TODO : delete this line
-                       skin.bootingProgress.setSelection(0); /* dispose */
-                       skin.bootingProgress = null;
                }
 
                /* custom window shape */
index 7880cb9d1095efb904584fbfd0c7ca952866461d..64e45fc1fc4122316c3687f3cd9ce3384916b185 100644 (file)
@@ -50,7 +50,7 @@ public class CustomProgressBar extends Canvas {
                super(parent, style);
 
                this.parent = parent;
-               this.selection = 1;
+               this.selection = 0;
 
                this.addPaintListener(new PaintListener() {
                        @Override
@@ -62,7 +62,7 @@ public class CustomProgressBar extends Canvas {
                                int width = (bounds.width * selection) / 100; 
                                e.gc.fillRectangle(0, 0, width, bounds.height);
 
-                               if (selection == 0) {
+                               if (selection == -1) {
                                        logger.info("progress : complete!");
 
                                        parent.getDisplay().asyncExec(new Runnable() {
@@ -74,9 +74,24 @@ public class CustomProgressBar extends Canvas {
                                }
                        }
                });
+
+               /* default is hidden */
+               parent.getDisplay().asyncExec(new Runnable() {
+                       @Override
+                       public void run() {
+                               setVisible(false);
+                       }
+               });
        }
 
        public void setSelection(int value) {
+               parent.getDisplay().asyncExec(new Runnable() {
+                       @Override
+                       public void run() {
+                               setVisible(true);
+                       }
+               });
+
                if (value < 0) {
                        value = 0;
                } else if (value > 100) {
@@ -92,7 +107,7 @@ public class CustomProgressBar extends Canvas {
                                redraw();
 
                                if (selection == 100) {
-                                       selection = 0;
+                                       selection = -1;
                                }
                        }
                });