From f7454499f0aa59843cf012c583868d4293df6ef0 Mon Sep 17 00:00:00 2001 From: "guilhem.duche" Date: Sun, 25 May 2008 21:16:00 +0000 Subject: [PATCH] wiiuseJ 0.12 work in progress. git-svn-id: http://wiiusej.googlecode.com/svn/trunk@149 ae48ae66-6a45-0410-b38e-211266189506 --- .../utils/GForceWiimoteEventPanel.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 WiiUseJ/src/wiiusej/utils/GForceWiimoteEventPanel.java diff --git a/WiiUseJ/src/wiiusej/utils/GForceWiimoteEventPanel.java b/WiiUseJ/src/wiiusej/utils/GForceWiimoteEventPanel.java new file mode 100644 index 0000000..7b87ee4 --- /dev/null +++ b/WiiUseJ/src/wiiusej/utils/GForceWiimoteEventPanel.java @@ -0,0 +1,36 @@ +/** + * This file is part of WiiuseJ. + * + * WiiuseJ 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 3 of the License, or + * (at your option) any later version. + * + * WiiuseJ 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 WiiuseJ. If not, see . + */ +package wiiusej.utils; + +import wiiusej.values.GForce; +import wiiusej.wiiusejevents.GenericEvent; +import wiiusej.wiiusejevents.physicalevents.MotionSensingEvent; + +/** + * + * @author guiguito + */ +public class GForceWiimoteEventPanel extends GForcePanel { + + @Override + public GForce getGForceValue(GenericEvent e) { + if (e instanceof MotionSensingEvent) { + return ((MotionSensingEvent) e).getGforce(); + } + return null; + } +}