From 06eef025dcf77445f4eda90bc93851f050bac1b2 Mon Sep 17 00:00:00 2001 From: "sungmin82.ha" Date: Tue, 31 Jan 2012 14:24:55 +0900 Subject: [PATCH] [Title]modified for additional motion support [Type]Enhancement [Module]eventinjector motion [Priority]Major [Jira#] // Jira Issue Number [Redmine#] // Redmine Isuue Number [Problem] // Problem Description [Cause] // Cause Description [Solution] // Solution Description [TestCase] // Executed the test-target (How to) Change-Id: Ic5727e70df1c1cdf4f8be8811e5b1bf4f6186d97 --- .../tizen/sensor/motion/page/MotionPage.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/com.samsung.tizen.sensor.motion/src/com/samsung/tizen/sensor/motion/page/MotionPage.java b/com.samsung.tizen.sensor.motion/src/com/samsung/tizen/sensor/motion/page/MotionPage.java index 9dba0c5..f8f193b 100644 --- a/com.samsung.tizen.sensor.motion/src/com/samsung/tizen/sensor/motion/page/MotionPage.java +++ b/com.samsung.tizen.sensor.motion/src/com/samsung/tizen/sensor/motion/page/MotionPage.java @@ -60,6 +60,8 @@ public class MotionPage extends AbstractInjectorPage implements ISelectionListen Button button_snapXm = formUtil.createButton(mainComposite, "Snap X-", SWT.PUSH); Button button_snapYm = formUtil.createButton(mainComposite, "Snap Y-", SWT.PUSH); Button button_snapZm = formUtil.createButton(mainComposite, "Snap Z-", SWT.PUSH); + Button button_snapLeft = formUtil.createButton(mainComposite, "Snap Left", SWT.PUSH); + Button button_snapRight = formUtil.createButton(mainComposite, "Snap Right", SWT.PUSH); GridData gd = new GridData(GridData.FILL, GridData.FILL, true, false); @@ -72,6 +74,8 @@ public class MotionPage extends AbstractInjectorPage implements ISelectionListen button_snapYm.setLayoutData(gd); button_snapZp.setLayoutData(gd); button_snapZm.setLayoutData(gd); + button_snapLeft.setLayoutData(gd); + button_snapRight.setLayoutData(gd); button_doubleTap.addSelectionListener(new SelectionListener(){ @Override @@ -154,6 +158,24 @@ public class MotionPage extends AbstractInjectorPage implements ISelectionListen sendMessage(9); } }); + button_snapLeft.addSelectionListener(new SelectionListener(){ + @Override + public void widgetDefaultSelected(SelectionEvent e) { + } + @Override + public void widgetSelected(SelectionEvent e) { + sendMessage(10); + } + }); + button_snapRight.addSelectionListener(new SelectionListener(){ + @Override + public void widgetDefaultSelected(SelectionEvent e) { + } + @Override + public void widgetSelected(SelectionEvent e) { + sendMessage(11); + } + }); } @Override -- 2.7.4