Resources: add image resources for device template viewer
authorjihye424.kim <jihye424.kim@samsung.com>
Thu, 1 Oct 2015 05:58:53 +0000 (14:58 +0900)
committerjihye424.kim <jihye424.kim@samsung.com>
Thu, 1 Oct 2015 05:58:53 +0000 (14:58 +0900)
- add image resources for device template viewer
- fixed typing error

Change-Id: Ie51856f2fc605e086386bd83d643fee123985b1a
Signed-off-by: jihye424.kim <jihye424.kim@samsung.com>
18 files changed:
resource/renewal/res/3p_back_btn_hover_c.png [new file with mode: 0644]
resource/renewal/res/3p_back_btn_hover_l.png [new file with mode: 0644]
resource/renewal/res/3p_back_btn_hover_r.png [new file with mode: 0644]
resource/renewal/res/3p_back_btn_nml_c.png [new file with mode: 0644]
resource/renewal/res/3p_back_btn_nml_l.png [new file with mode: 0644]
resource/renewal/res/3p_back_btn_nml_r.png [new file with mode: 0644]
resource/renewal/res/btn_clone_disable.png [new file with mode: 0644]
resource/renewal/res/btn_clone_hover.png [new file with mode: 0644]
resource/renewal/res/btn_clone_nml.png [new file with mode: 0644]
resource/renewal/res/btn_create_disable.png [new file with mode: 0644]
resource/renewal/res/btn_create_hover.png [new file with mode: 0644]
resource/renewal/res/btn_create_nml.png [new file with mode: 0644]
src/org/tizen/emulator/manager/renewal/resources/ColorResources.java
src/org/tizen/emulator/manager/renewal/resources/ImageResources.java
src/org/tizen/emulator/manager/renewal/resources/PatchImageResources.java
src/org/tizen/emulator/manager/resources/FilePathResources.java
src/org/tizen/emulator/manager/ui/renewal/tableviewer/ProfileButtonMaker.java
src/org/tizen/emulator/manager/ui/renewal/tableviewer/VMListTable.java

