menu: added default popup menu schema
authorGiWoong Kim <giwoong.kim@samsung.com>
Thu, 11 Jul 2013 03:17:13 +0000 (12:17 +0900)
committerGiWoong Kim <giwoong.kim@samsung.com>
Thu, 11 Jul 2013 03:17:13 +0000 (12:17 +0900)
added default popup menu schema

Change-Id: Idc3e35cadb533d513f5af1070c132c1ae9b2c0e0
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
26 files changed:
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/DisplayType.java
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/EmulatorUI.java
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/EventInfoType.java
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/HoverType.java
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/ImageListType.java
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/KeyMapListType.java
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/KeyMapType.java
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/MenuItemType.java [new file with mode: 0644]
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/ObjectFactory.java
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/PopupMenuType.java [new file with mode: 0644]
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/RegionType.java
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/RgbType.java
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/RotationNameType.java
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/RotationType.java
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/RotationsType.java
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/package-info.java
tizen/src/skin/client/skins/emul-320x480/default.dbi
tizen/src/skin/client/skins/emul-480x800-3btn/default.dbi
tizen/src/skin/client/skins/emul-480x800/default.dbi
tizen/src/skin/client/skins/emul-600x1024/default.dbi
tizen/src/skin/client/skins/emul-720x1280-3btn/default.dbi
tizen/src/skin/client/skins/emul-720x1280/default.dbi
tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java
tizen/src/skin/client/src/org/tizen/emulator/skin/layout/GeneralPurposeSkinComposer.java
tizen/src/skin/client/src/org/tizen/emulator/skin/menu/PopupMenu.java
tizen/src/skin/client/xsd/dbi.xsd

index 46a53de..01e5208 100644 (file)
@@ -30,7 +30,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2013.07.10 at 07:19:41 PM KST 
+// Generated on: 2013.07.11 at 12:12:25 PM KST 
 //
 
 
index 14c83c2..3467924 100644 (file)
@@ -30,7 +30,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2013.07.10 at 07:19:41 PM KST 
+// Generated on: 2013.07.11 at 12:12:25 PM KST 
 //
 
 
@@ -56,6 +56,7 @@ import javax.xml.bind.annotation.XmlType;
  *         &lt;element name="dbi_version" type="{http://www.w3.org/2001/XMLSchema}float"/>
  *         &lt;element name="rotations" type="{http://www.tizen.org/emulator/skin/dbi}rotationsType"/>
  *         &lt;element name="hover" type="{http://www.tizen.org/emulator/skin/dbi}hoverType" minOccurs="0"/>
+ *         &lt;element name="popupMenu" type="{http://www.tizen.org/emulator/skin/dbi}popupMenuType" minOccurs="0"/>
  *       &lt;/all>
  *     &lt;/restriction>
  *   &lt;/complexContent>
@@ -76,6 +77,7 @@ public class EmulatorUI {
     @XmlElement(required = true)
     protected RotationsType rotations;
     protected HoverType hover;
+    protected PopupMenuType popupMenu;
 
     /**
      * Gets the value of the dbiVersion property.
@@ -141,4 +143,28 @@ public class EmulatorUI {
         this.hover = value;
     }
 
+    /**
+     * Gets the value of the popupMenu property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link PopupMenuType }
+     *     
+     */
+    public PopupMenuType getPopupMenu() {
+        return popupMenu;
+    }
+
+    /**
+     * Sets the value of the popupMenu property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link PopupMenuType }
+     *     
+     */
+    public void setPopupMenu(PopupMenuType value) {
+        this.popupMenu = value;
+    }
+
 }
index 6199df4..ee302a6 100644 (file)
@@ -30,7 +30,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2013.07.10 at 07:19:41 PM KST 
+// Generated on: 2013.07.11 at 12:12:25 PM KST 
 //
 
 
index 27cb590..ced0d34 100644 (file)
@@ -30,7 +30,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2013.07.10 at 07:19:41 PM KST 
+// Generated on: 2013.07.11 at 12:12:25 PM KST 
 //
 
 
index 39696fe..302ec97 100644 (file)
@@ -30,7 +30,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2013.07.10 at 07:19:41 PM KST 
+// Generated on: 2013.07.11 at 12:12:25 PM KST 
 //
 
 
index 6ffdb31..fa0f701 100644 (file)
@@ -30,7 +30,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2013.07.10 at 07:19:41 PM KST 
+// Generated on: 2013.07.11 at 12:12:25 PM KST 
 //
 
 
