DATABIND : Add the shortcut in the databinding view 05/19505/1
authorjaeyeol lee <jaeyeol148.lee@samsung.com>
Mon, 14 Apr 2014 06:58:08 +0000 (15:58 +0900)
committerjaeyeol lee <jaeyeol148.lee@samsung.com>
Mon, 14 Apr 2014 06:58:08 +0000 (15:58 +0900)
Data Source & View model can be deleted using the del key

Change-Id: I6954cca5516d4967de7ad2bab091ec395b61d1d7
Signed-off-by: jaeyeol lee <jaeyeol148.lee@samsung.com>
org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/views/databinding/DataBindingPage.java

index aae6f4b..41f5100 100644 (file)
@@ -1001,6 +1001,14 @@ public class DataBindingPage extends Page implements IBindingDataSetListener {
                        updateDataSourceMenus();
                }
         });
+        
+        dataSourceTree.addKeyListener(new KeyAdapter() {
+            public void keyPressed(KeyEvent event) {
+               if (event.keyCode == SWT.DEL) {
+                       removeDataSource();
+                }
+            }
+        });
 
         // DataBindingDnDManager.addDragAndDropListenerToTree(dataSourceTree);
         DataBindingDnDManager.addDragListenerToDataSourceTree(dataSourceTree);
@@ -1236,9 +1244,10 @@ public class DataBindingPage extends Page implements IBindingDataSetListener {
                             }
                         }
                     });
-
                     // Set the text field into the editor
                     treeEditor.setEditor(text, item);
+                } else if (event.keyCode == SWT.DEL) {
+                       removeViewModel();
                 }
             }
         });