diff --git a/resource/renewal/res/3p_back_btn_hover_c.png b/resource/renewal/res/3p_back_btn_hover_c.png
new file mode 100644 (file)
index 0000000..77ee76a
Binary files /dev/null and b/resource/renewal/res/3p_back_btn_hover_c.png differ
diff --git a/resource/renewal/res/3p_back_btn_hover_l.png b/resource/renewal/res/3p_back_btn_hover_l.png
new file mode 100644 (file)
index 0000000..fcf91ea
Binary files /dev/null and b/resource/renewal/res/3p_back_btn_hover_l.png differ
diff --git a/resource/renewal/res/3p_back_btn_hover_r.png b/resource/renewal/res/3p_back_btn_hover_r.png
new file mode 100644 (file)
index 0000000..2516038
Binary files /dev/null and b/resource/renewal/res/3p_back_btn_hover_r.png differ
diff --git a/resource/renewal/res/3p_back_btn_nml_c.png b/resource/renewal/res/3p_back_btn_nml_c.png
new file mode 100644 (file)
index 0000000..c6436a0
Binary files /dev/null and b/resource/renewal/res/3p_back_btn_nml_c.png differ
diff --git a/resource/renewal/res/3p_back_btn_nml_l.png b/resource/renewal/res/3p_back_btn_nml_l.png
new file mode 100644 (file)
index 0000000..daafcc9
Binary files /dev/null and b/resource/renewal/res/3p_back_btn_nml_l.png differ
diff --git a/resource/renewal/res/3p_back_btn_nml_r.png b/resource/renewal/res/3p_back_btn_nml_r.png
new file mode 100644 (file)
index 0000000..e7619c8
Binary files /dev/null and b/resource/renewal/res/3p_back_btn_nml_r.png differ
diff --git a/resource/renewal/res/btn_clone_disable.png b/resource/renewal/res/btn_clone_disable.png
new file mode 100644 (file)
index 0000000..ed60657
Binary files /dev/null and b/resource/renewal/res/btn_clone_disable.png differ
diff --git a/resource/renewal/res/btn_clone_hover.png b/resource/renewal/res/btn_clone_hover.png
new file mode 100644 (file)
index 0000000..626fcf5
Binary files /dev/null and b/resource/renewal/res/btn_clone_hover.png differ
diff --git a/resource/renewal/res/btn_clone_nml.png b/resource/renewal/res/btn_clone_nml.png
new file mode 100644 (file)
index 0000000..9dccaaf
Binary files /dev/null and b/resource/renewal/res/btn_clone_nml.png differ
diff --git a/resource/renewal/res/btn_create_disable.png b/resource/renewal/res/btn_create_disable.png
new file mode 100644 (file)
index 0000000..326f822
Binary files /dev/null and b/resource/renewal/res/btn_create_disable.png differ
diff --git a/resource/renewal/res/btn_create_hover.png b/resource/renewal/res/btn_create_hover.png
new file mode 100644 (file)
index 0000000..33fc81b
Binary files /dev/null and b/resource/renewal/res/btn_create_hover.png differ
diff --git a/resource/renewal/res/btn_create_nml.png b/resource/renewal/res/btn_create_nml.png
new file mode 100644 (file)
index 0000000..7581ec3
Binary files /dev/null and b/resource/renewal/res/btn_create_nml.png differ
index 4dbab68..16c1825 100644 (file)
@@ -63,7 +63,9 @@ public enum ColorResources {
        MODIFY_ITEM_TITLE_BACKGROUND(235, 241, 245),
        MODIFY_ITEM_TITLE_SUB_BACKGROUDN(218, 230, 240),
        MODIFY_ITEM_TITLE(41, 41, 41),
-       MODIFY_ITEM_LINE(208, 212, 215);
+       MODIFY_ITEM_LINE(208, 212, 215),
+
+       DEFAULT_FONT(41, 41, 41);
 
        public static ColorResources GRAY_BTN_FONT = WHITE;
        public static ColorResources CONTENT_FONT = MESSAGE_BOX_CONTENTS_FONT;
index be1fe1b..26cc531 100644 (file)
@@ -40,6 +40,13 @@ import org.eclipse.swt.widgets.Display;
 import org.tizen.emulator.manager.logging.EMLogger;
 
 public enum ImageResources {
+       // back button (3-patch)
+       BACK_BTN_HOVER_C("3p_back_btn_hover_c"),
+       BACK_BTN_HOVER_L("3p_back_btn_hover_l"),
+       BACK_BTN_HOVER_R("3p_back_btn_hover_r"),
+       BACK_BTN_NORMAL_C("3p_back_btn_nml_c"),
+       BACK_BTN_NORMAL_L("3p_back_btn_nml_l"),
+       BACK_BTN_NORMAL_R("3p_back_btn_nml_r"),
 
        // gray 9 patch button
        GRAY_BTN_DISABLE_B("9p_btn_disable_b"),
@@ -143,37 +150,44 @@ public enum ImageResources {
 
        TITLE_IMAGE("img_titlebar"),
        VMLIST_TITLE_IMAGE("img_title_yourvmlist"),
+       TEMPLATE_LIST_TITLE_IMAGE("img_title_templates"),
        BUTTON_INFO_HOVER("btn_info_hover"),
        BUTTON_INFO_NML("btn_info_nml"),
        BUTTON_REFRESH_HOVER("btn_refreshlist_hover"),
        BUTTON_REFRESH_NML("btn_refreshlist_nml"),
        BUTTON_DELETE_DISABLE("btn_delete_disable"),
        BUTTON_DELETE_HOVER("btn_delete_hover"),
-       BUTTON_DELETE_NOMAL("btn_delete_nml"),
+       BUTTON_DELETE_NORMAL("btn_delete_nml"),
        BUTTON_EXPORT_DISABLE("btn_export_disable"),
        BUTTON_EXPORT_HOVER("btn_export_hover"),
-       BUTTON_EXPORT_NOMAL("btn_export_nml"),
+       BUTTON_EXPORT_NORMAL("btn_export_nml"),
        BUTTON_RESET_DISABLE("btn_reset_disable"),
        BUTTON_RESET_HOVER("btn_reset_hover"),
-       BUTTON_RESET_NOMAL("btn_reset_nml"),
+       BUTTON_RESET_NORMAL("btn_reset_nml"),
        BUTTON_MODIFY_DISABLE("btn_modify_disable"),
        BUTTON_MODIFY_HOVER("btn_modify_hover"),
-       BUTTON_MODIFY_NOMAL("btn_modify_nml"),
+       BUTTON_MODIFY_NORMAL("btn_modify_nml"),
        BUTTON_RUN_DISABLE("btn_run_disable"),
        BUTTON_RUN_HOVER("btn_run_hover"),
-       BUTTON_RUN_NOMAL("btn_run_nml"),
+       BUTTON_RUN_NORMAL("btn_run_nml"),
+       BUTTON_CLONE_DISABLE("btn_clone_disable"),
+       BUTTON_CLONE_HOVER("btn_clone_hover"),
+       BUTTON_CLONE_NORMAL("btn_clone_nml"),
+       BUTTON_CREATE_DISABLE("btn_create_disable"),
+       BUTTON_CREATE_HOVER("btn_create_hover"),
+       BUTTON_CREATE_NORMAL("btn_create_nml"),
        BUTTON_FILTER_MOBILE_SELECTED_NORMAL("btn_filter_mobile_selected_nml"),
        BUTTON_FILTER_MOBILE_SELECTED_HOVER("btn_filter_mobile_selected_hover"),
        BUTTON_FILTER_MOBILE_UNSELECTED_HOVER("btn_filter_mobile_unselected_hover"),
-       BUTTON_FILTER_MOBILE_UNSELECTED_NOMAL("btn_filter_mobile_unselected_nml"),
+       BUTTON_FILTER_MOBILE_UNSELECTED_NORMAL("btn_filter_mobile_unselected_nml"),
        BUTTON_FILTER_TV_SELECTED_NORMAL("btn_filter_tv_selected_nml"),
        BUTTON_FILTER_TV_SELECTED_HOVER("btn_filter_tv_selected_hover"),
        BUTTON_FILTER_TV_UNSELECTED_HOVER("btn_filter_tv_unselected_hover"),
-       BUTTON_FILTER_TV_UNSELECTED_NOMAL("btn_filter_tv_unselected_nml"),
-       BUTTON_FILTER_WEARABLE_SELECTED_NOMAL("btn_filter_wearable_selected_nml"),
+       BUTTON_FILTER_TV_UNSELECTED_NORMAL("btn_filter_tv_unselected_nml"),
+       BUTTON_FILTER_WEARABLE_SELECTED_NORMAL("btn_filter_wearable_selected_nml"),
        BUTTON_FILTER_WEARABLE_SELECTED_HOVER("btn_filter_wearable_selected_hover"),
        BUTTON_FILTER_WEARABLE_UNSELECTED_HOVER("btn_filter_wearable_unselected_hover"),
-       BUTTON_FILTER_WEARABLE_UNSELECTED_NOMAL("btn_filter_wearable_unselected_nml"),
+       BUTTON_FILTER_WEARABLE_UNSELECTED_NORMAL("btn_filter_wearable_unselected_nml"),
        ICON_TYPE_MOBILE("icon_type_mobile"),
        ICON_TYPE_TV("icon_type_tv"),
        ICON_TYPE_WEARABLE("icon_type_wearable"),
index a2454bd..4aa820a 100644 (file)
@@ -40,6 +40,31 @@ import org.tizen.emulator.manager.ui.renewal.widgets.NinePatchResourceInfo;
 
 public class PatchImageResources {
 
+       public static Image getThreePatchButtonImage(int width, NinePatchResourceInfo ninePatchImagesInfo) {
+               Image leftImage = ninePatchImagesInfo.getLeftImage().getImage();
+               Image rightImage = ninePatchImagesInfo.getRightImage().getImage();
+               Image middleImage = ninePatchImagesInfo.getTopImage().getImage();
+
+               int height = middleImage.getImageData().height;
+               Image image = new Image(Display.getCurrent(), width, height);
+
+               GC gc = new GC(image);
+               gc.setInterpolation(SWT.NONE);
+               gc.setBackground(ninePatchImagesInfo.getBackground().getColor());
+               gc.fillRectangle(0, 0, width, height);
+
+               gc.drawImage(leftImage, 0, 0);
+               gc.drawImage(middleImage, 0, 0,
+                               middleImage.getImageData().width,
+                               middleImage.getImageData().height,
+                               leftImage.getImageData().width, 0,
+                               width - rightImage.getImageData().width - leftImage.getImageData().width,
+                               height);
+               gc.drawImage(rightImage, width - rightImage.getImageData().width, 0);
+               gc.dispose();
+               return image;
+       }
+
        public static Image getNinePatchButtonImage(int width, int height, NinePatchResourceInfo ninePatchImagesInfo) {
                Image lt = ninePatchImagesInfo.getLeftTopImage().getImage();
                Image t = ninePatchImagesInfo.getTopImage().getImage();
index b989c6a..715cde7 100644 (file)
@@ -63,6 +63,7 @@ public class FilePathResources {
        private final static String swap_suffix = File.separator + "swap"; //$NON-NLS-1$
        private final static String data_suffix = File.separator +"data"; //$NON-NLS-1$
        private final static String images_suffix = File.separator + "images"; //$NON-NLS-1$
+       private final static String device_suffix = File.separator + "devices";
 
        private final static String win_sdb_exec = File.separator + "sdb.exe"; //$NON-NLS-1$
        private final static String sdb_exec = File.separator + "sdb"; //$NON-NLS-1$
@@ -94,6 +95,7 @@ public class FilePathResources {
        private static String toolEmulatorBinPath;
        private static String toolEmulatorEtcPath;
        private static String toolEmulatorRemotePath;
+       private static String toolEmulatorDevicePath;
 
        // Platform
        private static String platformSkinsPath;
@@ -111,6 +113,7 @@ public class FilePathResources {
        private static String tizensdkdataPath;
        private static String tizensdkdataEmulatorPath;;
        private static String sdkDataVmsPath;
+       private static String sdkDataDevicePath;
 
        static {
                // emulator-manager.jar file path
@@ -177,6 +180,7 @@ public class FilePathResources {
 
                toolEmulatorEtcPath = toolEmulatorPath +  etc_suffix;
                toolEmulatorRemotePath = toolEmulatorPath + remote_suffix;
+               toolEmulatorDevicePath = toolEmulatorPath + device_suffix;
 
                sdkDataSdcardPath = toolEmulatorPath + storages_suffix + sdcard_suffix;
                sdkDataSwapPath = toolEmulatorPath + storages_suffix + swap_suffix;
@@ -186,6 +190,7 @@ public class FilePathResources {
 //             swapPath = tizensdkdataEmulatorPath + swap_suffix;
                swapPath = sdkDataSwapPath;
                sdkDataVmsPath = tizensdkdataEmulatorPath + vms_suffix;
+               sdkDataDevicePath = tizensdkdataEmulatorPath + device_suffix;
 
                EmulatorVMList.makeSDKDataPath(sdkDataVmsPath);
                testPrintPath();
@@ -340,6 +345,10 @@ public class FilePathResources {
                return toolEmulatorRemotePath;
        }
 
+       public static String getToolEmulatorDevicePath() {
+               return toolEmulatorDevicePath;
+       }
+
        // emulator common check tool
        public static String getEmulatorCheckToolPath() {
                 return getToolEmulatorBinPath();
@@ -415,6 +424,10 @@ public class FilePathResources {
                return sdkDataVmsPath;
        }
 
+       public static String getTizenSdkDataDevicePath() {
+               return sdkDataDevicePath;
+       }
+
        public static String getTizenSdkDataEmulatorPath() {
                return tizensdkdataEmulatorPath;
        }
index 99f0373..8a29d16 100644 (file)
@@ -101,10 +101,10 @@ public class ProfileButtonMaker {
                button.setImages(ImageResources.BUTTON_FILTER_MOBILE_SELECTED_NORMAL.getImage(),
                                ImageResources.BUTTON_FILTER_MOBILE_SELECTED_HOVER.getImage(),
                                ImageResources.BUTTON_FILTER_MOBILE_SELECTED_HOVER.getImage(),
-                               ImageResources.BUTTON_FILTER_MOBILE_UNSELECTED_NOMAL.getImage(),
+                               ImageResources.BUTTON_FILTER_MOBILE_UNSELECTED_NORMAL.getImage(),
                                ImageResources.BUTTON_FILTER_MOBILE_UNSELECTED_HOVER.getImage(),
                                ImageResources.BUTTON_FILTER_MOBILE_UNSELECTED_HOVER.getImage(),
-                               ImageResources.BUTTON_FILTER_MOBILE_UNSELECTED_NOMAL.getImage()); // disable
+                               ImageResources.BUTTON_FILTER_MOBILE_UNSELECTED_NORMAL.getImage()); // disable
 
                return button;
        }
@@ -114,23 +114,23 @@ public class ProfileButtonMaker {
                button.setImages(ImageResources.BUTTON_FILTER_TV_SELECTED_NORMAL.getImage(),
                                ImageResources.BUTTON_FILTER_TV_SELECTED_HOVER.getImage(),
                                ImageResources.BUTTON_FILTER_TV_SELECTED_HOVER.getImage(),
-                               ImageResources.BUTTON_FILTER_TV_UNSELECTED_NOMAL.getImage(),
+                               ImageResources.BUTTON_FILTER_TV_UNSELECTED_NORMAL.getImage(),
                                ImageResources.BUTTON_FILTER_TV_UNSELECTED_HOVER.getImage(),
                                ImageResources.BUTTON_FILTER_TV_UNSELECTED_HOVER.getImage(),
-                               ImageResources.BUTTON_FILTER_TV_UNSELECTED_NOMAL.getImage());
+                               ImageResources.BUTTON_FILTER_TV_UNSELECTED_NORMAL.getImage());
 
                return button;
        }
 
        private static ImageButton makeWearableButton(Composite comp) {
                ImageButton button = new ImageButton(comp, SWT.TOGGLE);
-               button.setImages(ImageResources.BUTTON_FILTER_WEARABLE_SELECTED_NOMAL.getImage(),
+               button.setImages(ImageResources.BUTTON_FILTER_WEARABLE_SELECTED_NORMAL.getImage(),
                                ImageResources.BUTTON_FILTER_WEARABLE_SELECTED_HOVER.getImage(),
                                ImageResources.BUTTON_FILTER_WEARABLE_SELECTED_HOVER.getImage(),
-                               ImageResources.BUTTON_FILTER_WEARABLE_UNSELECTED_NOMAL.getImage(),
+                               ImageResources.BUTTON_FILTER_WEARABLE_UNSELECTED_NORMAL.getImage(),
                                ImageResources.BUTTON_FILTER_WEARABLE_UNSELECTED_HOVER.getImage(),
                                ImageResources.BUTTON_FILTER_WEARABLE_UNSELECTED_HOVER.getImage(),
-                               ImageResources.BUTTON_FILTER_WEARABLE_UNSELECTED_NOMAL.getImage());
+                               ImageResources.BUTTON_FILTER_WEARABLE_UNSELECTED_NORMAL.getImage());
 
                return button;
        }
index 2cfe124..94b00b7 100644 (file)
@@ -333,7 +333,7 @@ public class VMListTable {
        private void makeVMButton() {
                resetButton = new ImageButton(comp, SWT.PUSH);
                resetButton.setBackground(null);
-               resetButton.setImages(ImageResources.BUTTON_RESET_NOMAL.getImage(),
+               resetButton.setImages(ImageResources.BUTTON_RESET_NORMAL.getImage(),
                                ImageResources.BUTTON_RESET_HOVER.getImage(),
                                ImageResources.BUTTON_RESET_HOVER.getImage(),
                                ImageResources.BUTTON_RESET_DISABLE.getImage());
@@ -349,7 +349,7 @@ public class VMListTable {
 
                exportButton = new ImageButton(comp, SWT.PUSH);
                exportButton.setBackground(null);
-               exportButton.setImages(ImageResources.BUTTON_EXPORT_NOMAL.getImage(),
+               exportButton.setImages(ImageResources.BUTTON_EXPORT_NORMAL.getImage(),
                                ImageResources.BUTTON_EXPORT_HOVER.getImage(),
                                ImageResources.BUTTON_EXPORT_HOVER.getImage(),
                                ImageResources.BUTTON_EXPORT_DISABLE.getImage());
@@ -365,7 +365,7 @@ public class VMListTable {
 
                deleteButton = new ImageButton(comp, SWT.PUSH);
                deleteButton.setBackground(null);
-               deleteButton.setImages(ImageResources.BUTTON_DELETE_NOMAL.getImage(),
+               deleteButton.setImages(ImageResources.BUTTON_DELETE_NORMAL.getImage(),
                                ImageResources.BUTTON_DELETE_HOVER.getImage(),
                                ImageResources.BUTTON_DELETE_HOVER.getImage(),
                                ImageResources.BUTTON_DELETE_DISABLE.getImage());
@@ -381,7 +381,7 @@ public class VMListTable {
 
                modifyButton = new ImageButton(comp, SWT.PUSH);
                modifyButton.setBackground(null);
-               modifyButton.setImages(ImageResources.BUTTON_MODIFY_NOMAL.getImage(),
+               modifyButton.setImages(ImageResources.BUTTON_MODIFY_NORMAL.getImage(),
                                ImageResources.BUTTON_MODIFY_HOVER.getImage(),
                                ImageResources.BUTTON_MODIFY_HOVER.getImage(),
                                ImageResources.BUTTON_MODIFY_DISABLE.getImage());
@@ -397,7 +397,7 @@ public class VMListTable {
 
                launchButton = new ImageButton(comp, SWT.PUSH);
                launchButton.setBackground(null);
-               launchButton.setImages(ImageResources.BUTTON_RUN_NOMAL.getImage(),
+               launchButton.setImages(ImageResources.BUTTON_RUN_NORMAL.getImage(),
                                ImageResources.BUTTON_RUN_HOVER.getImage(),
                                ImageResources.BUTTON_RUN_HOVER.getImage(),
                                ImageResources.BUTTON_RUN_DISABLE.getImage());