aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorendolf <[email protected]>2007-08-02 20:30:42 +0000
committerendolf <[email protected]>2007-08-02 20:30:42 +0000
commite542735fadc3249c5dfcf5c1576ed1649391d582 (patch)
treeeec6199e8a02974ad1cfcbd9716a8075ba9e08d1
parenteb1b5b0dbb319f96990a4dd91d2b5534c3d09f58 (diff)
Bit of a tidy up
git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@197 e343933a-64c8-49c5-92b1-88f2ce3e89e8
-rw-r--r--plugins/wintab/src/java/net/java/games/input/WinTabButtonComponent.java27
-rw-r--r--plugins/wintab/src/java/net/java/games/input/WinTabComponent.java33
-rw-r--r--plugins/wintab/src/java/net/java/games/input/WinTabContext.java25
-rw-r--r--plugins/wintab/src/java/net/java/games/input/WinTabCursorComponent.java27
-rw-r--r--plugins/wintab/src/java/net/java/games/input/WinTabDevice.java29
-rw-r--r--plugins/wintab/src/java/net/java/games/input/WinTabEnvironmentPlugin.java29
-rw-r--r--plugins/wintab/src/java/net/java/games/input/WinTabPacket.java25
7 files changed, 175 insertions, 20 deletions
diff --git a/plugins/wintab/src/java/net/java/games/input/WinTabButtonComponent.java b/plugins/wintab/src/java/net/java/games/input/WinTabButtonComponent.java
index ff6f425..b2d8bfe 100644
--- a/plugins/wintab/src/java/net/java/games/input/WinTabButtonComponent.java
+++ b/plugins/wintab/src/java/net/java/games/input/WinTabButtonComponent.java
@@ -1,7 +1,30 @@
+/**
+ * Copyright (C) 2006 Jeremy Booth ([email protected])
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer. Redistributions in binary
+ * form must reproduce the above copyright notice, this list of conditions and
+ * the following disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * The name of the author may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ */
package net.java.games.input;
-import net.java.games.input.Component.Identifier;
-
public class WinTabButtonComponent extends WinTabComponent {
private int index;
diff --git a/plugins/wintab/src/java/net/java/games/input/WinTabComponent.java b/plugins/wintab/src/java/net/java/games/input/WinTabComponent.java
index 91ae205..0c2944d 100644
--- a/plugins/wintab/src/java/net/java/games/input/WinTabComponent.java
+++ b/plugins/wintab/src/java/net/java/games/input/WinTabComponent.java
@@ -1,3 +1,28 @@
+/**
+ * Copyright (C) 2006 Jeremy Booth ([email protected])
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer. Redistributions in binary
+ * form must reproduce the above copyright notice, this list of conditions and
+ * the following disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * The name of the author may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ */
package net.java.games.input;
import java.io.IOException;
@@ -6,8 +31,6 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import net.java.games.input.Component.Identifier;
-
public class WinTabComponent extends AbstractComponent {
public final static int XAxis = 1;
@@ -18,28 +41,22 @@ public class WinTabComponent extends AbstractComponent {
public final static int OrientationAxis = 6;
public final static int RotationAxis = 7;
- private int parentDevice;
private int min;
private int max;
- private WinTabContext context;
protected float lastKnownValue;
private boolean analog;
protected WinTabComponent(WinTabContext context, int parentDevice, String name, Identifier id, int min, int max) {
super(name, id);
- this.parentDevice = parentDevice;
this.min = min;
this.max = max;
- this.context = context;
analog = true;
}
protected WinTabComponent(WinTabContext context, int parentDevice, String name, Identifier id) {
super(name, id);
- this.parentDevice = parentDevice;
this.min = 0;
this.max = 1;
- this.context = context;
analog = false;
}
diff --git a/plugins/wintab/src/java/net/java/games/input/WinTabContext.java b/plugins/wintab/src/java/net/java/games/input/WinTabContext.java
index 6bbb95a..c774c0f 100644
--- a/plugins/wintab/src/java/net/java/games/input/WinTabContext.java
+++ b/plugins/wintab/src/java/net/java/games/input/WinTabContext.java
@@ -1,3 +1,28 @@
+/**
+ * Copyright (C) 2006 Jeremy Booth ([email protected])
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer. Redistributions in binary
+ * form must reproduce the above copyright notice, this list of conditions and
+ * the following disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * The name of the author may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ */
package net.java.games.input;
import java.util.ArrayList;
diff --git a/plugins/wintab/src/java/net/java/games/input/WinTabCursorComponent.java b/plugins/wintab/src/java/net/java/games/input/WinTabCursorComponent.java
index 5f65399..f62c11e 100644
--- a/plugins/wintab/src/java/net/java/games/input/WinTabCursorComponent.java
+++ b/plugins/wintab/src/java/net/java/games/input/WinTabCursorComponent.java
@@ -1,7 +1,30 @@
+/**
+ * Copyright (C) 2006 Jeremy Booth ([email protected])
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer. Redistributions in binary
+ * form must reproduce the above copyright notice, this list of conditions and
+ * the following disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * The name of the author may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ */
package net.java.games.input;
-import net.java.games.input.Component.Identifier;
-
public class WinTabCursorComponent extends WinTabComponent {
private int index;
diff --git a/plugins/wintab/src/java/net/java/games/input/WinTabDevice.java b/plugins/wintab/src/java/net/java/games/input/WinTabDevice.java
index 7aa1fb8..819abc7 100644
--- a/plugins/wintab/src/java/net/java/games/input/WinTabDevice.java
+++ b/plugins/wintab/src/java/net/java/games/input/WinTabDevice.java
@@ -1,19 +1,40 @@
+/**
+ * Copyright (C) 2006 Jeremy Booth ([email protected])
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer. Redistributions in binary
+ * form must reproduce the above copyright notice, this list of conditions and
+ * the following disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * The name of the author may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ */
package net.java.games.input;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import net.java.games.input.Component.Identifier;
-
public class WinTabDevice extends AbstractController {
- private int deviceIndex;
private WinTabContext context;
private List eventList = new ArrayList();
private WinTabDevice(WinTabContext context, int index, String name, Component[] components) {
super(name, components, new Controller[0], new Rumbler[0]);
- this.deviceIndex = index;
this.context = context;
}
diff --git a/plugins/wintab/src/java/net/java/games/input/WinTabEnvironmentPlugin.java b/plugins/wintab/src/java/net/java/games/input/WinTabEnvironmentPlugin.java
index 26471f4..76e613d 100644
--- a/plugins/wintab/src/java/net/java/games/input/WinTabEnvironmentPlugin.java
+++ b/plugins/wintab/src/java/net/java/games/input/WinTabEnvironmentPlugin.java
@@ -1,7 +1,31 @@
+/**
+ * Copyright (C) 2006 Jeremy Booth ([email protected])
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer. Redistributions in binary
+ * form must reproduce the above copyright notice, this list of conditions and
+ * the following disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * The name of the author may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ */
package net.java.games.input;
import java.io.File;
-import java.io.IOException;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
@@ -60,7 +84,6 @@ public class WinTabEnvironmentPlugin extends ControllerEnvironment implements Pl
private final Controller[] controllers;
private final List active_devices = new ArrayList();
- private final DummyWindow window;
private final WinTabContext winTabContext;
/** Creates new DirectInputEnvironment */
@@ -83,7 +106,6 @@ public class WinTabEnvironmentPlugin extends ControllerEnvironment implements Pl
logln("Failed to enumerate devices: " + e.getMessage());
e.printStackTrace();
}
- this.window = window;
this.controllers = controllers;
this.winTabContext = winTabContext;
AccessController.doPrivileged(
@@ -96,7 +118,6 @@ public class WinTabEnvironmentPlugin extends ControllerEnvironment implements Pl
} else {
winTabContext = null;
controllers = new Controller[]{};
- window = null;
}
}
diff --git a/plugins/wintab/src/java/net/java/games/input/WinTabPacket.java b/plugins/wintab/src/java/net/java/games/input/WinTabPacket.java
index 28f1fd4..ae6018d 100644
--- a/plugins/wintab/src/java/net/java/games/input/WinTabPacket.java
+++ b/plugins/wintab/src/java/net/java/games/input/WinTabPacket.java
@@ -1,3 +1,28 @@
+/**
+ * Copyright (C) 2006 Jeremy Booth ([email protected])
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer. Redistributions in binary
+ * form must reproduce the above copyright notice, this list of conditions and
+ * the following disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * The name of the author may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ */
package net.java.games.input;
public class WinTabPacket {