index 7bd4dca..64e9b32 100644 (file)
@@ -30,7 +30,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2013.07.10 at 07:19:41 PM KST 
+// Generated on: 2013.07.11 at 12:12:25 PM KST 
 //
 
 
diff --git a/tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/MenuItemType.java b/tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/MenuItemType.java
new file mode 100644 (file)
index 0000000..ceecb7b
--- /dev/null
@@ -0,0 +1,128 @@
+/**
+ * XML Binding
+ *
+ * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * GiWoong Kim <giwoong.kim@samsung.com>
+ * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2013.07.11 at 12:12:25 PM KST 
+//
+
+
+package org.tizen.emulator.skin.dbi;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for menuItemType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="menuItemType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;attribute name="itemName" type="{http://www.w3.org/2001/XMLSchema}string" default="&amp;Rotate" />
+ *       &lt;attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "menuItemType")
+public class MenuItemType {
+
+    @XmlAttribute(name = "itemName")
+    protected String itemName;
+    @XmlAttribute(name = "visible")
+    protected Boolean visible;
+
+    /**
+     * Gets the value of the itemName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getItemName() {
+        if (itemName == null) {
+            return "&Rotate";
+        } else {
+            return itemName;
+        }
+    }
+
+    /**
+     * Sets the value of the itemName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setItemName(String value) {
+        this.itemName = value;
+    }
+
+    /**
+     * Gets the value of the visible property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public boolean isVisible() {
+        if (visible == null) {
+            return true;
+        } else {
+            return visible;
+        }
+    }
+
+    /**
+     * Sets the value of the visible property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setVisible(Boolean value) {
+        this.visible = value;
+    }
+
+}
index ad38992..1ad0690 100644 (file)
@@ -30,7 +30,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2013.07.10 at 07:19:41 PM KST 
+// Generated on: 2013.07.11 at 12:12:25 PM KST 
 //
 
 
@@ -89,19 +89,19 @@ public class ObjectFactory {
     }
 
     /**
-     * Create an instance of {@link EventInfoType }
+     * Create an instance of {@link PopupMenuType }
      * 
      */
