WiiMote + Nunchuk Functions
Button imput
void wiimoteButtonPressed(int wiiNumber, WiiButton button)
void wiimoteButtonReleased(int wiiNumber, WiiButton button)
void nunchukButtonPressed(int nunchukNumber, NunchukButton button)
void nunchukButtonReleased(int nunchukNumber, NunchukButton button)
Sensor input
void wiimoteSensorChanged(int wiiNumber, float pitch, float roll, float yaw, float accel)
void nunchukSensorChanged(int nunchukNumber, float pitch, float roll, float yaw, float accel)
void nunchukJoystickChanged(int nunchukNumber, float x, float y)
Turn WiiMote LEDs on/off
void led(int wiiNumber, boolean led1, boolean led2, boolean led3, boolean led4)
Turn WiiMote vibrator on/off
void vibrate(int wiiNumber, boolean b)
Vibrate for a certain time
void vibrateForMillis(int wiiNumber, int millis)
Space Navigator
Button input
void snButtonPressed(int snNumber, SpaceNavigatorButton button)
Sensor input
void snTranslated(int snNumber, float x, float y, float z)
void snRotated(int snNumber, float x, float y, float z)
public class MouseEvent extends Event { |
static public final int PRESS = 1; |
static public final int RELEASE = 2; |
static public final int CLICK = 3; |
static public final int DRAG = 4; |
static public final int MOVE = 5; |
static public final int ENTER = 6; |
static public final int EXIT = 7; |
So it seems not to be the best solution to use... Any ideas?
Get the platform-native event object. This might be the java.awt event on the desktop, though if you're using OpenGL on the desktop it'll be a NEWT event that JOGL uses. Android events are something else altogether. Bottom line, use this only if you know what you're doing, and don't make assumptions about the class type.
Here is an updated version of the code toxi posted to define din A0, A1, A2, A3, A4 paper formats using iText. Might be helpful for someone.
- import processing.pdf.*;
- import com.lowagie.text.PageSize;
- import com.lowagie.text.Rectangle;
- void setup() {
- // create window @ A3 landscape using OPENGL
- pageSize(com.lowagie.text.PageSize.A3,true,OPENGL);
- // create window @ US Letter size, portrait using default renderer
- //pageSize(com.lowagie.text.PageSize.LETTER,false,JAVA2D);
- }
- /**
- * Convenience method to be used instead of the normal size() command.
- * Creates window matched to a given paper size
- *
- * @param r a predefined constant of the iText PageSize class
- * @param isLandscape true, if you want landscape orientation
- * @param renderer class name of the Processing renderer to use
- */
- void pageSize(com.lowagie.text.Rectangle r, boolean isLandscape, String renderer) {
- if (isLandscape) {
- size((int)r.getHeight(),(int)r.getWidth(),renderer);
- } else {
- size((int)r.getWidth(),(int)r.getHeight(),renderer);
- }
- }
The Trove library provides high speed regular and primitive collections for Java.
The GNU Trove library has two objectives:
- Provide "free" (as in "free speech" and "free beer"), fast, lightweight implementations of the java.util Collections API. These implementations are designed to be pluggable replacements for their JDK equivalents.
- Provide primitive collections with similar APIs to the above. This gap in the JDK is often addressed by using the "wrapper" classes (java.lang.Integer, java.lang.Float, etc.) with Object-based collections. For most applications, however, collections which store primitives directly will require less space and yield significant performance gains.