From db607f8bb261518efa6910e97e6b773bdcc05b09 Mon Sep 17 00:00:00 2001 From: GiWoong Kim Date: Mon, 22 Dec 2014 19:52:00 +0900 Subject: [PATCH] xml: added rotary image schema Change-Id: Ie78a941f09d2c8bb67e4f48919330f76ed41e523 Signed-off-by: GiWoong Kim --- .../org/tizen/emulator/skin/dbi/DisplayType.java | 30 ++++++++++++++++++++-- .../skin/image/ProfileSkinImageRegistry.java | 12 ++++++++- .../skin/client/xsd/ProfileSpecificSkin-layout.xsd | 1 + 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/DisplayType.java b/tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/DisplayType.java index 8a37e76..7851bf2 100644 --- a/tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/DisplayType.java +++ b/tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/DisplayType.java @@ -1,7 +1,7 @@ /** * XML Binding * - * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved. + * Copyright (C) 2011 - 2014 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: * GiWoong Kim @@ -30,7 +30,7 @@ // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.12.18 at 11:23:37 AM KST +// Generated on: 2014.12.22 at 07:46:39 PM KST // @@ -55,6 +55,7 @@ import javax.xml.bind.annotation.XmlType; * <all> * <element name="region" type="{http://www.tizen.org/emulator/skin/dbi}regionType"/> * <element name="maskImage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> + * <element name="rotaryImage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * </all> * <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /> * </restriction> @@ -73,6 +74,7 @@ public class DisplayType { @XmlElement(required = true) protected RegionType region; protected String maskImage; + protected String rotaryImage; @XmlAttribute(name = "id", required = true) protected int id; @@ -125,6 +127,30 @@ public class DisplayType { } /** + * Gets the value of the rotaryImage property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRotaryImage() { + return rotaryImage; + } + + /** + * Sets the value of the rotaryImage property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRotaryImage(String value) { + this.rotaryImage = value; + } + + /** * Gets the value of the id property. * */ diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/image/ProfileSkinImageRegistry.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/image/ProfileSkinImageRegistry.java index c435c42..2bb087b 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/image/ProfileSkinImageRegistry.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/image/ProfileSkinImageRegistry.java @@ -54,7 +54,8 @@ public class ProfileSkinImageRegistry { public enum SkinImageType { PROFILE_IMAGE_TYPE_NORMAL, PROFILE_IMAGE_TYPE_PRESSED, - DISPLAY_MASK_IMAGE + DISPLAY_MASK_IMAGE, + DISPLAY_ROTARY_IMAGE } private Display display; @@ -125,6 +126,15 @@ public class ProfileSkinImageRegistry { String displayMaskKey = makeKey(id, imageType); skinImageMap.put(displayMaskKey, new Image(display, skinPath + File.separator + displayMaskImage)); + } else if (SkinImageType.DISPLAY_ROTARY_IMAGE == imageType) { + String displayRotaryImage = rotation.getDisplay().getRotaryImage(); + if (StringUtil.isEmpty(StringUtil.nvl(displayRotaryImage))) { + return null; + } + + String displayRotaryKey = makeKey(id, imageType); + skinImageMap.put(displayRotaryKey, + new Image(display, skinPath + File.separator + displayRotaryImage)); } break; diff --git a/tizen/src/skin/client/xsd/ProfileSpecificSkin-layout.xsd b/tizen/src/skin/client/xsd/ProfileSpecificSkin-layout.xsd index 2cf4f9c..2b9f3c0 100644 --- a/tizen/src/skin/client/xsd/ProfileSpecificSkin-layout.xsd +++ b/tizen/src/skin/client/xsd/ProfileSpecificSkin-layout.xsd @@ -50,6 +50,7 @@ xmlns:dbi="http://www.tizen.org/emulator/skin/dbi" elementFormDefault="qualified + -- 2.7.4