menu: added schema for Control Panel menu 54/15054/1
authorGiWoong Kim <giwoong.kim@samsung.com>
Wed, 15 Jan 2014 10:10:13 +0000 (19:10 +0900)
committerGiWoong Kim <giwoong.kim@samsung.com>
Wed, 15 Jan 2014 10:49:02 +0000 (19:49 +0900)
Now, user can configure the Control Panel menu
(Right click popup>Control Panel menu) by skin
layout XML file.

Change-Id: I43977590a281db0338f625d28a5534b8346bd4c0
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/skin/client/jaxb_src/org/tizen/emulator/skin/dbi/PopupMenuType.java
tizen/src/skin/client/skins/mobile-general-3btn/default.dbi
tizen/src/skin/client/src/org/tizen/emulator/skin/menu/PopupMenu.java
tizen/src/skin/client/xsd/ProfileSpecificSkin-layout.xsd

index cd45d17..08f6edd 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.11.20 at 02:29:25 PM KST 
+// Generated on: 2014.01.15 at 07:09:19 PM KST 
 //
 
 
@@ -57,6 +57,7 @@ import javax.xml.bind.annotation.XmlType;
  *         &lt;element name="keywindowItem" type="{http://www.tizen.org/emulator/skin/dbi}menuItemType" minOccurs="0"/>
  *         &lt;element name="hostKeyboardItem" type="{http://www.tizen.org/emulator/skin/dbi}menuItemType" minOccurs="0"/>
  *         &lt;element name="shellItem" type="{http://www.tizen.org/emulator/skin/dbi}menuItemType" minOccurs="0"/>
+ *         &lt;element name="controlPanelItem" type="{http://www.tizen.org/emulator/skin/dbi}menuItemType" minOccurs="0"/>
  *       &lt;/all>
  *     &lt;/restriction>
  *   &lt;/complexContent>
@@ -77,6 +78,7 @@ public class PopupMenuType {
     protected MenuItemType keywindowItem;
     protected MenuItemType hostKeyboardItem;
     protected MenuItemType shellItem;
+    protected MenuItemType controlPanelItem;
 
     /**
      * Gets the value of the topmostItem property.
@@ -222,4 +224,28 @@ public class PopupMenuType {
         this.shellItem = value;
     }
 
+    /**
+     * Gets the value of the controlPanelItem property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MenuItemType }
+     *     
+     */
+    public MenuItemType getControlPanelItem() {
+        return controlPanelItem;
+    }
+
+    /**
+     * Sets the value of the controlPanelItem property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MenuItemType }
+     *     
+     */
+    public void setControlPanelItem(MenuItemType value) {
+        this.controlPanelItem = value;
+    }
+
 }
index 0f0e969..4107402 100644 (file)
@@ -73,6 +73,7 @@
         <keywindowItem visible="true" />
         <hostKeyboardItem visible="true" />
         <shellItem visible="true" />
+        <controlPanelItem visible="true" />
     </popupMenu>
     <option>
         <blankGuide visible="true" />
index cbc8cbe..33b114b 100644 (file)
@@ -257,9 +257,19 @@ public class PopupMenu {
                new MenuItem(menu, SWT.SEPARATOR);
 
                /* Emulator Control Panel menu */
-               createEcpItem(menu, ECP_MENUITEM_NAME);
+               if (itemProperties == null || itemProperties.getControlPanelItem() == null) {
+                       createEcpItem(menu, ECP_MENUITEM_NAME);
+               } else {
+                       MenuItemType ecpMenuType = itemProperties.getControlPanelItem();
+                       if (ecpMenuType.isVisible() == true) {
+                               createEcpItem(menu, (ecpMenuType.getItemName().isEmpty()) ?
+                                               ECP_MENUITEM_NAME : ecpMenuType.getItemName());
+                       }
+               }
 
-               new MenuItem(menu, SWT.SEPARATOR);
+               if (ecpItem != null) {
+                       new MenuItem(menu, SWT.SEPARATOR);
+               }
 
                /* Close menu */
                createCloseItem(menu, CLOSE_MENUITEM_NAME);
index 2b5c8b4..51ac3d4 100644 (file)
@@ -101,6 +101,7 @@ xmlns:dbi="http://www.tizen.org/emulator/skin/dbi" elementFormDefault="qualified
                        <element name="keywindowItem" type="dbi:menuItemType" minOccurs="0" maxOccurs="1"> </element>
                        <element name="hostKeyboardItem" type="dbi:menuItemType" minOccurs="0" maxOccurs="1"> </element>
                        <element name="shellItem" type="dbi:menuItemType" minOccurs="0" maxOccurs="1"> </element>
+                       <element name="controlPanelItem" type="dbi:menuItemType" minOccurs="0" maxOccurs="1"> </element>
                </all>
        </complexType>