From: jihye424.kim Date: Thu, 20 Aug 2015 05:03:56 +0000 (+0900) Subject: Resources: add image and color resources for table viewer X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4a5a68b5b9a0966021a28ba9619c341255a007c;p=sdk%2Femulator%2Femulator-manager.git Resources: add image and color resources for table viewer Change-Id: I13e5ced22de4fad8a22f7d3596a3e793700c6781 Signed-off-by: jihye424.kim --- diff --git a/resource/renewal/res/btn_delete_disable.png b/resource/renewal/res/btn_delete_disable.png new file mode 100644 index 0000000..35e40e4 Binary files /dev/null and b/resource/renewal/res/btn_delete_disable.png differ diff --git a/resource/renewal/res/btn_delete_hover.png b/resource/renewal/res/btn_delete_hover.png new file mode 100644 index 0000000..b4f8f72 Binary files /dev/null and b/resource/renewal/res/btn_delete_hover.png differ diff --git a/resource/renewal/res/btn_delete_nml.png b/resource/renewal/res/btn_delete_nml.png new file mode 100644 index 0000000..b0ee4ed Binary files /dev/null and b/resource/renewal/res/btn_delete_nml.png differ diff --git a/resource/renewal/res/btn_export_disable.png b/resource/renewal/res/btn_export_disable.png new file mode 100644 index 0000000..ef4c8a3 Binary files /dev/null and b/resource/renewal/res/btn_export_disable.png differ diff --git a/resource/renewal/res/btn_export_hover.png b/resource/renewal/res/btn_export_hover.png new file mode 100644 index 0000000..235544c Binary files /dev/null and b/resource/renewal/res/btn_export_hover.png differ diff --git a/resource/renewal/res/btn_export_nml.png b/resource/renewal/res/btn_export_nml.png new file mode 100644 index 0000000..3da368e Binary files /dev/null and b/resource/renewal/res/btn_export_nml.png differ diff --git a/resource/renewal/res/btn_filter_mobile_selected_hover.png b/resource/renewal/res/btn_filter_mobile_selected_hover.png new file mode 100644 index 0000000..b959017 Binary files /dev/null and b/resource/renewal/res/btn_filter_mobile_selected_hover.png differ diff --git a/resource/renewal/res/btn_filter_mobile_selected_nml.png b/resource/renewal/res/btn_filter_mobile_selected_nml.png new file mode 100644 index 0000000..1f872a1 Binary files /dev/null and b/resource/renewal/res/btn_filter_mobile_selected_nml.png differ diff --git a/resource/renewal/res/btn_filter_mobile_unselected_hover.png b/resource/renewal/res/btn_filter_mobile_unselected_hover.png new file mode 100644 index 0000000..bf27fe4 Binary files /dev/null and b/resource/renewal/res/btn_filter_mobile_unselected_hover.png differ diff --git a/resource/renewal/res/btn_filter_mobile_unselected_nml.png b/resource/renewal/res/btn_filter_mobile_unselected_nml.png new file mode 100644 index 0000000..1c9a3d7 Binary files /dev/null and b/resource/renewal/res/btn_filter_mobile_unselected_nml.png differ diff --git a/resource/renewal/res/btn_filter_tv_selected_hover.png b/resource/renewal/res/btn_filter_tv_selected_hover.png new file mode 100644 index 0000000..8167395 Binary files /dev/null and b/resource/renewal/res/btn_filter_tv_selected_hover.png differ diff --git a/resource/renewal/res/btn_filter_tv_selected_nml.png b/resource/renewal/res/btn_filter_tv_selected_nml.png new file mode 100644 index 0000000..b1e56f2 Binary files /dev/null and b/resource/renewal/res/btn_filter_tv_selected_nml.png differ diff --git a/resource/renewal/res/btn_filter_tv_unselected_hover.png b/resource/renewal/res/btn_filter_tv_unselected_hover.png new file mode 100644 index 0000000..214002a Binary files /dev/null and b/resource/renewal/res/btn_filter_tv_unselected_hover.png differ diff --git a/resource/renewal/res/btn_filter_tv_unselected_nml.png b/resource/renewal/res/btn_filter_tv_unselected_nml.png new file mode 100644 index 0000000..222a9ec Binary files /dev/null and b/resource/renewal/res/btn_filter_tv_unselected_nml.png differ diff --git a/resource/renewal/res/btn_filter_wearable_selected_hover.png b/resource/renewal/res/btn_filter_wearable_selected_hover.png new file mode 100644 index 0000000..b10a6bd Binary files /dev/null and b/resource/renewal/res/btn_filter_wearable_selected_hover.png differ diff --git a/resource/renewal/res/btn_filter_wearable_selected_nml.png b/resource/renewal/res/btn_filter_wearable_selected_nml.png new file mode 100644 index 0000000..8a0b6cb Binary files /dev/null and b/resource/renewal/res/btn_filter_wearable_selected_nml.png differ diff --git a/resource/renewal/res/btn_filter_wearable_unselected_hover.png b/resource/renewal/res/btn_filter_wearable_unselected_hover.png new file mode 100644 index 0000000..f7bf3ab Binary files /dev/null and b/resource/renewal/res/btn_filter_wearable_unselected_hover.png differ diff --git a/resource/renewal/res/btn_filter_wearable_unselected_nml.png b/resource/renewal/res/btn_filter_wearable_unselected_nml.png new file mode 100644 index 0000000..91a32d4 Binary files /dev/null and b/resource/renewal/res/btn_filter_wearable_unselected_nml.png differ diff --git a/resource/renewal/res/btn_info_hover.png b/resource/renewal/res/btn_info_hover.png new file mode 100644 index 0000000..4dc5074 Binary files /dev/null and b/resource/renewal/res/btn_info_hover.png differ diff --git a/resource/renewal/res/btn_info_nml.png b/resource/renewal/res/btn_info_nml.png new file mode 100644 index 0000000..9144b5b Binary files /dev/null and b/resource/renewal/res/btn_info_nml.png differ diff --git a/resource/renewal/res/btn_modify_disable.png b/resource/renewal/res/btn_modify_disable.png new file mode 100644 index 0000000..8dec1c9 Binary files /dev/null and b/resource/renewal/res/btn_modify_disable.png differ diff --git a/resource/renewal/res/btn_modify_hover.png b/resource/renewal/res/btn_modify_hover.png new file mode 100644 index 0000000..71498fa Binary files /dev/null and b/resource/renewal/res/btn_modify_hover.png differ diff --git a/resource/renewal/res/btn_modify_nml.png b/resource/renewal/res/btn_modify_nml.png new file mode 100644 index 0000000..db761ae Binary files /dev/null and b/resource/renewal/res/btn_modify_nml.png differ diff --git a/resource/renewal/res/btn_refreshlist_hover.png b/resource/renewal/res/btn_refreshlist_hover.png new file mode 100644 index 0000000..c77af8b Binary files /dev/null and b/resource/renewal/res/btn_refreshlist_hover.png differ diff --git a/resource/renewal/res/btn_refreshlist_nml.png b/resource/renewal/res/btn_refreshlist_nml.png new file mode 100644 index 0000000..5128bfc Binary files /dev/null and b/resource/renewal/res/btn_refreshlist_nml.png differ diff --git a/resource/renewal/res/btn_reset_disable.png b/resource/renewal/res/btn_reset_disable.png new file mode 100644 index 0000000..406e005 Binary files /dev/null and b/resource/renewal/res/btn_reset_disable.png differ diff --git a/resource/renewal/res/btn_reset_hover.png b/resource/renewal/res/btn_reset_hover.png new file mode 100644 index 0000000..916bf5e Binary files /dev/null and b/resource/renewal/res/btn_reset_hover.png differ diff --git a/resource/renewal/res/btn_reset_nml.png b/resource/renewal/res/btn_reset_nml.png new file mode 100644 index 0000000..1cba97d Binary files /dev/null and b/resource/renewal/res/btn_reset_nml.png differ diff --git a/resource/renewal/res/btn_run_disable.png b/resource/renewal/res/btn_run_disable.png new file mode 100644 index 0000000..d2a9fd6 Binary files /dev/null and b/resource/renewal/res/btn_run_disable.png differ diff --git a/resource/renewal/res/btn_run_hover.png b/resource/renewal/res/btn_run_hover.png new file mode 100644 index 0000000..3f74ebc Binary files /dev/null and b/resource/renewal/res/btn_run_hover.png differ diff --git a/resource/renewal/res/btn_run_nml.png b/resource/renewal/res/btn_run_nml.png new file mode 100644 index 0000000..7ff352b Binary files /dev/null and b/resource/renewal/res/btn_run_nml.png differ diff --git a/resource/renewal/res/icon_column_down.png b/resource/renewal/res/icon_column_down.png new file mode 100644 index 0000000..4c0f744 Binary files /dev/null and b/resource/renewal/res/icon_column_down.png differ diff --git a/resource/renewal/res/icon_column_up.png b/resource/renewal/res/icon_column_up.png new file mode 100644 index 0000000..4dc77b5 Binary files /dev/null and b/resource/renewal/res/icon_column_up.png differ diff --git a/resource/renewal/res/icon_create_mobile.png b/resource/renewal/res/icon_create_mobile.png new file mode 100644 index 0000000..0924672 Binary files /dev/null and b/resource/renewal/res/icon_create_mobile.png differ diff --git a/resource/renewal/res/icon_create_new_vm.png b/resource/renewal/res/icon_create_new_vm.png new file mode 100644 index 0000000..71938a8 Binary files /dev/null and b/resource/renewal/res/icon_create_new_vm.png differ diff --git a/resource/renewal/res/icon_create_tv.png b/resource/renewal/res/icon_create_tv.png new file mode 100644 index 0000000..f53febb Binary files /dev/null and b/resource/renewal/res/icon_create_tv.png differ diff --git a/resource/renewal/res/icon_create_wearable.png b/resource/renewal/res/icon_create_wearable.png new file mode 100644 index 0000000..6aa54b2 Binary files /dev/null and b/resource/renewal/res/icon_create_wearable.png differ diff --git a/resource/renewal/res/icon_dropdown_arrow_hover.png b/resource/renewal/res/icon_dropdown_arrow_hover.png new file mode 100644 index 0000000..f88be11 Binary files /dev/null and b/resource/renewal/res/icon_dropdown_arrow_hover.png differ diff --git a/resource/renewal/res/icon_dropdown_arrow_nml.png b/resource/renewal/res/icon_dropdown_arrow_nml.png new file mode 100644 index 0000000..4774092 Binary files /dev/null and b/resource/renewal/res/icon_dropdown_arrow_nml.png differ diff --git a/resource/renewal/res/icon_file_sharing_off.png b/resource/renewal/res/icon_file_sharing_off.png new file mode 100644 index 0000000..2c3e3c2 Binary files /dev/null and b/resource/renewal/res/icon_file_sharing_off.png differ diff --git a/resource/renewal/res/icon_file_sharing_on.png b/resource/renewal/res/icon_file_sharing_on.png new file mode 100644 index 0000000..b66e6be Binary files /dev/null and b/resource/renewal/res/icon_file_sharing_on.png differ diff --git a/resource/renewal/res/icon_on.png b/resource/renewal/res/icon_on.png new file mode 100644 index 0000000..29c75a1 Binary files /dev/null and b/resource/renewal/res/icon_on.png differ diff --git a/resource/renewal/res/icon_selected_mobile.png b/resource/renewal/res/icon_selected_mobile.png new file mode 100644 index 0000000..427c37e Binary files /dev/null and b/resource/renewal/res/icon_selected_mobile.png differ diff --git a/resource/renewal/res/icon_selected_tv.png b/resource/renewal/res/icon_selected_tv.png new file mode 100644 index 0000000..4c61d8c Binary files /dev/null and b/resource/renewal/res/icon_selected_tv.png differ diff --git a/resource/renewal/res/icon_selected_wearable_round.png b/resource/renewal/res/icon_selected_wearable_round.png new file mode 100644 index 0000000..9ffb676 Binary files /dev/null and b/resource/renewal/res/icon_selected_wearable_round.png differ diff --git a/resource/renewal/res/icon_selected_wearable_square.png b/resource/renewal/res/icon_selected_wearable_square.png new file mode 100644 index 0000000..9dc3872 Binary files /dev/null and b/resource/renewal/res/icon_selected_wearable_square.png differ diff --git a/resource/renewal/res/icon_type_mobile.png b/resource/renewal/res/icon_type_mobile.png new file mode 100644 index 0000000..320168e Binary files /dev/null and b/resource/renewal/res/icon_type_mobile.png differ diff --git a/resource/renewal/res/icon_type_tv.png b/resource/renewal/res/icon_type_tv.png new file mode 100644 index 0000000..52390f3 Binary files /dev/null and b/resource/renewal/res/icon_type_tv.png differ diff --git a/resource/renewal/res/icon_type_wearable.png b/resource/renewal/res/icon_type_wearable.png new file mode 100644 index 0000000..57417a3 Binary files /dev/null and b/resource/renewal/res/icon_type_wearable.png differ diff --git a/resource/renewal/res/img_title_baseimages.png b/resource/renewal/res/img_title_baseimages.png new file mode 100644 index 0000000..8e0b77f Binary files /dev/null and b/resource/renewal/res/img_title_baseimages.png differ diff --git a/resource/renewal/res/img_title_creatnewdevice.png b/resource/renewal/res/img_title_creatnewdevice.png new file mode 100644 index 0000000..da8566a Binary files /dev/null and b/resource/renewal/res/img_title_creatnewdevice.png differ diff --git a/resource/renewal/res/img_title_templates.png b/resource/renewal/res/img_title_templates.png new file mode 100644 index 0000000..4d52732 Binary files /dev/null and b/resource/renewal/res/img_title_templates.png differ diff --git a/resource/renewal/res/img_title_yourvmlist.png b/resource/renewal/res/img_title_yourvmlist.png new file mode 100644 index 0000000..88b7ea9 Binary files /dev/null and b/resource/renewal/res/img_title_yourvmlist.png differ diff --git a/resource/renewal/res/img_titlebar.png b/resource/renewal/res/img_titlebar.png new file mode 100644 index 0000000..cea9e8c Binary files /dev/null and b/resource/renewal/res/img_titlebar.png differ diff --git a/src/org/tizen/emulator/manager/plugin/PluginImageResources.java b/src/org/tizen/emulator/manager/plugin/PluginImageResources.java index 0483948..b306934 100644 --- a/src/org/tizen/emulator/manager/plugin/PluginImageResources.java +++ b/src/org/tizen/emulator/manager/plugin/PluginImageResources.java @@ -67,7 +67,14 @@ public enum PluginImageResources { BUTTON_LAUNCH_PUSH("button_launch_pushed"), //$NON-NLS-1$ VM_IMAGE_CUSTOM_HOVER("emulator_list_custom_image_hover"), //$NON-NLS-1$ - VM_IMAGE_CUSTOM_NORMAL("emulator_list_custom_image_nml"); //$NON-NLS-1$ + VM_IMAGE_CUSTOM_NORMAL("emulator_list_custom_image_nml"), //$NON-NLS-1$ + + BUTTON_FILTER_UNSELECTED_NOMAL("btn_profile_unselected_nml"), + BUTTON_FILTER_UNSELECTED_HOVER("btn_profile_unselected_hover"), + BUTTON_FILTER_SELECTED_NOMAL("btn_profile_selected_nml"), + BUTTON_FILTER_SELECTED_HOVER("btn_profile_selected_hover"), + ICON_TYPE("icon_type"), + ICON_SELECTED_TYPE("icon_selected_type"); String name; Map image; diff --git a/src/org/tizen/emulator/manager/renewal/resources/ColorResources.java b/src/org/tizen/emulator/manager/renewal/resources/ColorResources.java index 479be35..898eca7 100644 --- a/src/org/tizen/emulator/manager/renewal/resources/ColorResources.java +++ b/src/org/tizen/emulator/manager/renewal/resources/ColorResources.java @@ -40,7 +40,15 @@ public enum ColorResources { GRAY_BTN_PUSH(100, 110, 144), GRAY_BTN_DISABLE(208, 208, 208), - GRAY_BTN_FONT(255, 255, 255); + GRAY_BTN_FONT(255, 255, 255), + + MESSAGE_BOX_TITLE_BG(111, 125, 149), + MESSAGE_BOX_TITLE_FONT(255, 255, 255), + MESSAGE_BOX_CONTENTS_BG(255, 255, 255), + MESSAGE_BOX_CONTENTS_FONT(102, 102, 102), + MESSAGE_BOX_BOTTOM_BG(224, 224, 224), + MESSAGE_BOX_BUTTON_BG(149, 159, 165), + MESSAGE_BOX_BUTTON_FONT(255, 255, 255); Color color; int r,g,b; diff --git a/src/org/tizen/emulator/manager/renewal/resources/ImageResources.java b/src/org/tizen/emulator/manager/renewal/resources/ImageResources.java index f15d759..5ae836d 100644 --- a/src/org/tizen/emulator/manager/renewal/resources/ImageResources.java +++ b/src/org/tizen/emulator/manager/renewal/resources/ImageResources.java @@ -32,12 +32,9 @@ package org.tizen.emulator.manager.renewal.resources; import java.io.IOException; import java.io.InputStream; -import java.util.HashMap; -import java.util.Map; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.ImageData; -import org.eclipse.swt.graphics.ImageLoader; import org.eclipse.swt.widgets.Display; import org.tizen.emulator.manager.logging.EMLogger; @@ -75,16 +72,59 @@ public enum ImageResources { GRAY_BTN_PUSH_R("9p_btn_push_r"), GRAY_BTN_PUSH_RB("9p_btn_push_rb"), GRAY_BTN_PUSH_RT("9p_btn_push_rt"), - GRAY_BTN_PUSH_T("9p_btn_push_t") + GRAY_BTN_PUSH_T("9p_btn_push_t"), // TAB_SELECTED_LEFT("tab_selected_left",ImageType.GIF), //$NON-NLS-1$ // TAB_SELECTED_MIDDLE("tab_selected_middle"), //$NON-NLS-1$ - ; + TITLE_IMAGE("img_titlebar"), + VMLIST_TITLE_IMAGE("img_title_yourvmlist"), + 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_EXPORT_DISABLE("btn_export_disable"), + BUTTON_EXPORT_HOVER("btn_export_hover"), + BUTTON_EXPORT_NOMAL("btn_export_nml"), + BUTTON_RESET_DISABLE("btn_reset_disable"), + BUTTON_RESET_HOVER("btn_reset_hover"), + BUTTON_RESET_NOMAL("btn_reset_nml"), + BUTTON_MODIFY_DISABLE("btn_modify_disable"), + BUTTON_MODIFY_HOVER("btn_modify_hover"), + BUTTON_MODIFY_NOMAL("btn_modify_nml"), + BUTTON_RUN_DISABLE("btn_run_disable"), + BUTTON_RUN_HOVER("btn_run_hover"), + BUTTON_RUN_NOMAL("btn_run_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_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_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"), + ICON_TYPE_MOBILE("icon_type_mobile"), + ICON_TYPE_TV("icon_type_tv"), + ICON_TYPE_WEARABLE("icon_type_wearable"), + ICON_SELECTED_MOBILE("icon_selected_mobile"), + ICON_SELECTED_TV("icon_selected_tv"), + ICON_SELECTED_WEARABLE_ROUND("icon_selected_wearable_round"), + ICON_SELECTED_WEARABLE_SQUARE("icon_selected_wearable_square"), + ICON_FILE_SHARE_ON("icon_file_sharing_on"), + ICON_FILE_SHARE_OFF("icon_file_sharing_off"), + ICON_RUNNING("icon_on"); String name; Image image; + ImageData imageData; ImageType type; ImageResources(String name) { @@ -114,22 +154,20 @@ public enum ImageResources { return image; } - public static Image getImage(String name, String extension) { - return ImageRegistry.getImage(name, extension); - } + public ImageData getImageData() { + if (this.image == null) { + this.image = getImage(); + } - // for gif animation - private ImageData[] frames = null; - public ImageData[] getImageData() { - if (this.frames == null) { - frames = ImageRegistry.getImageData(name, type.getType()); + if (this.image == null) { + return null; } - return frames; - } + if (this.imageData == null) { + this.imageData = this.image.getImageData(); + } - public static ImageData[] getImageData(String name, String extension) { - return ImageRegistry.getImageData(name, extension); + return this.imageData; } @Override @@ -139,31 +177,23 @@ public enum ImageResources { public static void dispose() { for (ImageResources r : ImageResources.values()) { - r.image = null; + if (r.image != null) { + r.image.dispose(); + r.image = null; + } } - ImageRegistry.dispose(); } } class ImageRegistry { - //private static final String ID = "org.tizen.dynamicanalyzer"; - private static Map map = new HashMap(); - - public static void dispose() { - for (Image i : map.values()) { - i.dispose(); - } - } - public static Image getImage(String name, String extension) { - Image i = map.get(name); + Image i = null; if (i == null) { ClassLoader loader = ImageRegistry.class.getClassLoader(); if (loader != null) { InputStream is = loader.getResourceAsStream("renewal/res/" + name + "." + extension); //$NON-NLS-1$ //$NON-NLS-2$ if (is != null) { i = new Image(Display.getCurrent(), is); - map.put(name, i); try { is.close(); } catch (IOException e) { @@ -175,23 +205,6 @@ class ImageRegistry { return i; } - public static ImageData[] getImageData(String name, String extension) { - ClassLoader loader = ImageRegistry.class.getClassLoader(); - ImageData[] frames = null; - if (loader != null) { - InputStream is = loader.getResourceAsStream("res/" + name + "." + extension); //$NON-NLS-1$ //$NON-NLS-2$ - if (is != null) { - frames = new ImageLoader().load(is); - try { - is.close(); - } catch (IOException e) { - EMLogger.getLogger().info(e.getMessage()); - } - } - } - return frames; - } - public static Image getPngImage(String name) { return getImage(name, "png"); //$NON-NLS-1$ }