-    public EventInfoType createEventInfoType() {
-        return new EventInfoType();
+    public PopupMenuType createPopupMenuType() {
+        return new PopupMenuType();
     }
 
     /**
-     * Create an instance of {@link RgbType }
+     * Create an instance of {@link EventInfoType }
      * 
      */
-    public RgbType createRgbType() {
-        return new RgbType();
+    public EventInfoType createEventInfoType() {
+        return new EventInfoType();
     }
 
     /**
@@ -113,19 +113,19 @@ public class ObjectFactory {
     }
 
     /**
-     * Create an instance of {@link DisplayType }
+     * Create an instance of {@link KeyMapListType }
      * 
      */
-    public DisplayType createDisplayType() {
-        return new DisplayType();
+    public KeyMapListType createKeyMapListType() {
+        return new KeyMapListType();
     }
 
     /**
-     * Create an instance of {@link KeyMapListType }
+     * Create an instance of {@link KeyMapType }
      * 
      */
-    public KeyMapListType createKeyMapListType() {
-        return new KeyMapListType();
+    public KeyMapType createKeyMapType() {
+        return new KeyMapType();
     }
 
     /**
@@ -137,11 +137,27 @@ public class ObjectFactory {
     }
 
     /**
-     * Create an instance of {@link KeyMapType }
+     * Create an instance of {@link RgbType }
      * 
      */
-    public KeyMapType createKeyMapType() {
-        return new KeyMapType();
+    public RgbType createRgbType() {
+        return new RgbType();
+    }
+
+    /**
+     * Create an instance of {@link DisplayType }
+     * 
+     */
+    public DisplayType createDisplayType() {
+        return new DisplayType();
+    }
+
+    /**
+     * Create an instance of {@link MenuItemType }
+     * 
+     */
+    public MenuItemType createMenuItemType() {
+        return new MenuItemType();
     }
 
     /**
diff --git a/tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/PopupMenuType.java b/tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/PopupMenuType.java
new file mode 100644 (file)
index 0000000..54025e1
--- /dev/null
@@ -0,0 +1,122 @@
+/**
+ * XML Binding
+ *
+ * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * GiWoong Kim <giwoong.kim@samsung.com>
+ * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2013.07.11 at 12:12:25 PM KST 
+//
+
+
+package org.tizen.emulator.skin.dbi;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for popupMenuType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="popupMenuType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="rotationItem" type="{http://www.tizen.org/emulator/skin/dbi}menuItemType" minOccurs="0"/>
+ *         &lt;element name="keywindowItem" type="{http://www.tizen.org/emulator/skin/dbi}menuItemType" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "popupMenuType", propOrder = {
+    "rotationItem",
+    "keywindowItem"
+})
+public class PopupMenuType {
+
+    protected MenuItemType rotationItem;
+    protected MenuItemType keywindowItem;
+
+    /**
+     * Gets the value of the rotationItem property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MenuItemType }
+     *     
+     */
+    public MenuItemType getRotationItem() {
+        return rotationItem;
+    }
+
+    /**
+     * Sets the value of the rotationItem property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MenuItemType }
+     *     
+     */
+    public void setRotationItem(MenuItemType value) {
+        this.rotationItem = value;
+    }
+
+    /**
+     * Gets the value of the keywindowItem property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MenuItemType }
+     *     
+     */
+    public MenuItemType getKeywindowItem() {
+        return keywindowItem;
+    }
+
+    /**
+     * Sets the value of the keywindowItem property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MenuItemType }
+     *     
+     */
+    public void setKeywindowItem(MenuItemType value) {
+        this.keywindowItem = value;
+    }
+
+}
index 763726d..8685466 100644 (file)
@@ -1,3 +1,4 @@
+//
 /**
  * XML Binding
  *
  *
  */
 
-//
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2013.07.10 at 07:19:41 PM KST 
+// Generated on: 2013.07.11 at 12:12:25 PM KST 
 //
 
 
index 1d12458..2225e78 100644 (file)
@@ -1,3 +1,4 @@
+//
 /**
  * XML Binding
  *
  *
  */
 
-//
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2013.07.10 at 07:19:41 PM KST 
+// Generated on: 2013.07.11 at 12:12:25 PM KST 
 //
 
 
index 169c15d..4959ceb 100644 (file)
@@ -30,7 +30,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2013.07.10 at 07:19:41 PM KST 
+// Generated on: 2013.07.11 at 12:12:25 PM KST 
 //
 
 
index f92f359..1289703 100644 (file)
@@ -30,7 +30,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2013.07.10 at 07:19:41 PM KST 
+// Generated on: 2013.07.11 at 12:12:25 PM KST 
 //
 
 
index 2440617..63ee843 100644 (file)
@@ -30,7 +30,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2013.07.10 at 07:19:41 PM KST 
+// Generated on: 2013.07.11 at 12:12:25 PM KST 
 //
 
 
index bc87316..bbce9c1 100644 (file)
@@ -30,7 +30,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2013.07.10 at 07:19:41 PM KST 
+// Generated on: 2013.07.11 at 12:12:25 PM KST 
 //
 
 @javax.xml.bind.annotation.XmlSchema(namespace = "http://www.tizen.org/emulator/skin/dbi", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
index 2e17180..f1ce9ca 100644 (file)
     <hover>
         <color B="255" G="255" R="255" />
     </hover>
+    <popupMenu>
+        <keywindowItem visible="false" />
+    </popupMenu>
 </EmulatorUI>
index 03dff1a..6b39a7b 100644 (file)
     <hover>
         <color B="255" G="255" R="255" />
     </hover>
+    <popupMenu>
+        <keywindowItem visible="false" />
+    </popupMenu>
 </EmulatorUI>
index 5459bec..66d3e22 100644 (file)
     <hover>
         <color B="255" G="255" R="255" />
     </hover>
+    <popupMenu>
+        <keywindowItem visible="false" />
+    </popupMenu>
 </EmulatorUI>
index be34f73..c012813 100644 (file)
     <hover>
         <color B="255" G="255" R="255" />
     </hover>
+    <popupMenu>
+        <keywindowItem visible="false" />
+    </popupMenu>
 </EmulatorUI>
index 54dab56..7c7187d 100644 (file)
     <hover>
         <color B="255" G="255" R="255" />
     </hover>
+    <popupMenu>
+        <keywindowItem visible="false" />
+    </popupMenu>
 </EmulatorUI>
index 775d9aa..c4e4e0d 100644 (file)
     <hover>
         <color B="255" G="255" R="255" />
     </hover>
+    <popupMenu>
+        <keywindowItem visible="false" />
+    </popupMenu>
 </EmulatorUI>
index 7165eb5..bae5741 100644 (file)
@@ -993,16 +993,29 @@ public class EmulatorSkin {
                /* abstract */
        }
 
-       public boolean isSelectKeyWindow() {
-               return popupMenu.keyWindowItem.getSelection();
+       public boolean isSelectKeyWindowMenu() {
+               if (popupMenu.keyWindowItem != null) {
+                       return popupMenu.keyWindowItem.getSelection();
+               }
+
+               return false;
+       }
+
+       public void selectKeyWindowMenu(boolean on) {
+               if (popupMenu.keyWindowItem != null) {
+                       popupMenu.keyWindowItem.setSelection(on);
+               }
        }
 
        public void openKeyWindow(int dockValue, boolean recreate) {
                if (keyWindow != null) {
                        if (recreate == false) {
                                /* show the key window */
-                               popupMenu.keyWindowItem.setSelection(isKeyWindow = true);
-                               pairTag.setVisible(true);
+                               selectKeyWindowMenu(isKeyWindow = true);
+
+                               if (pairTag != null) {
+                                       pairTag.setVisible(true);
+                               }
 
                                keyWindow.getShell().setVisible(true);
                                SkinUtil.setTopMost(keyWindow.getShell(), isOnTop);
@@ -1019,28 +1032,33 @@ public class EmulatorSkin {
                                SkinUtil.getHWKeyMapList(currentState.getCurrentRotationId());
 
                if (keyMapList == null) {
-                       popupMenu.keyWindowItem.setSelection(isKeyWindow = false);
+                       selectKeyWindowMenu(isKeyWindow = false);
                        logger.info("keyMapList is null");
                        return;
                } else if (keyMapList.isEmpty() == true) {
-                       popupMenu.keyWindowItem.setSelection(isKeyWindow = false);
+                       selectKeyWindowMenu(isKeyWindow = false);
                        logger.info("keyMapList is empty");
                        return;
                }
 
                keyWindow = new KeyWindow(this, shell, communicator, keyMapList);
 
-               popupMenu.keyWindowItem.setSelection(isKeyWindow = true);
+               selectKeyWindowMenu(isKeyWindow = true);
                SkinUtil.setTopMost(keyWindow.getShell(), isOnTop);
 
-               pairTag.setVisible(true);
+               if (pairTag != null) {
+                       pairTag.setVisible(true);
+               }
 
                keyWindow.open(dockValue);
        }
 
        public void hideKeyWindow() {
-               popupMenu.keyWindowItem.setSelection(isKeyWindow = false);
-               pairTag.setVisible(false);
+               selectKeyWindowMenu(isKeyWindow = false);
+
+               if (pairTag != null) {
+                       pairTag.setVisible(false);
+               }
 
                if (keyWindow != null) {
                        keyWindow.getShell().setVisible(false);
@@ -1048,8 +1066,11 @@ public class EmulatorSkin {
        }
 
        public void closeKeyWindow() {
-               popupMenu.keyWindowItem.setSelection(isKeyWindow = false);
-               pairTag.setVisible(false);
+               selectKeyWindowMenu(isKeyWindow = false);
+
+               if (pairTag != null) {
+                       pairTag.setVisible(false);
+               }
 
                if (keyWindow != null) {
                        keyWindow.getShell().close();
@@ -1317,10 +1338,7 @@ public class EmulatorSkin {
                SelectionAdapter listener = new SelectionAdapter() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
-                               final boolean selectKeyWindow =
-                                               popupMenu.keyWindowItem.getSelection();
-
-                               if (selectKeyWindow == true) {
+                               if (isSelectKeyWindowMenu() == true) {
                                        if (keyWindow == null) {
                                                openKeyWindow(recentlyDocked, false);
                                                recentlyDocked = SWT.NONE;
index 930907e..a932632 100644 (file)
@@ -173,7 +173,7 @@ public class GeneralPurposeSkinComposer implements ISkinComposer {
                toggleButton.addMouseListener(new MouseListener() {
                        @Override
                        public void mouseDown(MouseEvent e) {
-                               if (skin.isSelectKeyWindow() == true) {
+                               if (skin.isKeyWindow == true) {
                                        skin.closeKeyWindow();
                                        skin.recentlyDocked = SWT.RIGHT | SWT.CENTER;
                                } else {
index d6198e8..6960f45 100644 (file)
@@ -37,6 +37,8 @@ import org.eclipse.swt.widgets.MenuItem;
 import org.eclipse.swt.widgets.Shell;
 import org.tizen.emulator.skin.EmulatorSkin;
 import org.tizen.emulator.skin.config.EmulatorConfig;
+import org.tizen.emulator.skin.dbi.MenuItemType;
+import org.tizen.emulator.skin.dbi.PopupMenuType;
 import org.tizen.emulator.skin.image.ImageRegistry;
 import org.tizen.emulator.skin.image.ImageRegistry.IconName;
 import org.tizen.emulator.skin.log.SkinLogger;
@@ -90,6 +92,9 @@ public class PopupMenu {
        }
 
        private void addMenuItems(final Menu menu) {
+               PopupMenuType itemProperties = config.getDbiContents().getPopupMenu();
+               String menuName = "";
+
                /* Emulator detail info menu */
                detailInfoItem = new MenuItem(menu, SWT.PUSH);
                String emulatorName = SkinUtil.makeEmulatorName(config);
@@ -112,12 +117,21 @@ public class PopupMenu {
                }
 
                /* Rotate menu */
-               rotateItem = new MenuItem(menu, SWT.CASCADE);
-               rotateItem.setText("&Rotate");
-               rotateItem.setImage(imageRegistry.getIcon(IconName.ROTATE));
+               MenuItemType rotationItem = (itemProperties != null) ?
+                               itemProperties.getRotationItem() : null;
+
+               menuName = (rotationItem != null) ?
+                               rotationItem.getItemName() : "&Rotate";
+
+               if (rotationItem == null ||
+                               (rotationItem != null && rotationItem.isVisible() == true)) {
+                       rotateItem = new MenuItem(menu, SWT.CASCADE);
+                       rotateItem.setText(menuName);
+                       rotateItem.setImage(imageRegistry.getIcon(IconName.ROTATE));
 
-               Menu rotateMenu = skin.createRotateMenu();
-               rotateItem.setMenu(rotateMenu);
+                       Menu rotateMenu = skin.createRotateMenu();
+                       rotateItem.setMenu(rotateMenu);
+               }
 
                /* Scale menu */
                scaleItem = new MenuItem(menu, SWT.CASCADE);
@@ -130,7 +144,14 @@ public class PopupMenu {
                new MenuItem(menu, SWT.SEPARATOR);
 
                /* Key Window menu */
-               if (skin.skinInfo.isPhoneShape() == false) { //TODO:
+               MenuItemType keywindowItem = (itemProperties != null) ?
+                               itemProperties.getKeywindowItem() : null;
+
+               menuName = (keywindowItem != null) ?
+                               keywindowItem.getItemName() : "&Key Window";
+
+               if (keywindowItem == null ||
+                               (keywindowItem != null && keywindowItem.isVisible() == true)) {
                        keyWindowItem = new MenuItem(menu, SWT.CHECK);
                        keyWindowItem.setText("&Key Window");
                        keyWindowItem.setSelection(skin.isKeyWindow);
@@ -144,7 +165,7 @@ public class PopupMenu {
                advancedItem.setText("Ad&vanced");
                advancedItem.setImage(imageRegistry.getIcon(IconName.ADVANCED));
 
-               Menu advancedMenu = new Menu(shell, SWT.DROP_DOWN);
+               Menu advancedMenu = new Menu(menu.getShell(), SWT.DROP_DOWN);
                {
                        /* Screen shot menu */
                        screenshotItem = new MenuItem(advancedMenu, SWT.PUSH);
index 4da68af..0158c82 100644 (file)
@@ -8,6 +8,7 @@ xmlns:dbi="http://www.tizen.org/emulator/skin/dbi" elementFormDefault="qualified
                                <element name="dbi_version" type="float" minOccurs="1" maxOccurs="1"></element>
                                <element name="rotations" type="dbi:rotationsType" minOccurs="1" maxOccurs="1"></element>
                                <element name="hover" type="dbi:hoverType" minOccurs="0" maxOccurs="1"></element>
+                               <element name="popupMenu" type="dbi:popupMenuType" minOccurs="0" maxOccurs="1"></element>
                        </all>
                </complexType>
        </element>
@@ -90,4 +91,15 @@ xmlns:dbi="http://www.tizen.org/emulator/skin/dbi" elementFormDefault="qualified
                <attribute name="B" type="unsignedInt"></attribute>
        </complexType>
 
+       <complexType name="popupMenuType">
+               <sequence>
+                       <element name="rotationItem" type="dbi:menuItemType" minOccurs="0" maxOccurs="1"></element>
+                       <element name="keywindowItem" type="dbi:menuItemType" minOccurs="0" maxOccurs="1"></element>
+               </sequence>
+       </complexType>
+
+       <complexType name="menuItemType">
+               <attribute name="itemName" type="string" default="&amp;Rotate" use="optional"></attribute>
+               <attribute name="visible" type="boolean" default="true" use="optional"></attribute>
+       </complexType>
 </schema>
\ No newline at end of file