Commits

Michael Ludwig committed 9e1b6f8

Update auto-formatting again (I think I have it pretty good this time around...)

Comments (0)

Files changed (210)

ferox-input/src/main/java/com/ferox/input/AWTEventAdapter.java

             throw new NullPointerException("Component cannot be null");
         }
 
-        synchronized(this) {
+        synchronized (this) {
             if (this.component != null) {
                 throw new IllegalStateException("AWTEventAdapter already attached to another Component");
             }
      * the adapter will not convert and dispatch AWT events.
      */
     public void detach() {
-        synchronized(this) {
+        synchronized (this) {
             if (component != null) {
                 component.removeKeyListener(this);
                 component.removeMouseListener(this);
     /* AWT event listener methods */
 
     private KeyCode getKeyCode(java.awt.event.KeyEvent e) {
-        switch(e.getKeyCode()) {
-        case java.awt.event.KeyEvent.VK_ESCAPE: return KeyEvent.KeyCode.ESCAPE;
-        case java.awt.event.KeyEvent.VK_BACK_QUOTE: return KeyEvent.KeyCode.BACK_QUOTE;
-        case java.awt.event.KeyEvent.VK_TAB: return KeyEvent.KeyCode.TAB;
-        case java.awt.event.KeyEvent.VK_OPEN_BRACKET: return KeyEvent.KeyCode.LEFT_BRACKET;
-        case java.awt.event.KeyEvent.VK_CLOSE_BRACKET: return KeyEvent.KeyCode.RIGHT_BRACKET;
-        case java.awt.event.KeyEvent.VK_BACK_SLASH: return KeyEvent.KeyCode.BACK_SLASH;
-        case java.awt.event.KeyEvent.VK_SLASH: return KeyEvent.KeyCode.FORWARD_SLASH;
-        case java.awt.event.KeyEvent.VK_ENTER: return KeyEvent.KeyCode.RETURN;
-        case java.awt.event.KeyEvent.VK_SEMICOLON: return KeyEvent.KeyCode.SEMICOLON;
-        case java.awt.event.KeyEvent.VK_QUOTE: return KeyEvent.KeyCode.QUOTE;
-        case java.awt.event.KeyEvent.VK_COMMA: return KeyEvent.KeyCode.COMMA;
-        case java.awt.event.KeyEvent.VK_PERIOD: return KeyEvent.KeyCode.PERIOD;
-        case java.awt.event.KeyEvent.VK_MINUS: return KeyEvent.KeyCode.MINUS;
-        case java.awt.event.KeyEvent.VK_EQUALS: return KeyEvent.KeyCode.EQUALS;
-        case java.awt.event.KeyEvent.VK_BACK_SPACE: return KeyEvent.KeyCode.BACK_SPACE;
-        case java.awt.event.KeyEvent.VK_DELETE: return KeyEvent.KeyCode.DELETE;
+        switch (e.getKeyCode()) {
+        case java.awt.event.KeyEvent.VK_ESCAPE:
+            return KeyEvent.KeyCode.ESCAPE;
+        case java.awt.event.KeyEvent.VK_BACK_QUOTE:
+            return KeyEvent.KeyCode.BACK_QUOTE;
+        case java.awt.event.KeyEvent.VK_TAB:
+            return KeyEvent.KeyCode.TAB;
+        case java.awt.event.KeyEvent.VK_OPEN_BRACKET:
+            return KeyEvent.KeyCode.LEFT_BRACKET;
+        case java.awt.event.KeyEvent.VK_CLOSE_BRACKET:
+            return KeyEvent.KeyCode.RIGHT_BRACKET;
+        case java.awt.event.KeyEvent.VK_BACK_SLASH:
+            return KeyEvent.KeyCode.BACK_SLASH;
+        case java.awt.event.KeyEvent.VK_SLASH:
+            return KeyEvent.KeyCode.FORWARD_SLASH;
+        case java.awt.event.KeyEvent.VK_ENTER:
+            return KeyEvent.KeyCode.RETURN;
+        case java.awt.event.KeyEvent.VK_SEMICOLON:
+            return KeyEvent.KeyCode.SEMICOLON;
+        case java.awt.event.KeyEvent.VK_QUOTE:
+            return KeyEvent.KeyCode.QUOTE;
+        case java.awt.event.KeyEvent.VK_COMMA:
+            return KeyEvent.KeyCode.COMMA;
+        case java.awt.event.KeyEvent.VK_PERIOD:
+            return KeyEvent.KeyCode.PERIOD;
+        case java.awt.event.KeyEvent.VK_MINUS:
+            return KeyEvent.KeyCode.MINUS;
+        case java.awt.event.KeyEvent.VK_EQUALS:
+            return KeyEvent.KeyCode.EQUALS;
+        case java.awt.event.KeyEvent.VK_BACK_SPACE:
+            return KeyEvent.KeyCode.BACK_SPACE;
+        case java.awt.event.KeyEvent.VK_DELETE:
+            return KeyEvent.KeyCode.DELETE;
 
-        case java.awt.event.KeyEvent.VK_SPACE: return KeyEvent.KeyCode.SPACE;
+        case java.awt.event.KeyEvent.VK_SPACE:
+            return KeyEvent.KeyCode.SPACE;
 
-        case java.awt.event.KeyEvent.VK_PAUSE: return KeyEvent.KeyCode.PAUSE;
-        case java.awt.event.KeyEvent.VK_INSERT: return KeyEvent.KeyCode.INSERT;
+        case java.awt.event.KeyEvent.VK_PAUSE:
+            return KeyEvent.KeyCode.PAUSE;
+        case java.awt.event.KeyEvent.VK_INSERT:
+            return KeyEvent.KeyCode.INSERT;
 
-        case java.awt.event.KeyEvent.VK_HOME: return KeyEvent.KeyCode.HOME;
-        case java.awt.event.KeyEvent.VK_END: return KeyEvent.KeyCode.END;
-        case java.awt.event.KeyEvent.VK_PAGE_UP: return KeyEvent.KeyCode.PAGE_UP;
-        case java.awt.event.KeyEvent.VK_PAGE_DOWN: return KeyEvent.KeyCode.PAGE_DOWN;
+        case java.awt.event.KeyEvent.VK_HOME:
+            return KeyEvent.KeyCode.HOME;
+        case java.awt.event.KeyEvent.VK_END:
+            return KeyEvent.KeyCode.END;
+        case java.awt.event.KeyEvent.VK_PAGE_UP:
+            return KeyEvent.KeyCode.PAGE_UP;
+        case java.awt.event.KeyEvent.VK_PAGE_DOWN:
+            return KeyEvent.KeyCode.PAGE_DOWN;
 
-        case java.awt.event.KeyEvent.VK_UP: return KeyEvent.KeyCode.UP;
-        case java.awt.event.KeyEvent.VK_LEFT: return KeyEvent.KeyCode.LEFT;
-        case java.awt.event.KeyEvent.VK_RIGHT: return KeyEvent.KeyCode.RIGHT;
-        case java.awt.event.KeyEvent.VK_DOWN: return KeyEvent.KeyCode.DOWN;
+        case java.awt.event.KeyEvent.VK_UP:
+            return KeyEvent.KeyCode.UP;
+        case java.awt.event.KeyEvent.VK_LEFT:
+            return KeyEvent.KeyCode.LEFT;
+        case java.awt.event.KeyEvent.VK_RIGHT:
+            return KeyEvent.KeyCode.RIGHT;
+        case java.awt.event.KeyEvent.VK_DOWN:
+            return KeyEvent.KeyCode.DOWN;
 
-        case java.awt.event.KeyEvent.VK_F1: return KeyEvent.KeyCode.F1;
-        case java.awt.event.KeyEvent.VK_F2: return KeyEvent.KeyCode.F2;
-        case java.awt.event.KeyEvent.VK_F3: return KeyEvent.KeyCode.F3;
-        case java.awt.event.KeyEvent.VK_F4: return KeyEvent.KeyCode.F4;
-        case java.awt.event.KeyEvent.VK_F5: return KeyEvent.KeyCode.F5;
-        case java.awt.event.KeyEvent.VK_F6: return KeyEvent.KeyCode.F6;
-        case java.awt.event.KeyEvent.VK_F7: return KeyEvent.KeyCode.F7;
-        case java.awt.event.KeyEvent.VK_F8: return KeyEvent.KeyCode.F8;
-        case java.awt.event.KeyEvent.VK_F9: return KeyEvent.KeyCode.F9;
-        case java.awt.event.KeyEvent.VK_F10: return KeyEvent.KeyCode.F10;
-        case java.awt.event.KeyEvent.VK_F11: return KeyEvent.KeyCode.F11;
-        case java.awt.event.KeyEvent.VK_F12: return KeyEvent.KeyCode.F12;
+        case java.awt.event.KeyEvent.VK_F1:
+            return KeyEvent.KeyCode.F1;
+        case java.awt.event.KeyEvent.VK_F2:
+            return KeyEvent.KeyCode.F2;
+        case java.awt.event.KeyEvent.VK_F3:
+            return KeyEvent.KeyCode.F3;
+        case java.awt.event.KeyEvent.VK_F4:
+            return KeyEvent.KeyCode.F4;
+        case java.awt.event.KeyEvent.VK_F5:
+            return KeyEvent.KeyCode.F5;
+        case java.awt.event.KeyEvent.VK_F6:
+            return KeyEvent.KeyCode.F6;
+        case java.awt.event.KeyEvent.VK_F7:
+            return KeyEvent.KeyCode.F7;
+        case java.awt.event.KeyEvent.VK_F8:
+            return KeyEvent.KeyCode.F8;
+        case java.awt.event.KeyEvent.VK_F9:
+            return KeyEvent.KeyCode.F9;
+        case java.awt.event.KeyEvent.VK_F10:
+            return KeyEvent.KeyCode.F10;
+        case java.awt.event.KeyEvent.VK_F11:
+            return KeyEvent.KeyCode.F11;
+        case java.awt.event.KeyEvent.VK_F12:
+            return KeyEvent.KeyCode.F12;
 
-        case java.awt.event.KeyEvent.VK_1: return KeyEvent.KeyCode.N1;
-        case java.awt.event.KeyEvent.VK_2: return KeyEvent.KeyCode.N2;
-        case java.awt.event.KeyEvent.VK_3: return KeyEvent.KeyCode.N3;
-        case java.awt.event.KeyEvent.VK_4: return KeyEvent.KeyCode.N4;
-        case java.awt.event.KeyEvent.VK_5: return KeyEvent.KeyCode.N5;
-        case java.awt.event.KeyEvent.VK_6: return KeyEvent.KeyCode.N6;
-        case java.awt.event.KeyEvent.VK_7: return KeyEvent.KeyCode.N7;
-        case java.awt.event.KeyEvent.VK_8: return KeyEvent.KeyCode.N8;
-        case java.awt.event.KeyEvent.VK_9: return KeyEvent.KeyCode.N9;
-        case java.awt.event.KeyEvent.VK_0: return KeyEvent.KeyCode.N0;
+        case java.awt.event.KeyEvent.VK_1:
+            return KeyEvent.KeyCode.N1;
+        case java.awt.event.KeyEvent.VK_2:
+            return KeyEvent.KeyCode.N2;
+        case java.awt.event.KeyEvent.VK_3:
+            return KeyEvent.KeyCode.N3;
+        case java.awt.event.KeyEvent.VK_4:
+            return KeyEvent.KeyCode.N4;
+        case java.awt.event.KeyEvent.VK_5:
+            return KeyEvent.KeyCode.N5;
+        case java.awt.event.KeyEvent.VK_6:
+            return KeyEvent.KeyCode.N6;
+        case java.awt.event.KeyEvent.VK_7:
+            return KeyEvent.KeyCode.N7;
+        case java.awt.event.KeyEvent.VK_8:
+            return KeyEvent.KeyCode.N8;
+        case java.awt.event.KeyEvent.VK_9:
+            return KeyEvent.KeyCode.N9;
+        case java.awt.event.KeyEvent.VK_0:
+            return KeyEvent.KeyCode.N0;
 
-        case java.awt.event.KeyEvent.VK_A: return KeyEvent.KeyCode.A;
-        case java.awt.event.KeyEvent.VK_B: return KeyEvent.KeyCode.B;
-        case java.awt.event.KeyEvent.VK_C: return KeyEvent.KeyCode.C;
-        case java.awt.event.KeyEvent.VK_D: return KeyEvent.KeyCode.D;
-        case java.awt.event.KeyEvent.VK_E: return KeyEvent.KeyCode.E;
-        case java.awt.event.KeyEvent.VK_F: return KeyEvent.KeyCode.F;
-        case java.awt.event.KeyEvent.VK_G: return KeyEvent.KeyCode.G;
-        case java.awt.event.KeyEvent.VK_H: return KeyEvent.KeyCode.H;
-        case java.awt.event.KeyEvent.VK_I: return KeyEvent.KeyCode.I;
-        case java.awt.event.KeyEvent.VK_J: return KeyEvent.KeyCode.J;
-        case java.awt.event.KeyEvent.VK_K: return KeyEvent.KeyCode.K;
-        case java.awt.event.KeyEvent.VK_L: return KeyEvent.KeyCode.L;
-        case java.awt.event.KeyEvent.VK_M: return KeyEvent.KeyCode.M;
-        case java.awt.event.KeyEvent.VK_N: return KeyEvent.KeyCode.N;
-        case java.awt.event.KeyEvent.VK_O: return KeyEvent.KeyCode.O;
-        case java.awt.event.KeyEvent.VK_P: return KeyEvent.KeyCode.P;
-        case java.awt.event.KeyEvent.VK_Q: return KeyEvent.KeyCode.Q;
-        case java.awt.event.KeyEvent.VK_R: return KeyEvent.KeyCode.R;
-        case java.awt.event.KeyEvent.VK_S: return KeyEvent.KeyCode.S;
-        case java.awt.event.KeyEvent.VK_T: return KeyEvent.KeyCode.T;
-        case java.awt.event.KeyEvent.VK_U: return KeyEvent.KeyCode.U;
-        case java.awt.event.KeyEvent.VK_V: return KeyEvent.KeyCode.V;
-        case java.awt.event.KeyEvent.VK_W: return KeyEvent.KeyCode.W;
-        case java.awt.event.KeyEvent.VK_X: return KeyEvent.KeyCode.X;
-        case java.awt.event.KeyEvent.VK_Y: return KeyEvent.KeyCode.Y;
-        case java.awt.event.KeyEvent.VK_Z: return KeyEvent.KeyCode.Z;
+        case java.awt.event.KeyEvent.VK_A:
+            return KeyEvent.KeyCode.A;
+        case java.awt.event.KeyEvent.VK_B:
+            return KeyEvent.KeyCode.B;
+        case java.awt.event.KeyEvent.VK_C:
+            return KeyEvent.KeyCode.C;
+        case java.awt.event.KeyEvent.VK_D:
+            return KeyEvent.KeyCode.D;
+        case java.awt.event.KeyEvent.VK_E:
+            return KeyEvent.KeyCode.E;
+        case java.awt.event.KeyEvent.VK_F:
+            return KeyEvent.KeyCode.F;
+        case java.awt.event.KeyEvent.VK_G:
+            return KeyEvent.KeyCode.G;
+        case java.awt.event.KeyEvent.VK_H:
+            return KeyEvent.KeyCode.H;
+        case java.awt.event.KeyEvent.VK_I:
+            return KeyEvent.KeyCode.I;
+        case java.awt.event.KeyEvent.VK_J:
+            return KeyEvent.KeyCode.J;
+        case java.awt.event.KeyEvent.VK_K:
+            return KeyEvent.KeyCode.K;
+        case java.awt.event.KeyEvent.VK_L:
+            return KeyEvent.KeyCode.L;
+        case java.awt.event.KeyEvent.VK_M:
+            return KeyEvent.KeyCode.M;
+        case java.awt.event.KeyEvent.VK_N:
+            return KeyEvent.KeyCode.N;
+        case java.awt.event.KeyEvent.VK_O:
+            return KeyEvent.KeyCode.O;
+        case java.awt.event.KeyEvent.VK_P:
+            return KeyEvent.KeyCode.P;
+        case java.awt.event.KeyEvent.VK_Q:
+            return KeyEvent.KeyCode.Q;
+        case java.awt.event.KeyEvent.VK_R:
+            return KeyEvent.KeyCode.R;
+        case java.awt.event.KeyEvent.VK_S:
+            return KeyEvent.KeyCode.S;
+        case java.awt.event.KeyEvent.VK_T:
+            return KeyEvent.KeyCode.T;
+        case java.awt.event.KeyEvent.VK_U:
+            return KeyEvent.KeyCode.U;
+        case java.awt.event.KeyEvent.VK_V:
+            return KeyEvent.KeyCode.V;
+        case java.awt.event.KeyEvent.VK_W:
+            return KeyEvent.KeyCode.W;
+        case java.awt.event.KeyEvent.VK_X:
+            return KeyEvent.KeyCode.X;
+        case java.awt.event.KeyEvent.VK_Y:
+            return KeyEvent.KeyCode.Y;
+        case java.awt.event.KeyEvent.VK_Z:
+            return KeyEvent.KeyCode.Z;
 
-        case java.awt.event.KeyEvent.VK_NUM_LOCK: return KeyEvent.KeyCode.NUM_LOCK;
-        case java.awt.event.KeyEvent.VK_SCROLL_LOCK: return KeyEvent.KeyCode.SCROLL_LOCK;
-        case java.awt.event.KeyEvent.VK_CAPS_LOCK: return KeyEvent.KeyCode.CAPS_LOCK;
+        case java.awt.event.KeyEvent.VK_NUM_LOCK:
+            return KeyEvent.KeyCode.NUM_LOCK;
+        case java.awt.event.KeyEvent.VK_SCROLL_LOCK:
+            return KeyEvent.KeyCode.SCROLL_LOCK;
+        case java.awt.event.KeyEvent.VK_CAPS_LOCK:
+            return KeyEvent.KeyCode.CAPS_LOCK;
 
-        case java.awt.event.KeyEvent.VK_NUMPAD1: return KeyEvent.KeyCode.NUMPAD_1;
-        case java.awt.event.KeyEvent.VK_NUMPAD2: return KeyEvent.KeyCode.NUMPAD_2;
-        case java.awt.event.KeyEvent.VK_NUMPAD3: return KeyEvent.KeyCode.NUMPAD_3;
-        case java.awt.event.KeyEvent.VK_NUMPAD4: return KeyEvent.KeyCode.NUMPAD_4;
-        case java.awt.event.KeyEvent.VK_NUMPAD5: return KeyEvent.KeyCode.NUMPAD_5;
-        case java.awt.event.KeyEvent.VK_NUMPAD6: return KeyEvent.KeyCode.NUMPAD_6;
-        case java.awt.event.KeyEvent.VK_NUMPAD7: return KeyEvent.KeyCode.NUMPAD_7;
-        case java.awt.event.KeyEvent.VK_NUMPAD8: return KeyEvent.KeyCode.NUMPAD_8;
-        case java.awt.event.KeyEvent.VK_NUMPAD9: return KeyEvent.KeyCode.NUMPAD_9;
-        case java.awt.event.KeyEvent.VK_NUMPAD0: return KeyEvent.KeyCode.NUMPAD_0;
-        case java.awt.event.KeyEvent.VK_ADD: return KeyEvent.KeyCode.NUMPAD_ADD;
-        case java.awt.event.KeyEvent.VK_SUBTRACT: return KeyEvent.KeyCode.NUMPAD_SUBTRACT;
-        case java.awt.event.KeyEvent.VK_DECIMAL: return KeyEvent.KeyCode.NUMPAD_DECIMAL;
-        case java.awt.event.KeyEvent.VK_DIVIDE: return KeyEvent.KeyCode.NUMPAD_DIVIDE;
-        case java.awt.event.KeyEvent.VK_MULTIPLY: return KeyEvent.KeyCode.NUMPAD_MULTIPLY;
+        case java.awt.event.KeyEvent.VK_NUMPAD1:
+            return KeyEvent.KeyCode.NUMPAD_1;
+        case java.awt.event.KeyEvent.VK_NUMPAD2:
+            return KeyEvent.KeyCode.NUMPAD_2;
+        case java.awt.event.KeyEvent.VK_NUMPAD3:
+            return KeyEvent.KeyCode.NUMPAD_3;
+        case java.awt.event.KeyEvent.VK_NUMPAD4:
+            return KeyEvent.KeyCode.NUMPAD_4;
+        case java.awt.event.KeyEvent.VK_NUMPAD5:
+            return KeyEvent.KeyCode.NUMPAD_5;
+        case java.awt.event.KeyEvent.VK_NUMPAD6:
+            return KeyEvent.KeyCode.NUMPAD_6;
+        case java.awt.event.KeyEvent.VK_NUMPAD7:
+            return KeyEvent.KeyCode.NUMPAD_7;
+        case java.awt.event.KeyEvent.VK_NUMPAD8:
+            return KeyEvent.KeyCode.NUMPAD_8;
+        case java.awt.event.KeyEvent.VK_NUMPAD9:
+            return KeyEvent.KeyCode.NUMPAD_9;
+        case java.awt.event.KeyEvent.VK_NUMPAD0:
+            return KeyEvent.KeyCode.NUMPAD_0;
+        case java.awt.event.KeyEvent.VK_ADD:
+            return KeyEvent.KeyCode.NUMPAD_ADD;
+        case java.awt.event.KeyEvent.VK_SUBTRACT:
+            return KeyEvent.KeyCode.NUMPAD_SUBTRACT;
+        case java.awt.event.KeyEvent.VK_DECIMAL:
+            return KeyEvent.KeyCode.NUMPAD_DECIMAL;
+        case java.awt.event.KeyEvent.VK_DIVIDE:
+            return KeyEvent.KeyCode.NUMPAD_DIVIDE;
+        case java.awt.event.KeyEvent.VK_MULTIPLY:
+            return KeyEvent.KeyCode.NUMPAD_MULTIPLY;
 
         case java.awt.event.KeyEvent.VK_ALT:
             if (e.getKeyLocation() == java.awt.event.KeyEvent.KEY_LOCATION_RIGHT) {
     }
 
     private MouseButton getButton(java.awt.event.MouseEvent e) {
-        switch(e.getButton()) {
+        switch (e.getButton()) {
         case java.awt.event.MouseEvent.NOBUTTON:
             return MouseEvent.MouseButton.NONE;
         case java.awt.event.MouseEvent.BUTTON1:
 
     @Override
     public void keyPressed(java.awt.event.KeyEvent e) {
-        KeyEvent event = new KeyEvent(KeyEvent.Type.PRESS, dispatcher.getSource(),
-                                      getKeyCode(e), getCharacter(e));
+        KeyEvent event = new KeyEvent(KeyEvent.Type.PRESS,
+                                      dispatcher.getSource(),
+                                      getKeyCode(e),
+                                      getCharacter(e));
         dispatcher.dispatchEvent(event);
     }
 
     @Override
     public void keyReleased(java.awt.event.KeyEvent e) {
-        KeyEvent event = new KeyEvent(KeyEvent.Type.RELEASE, dispatcher.getSource(),
-                                      getKeyCode(e), getCharacter(e));
+        KeyEvent event = new KeyEvent(KeyEvent.Type.RELEASE,
+                                      dispatcher.getSource(),
+                                      getKeyCode(e),
+                                      getCharacter(e));
         dispatcher.dispatchEvent(event);
     }
 
 
     @Override
     public void mousePressed(java.awt.event.MouseEvent e) {
-        MouseEvent event = new MouseEvent(MouseEvent.Type.PRESS, dispatcher.getSource(),
-                                          e.getX(), getY(e), 0, getButton(e));
+        MouseEvent event = new MouseEvent(MouseEvent.Type.PRESS,
+                                          dispatcher.getSource(),
+                                          e.getX(),
+                                          getY(e),
+                                          0,
+                                          getButton(e));
         dispatcher.dispatchEvent(event);
     }
 
     @Override
     public void mouseReleased(java.awt.event.MouseEvent e) {
-        MouseEvent event = new MouseEvent(MouseEvent.Type.RELEASE, dispatcher.getSource(),
-                                          e.getX(), getY(e), 0, getButton(e));
+        MouseEvent event = new MouseEvent(MouseEvent.Type.RELEASE,
+                                          dispatcher.getSource(),
+                                          e.getX(),
+                                          getY(e),
+                                          0,
+                                          getButton(e));
         dispatcher.dispatchEvent(event);
     }
 
 
     @Override
     public void mouseMoved(java.awt.event.MouseEvent e) {
-        MouseEvent event = new MouseEvent(MouseEvent.Type.MOVE, dispatcher.getSource(),
-                                          e.getX(), getY(e), 0, MouseButton.NONE);
+        MouseEvent event = new MouseEvent(MouseEvent.Type.MOVE,
+                                          dispatcher.getSource(),
+                                          e.getX(),
+                                          getY(e),
+                                          0,
+                                          MouseButton.NONE);
         dispatcher.dispatchEvent(event);
     }
 
     @Override
     public void mouseWheelMoved(MouseWheelEvent e) {
-        MouseEvent event = new MouseEvent(MouseEvent.Type.SCROLL, dispatcher.getSource(),
-                                          e.getX(), getY(e), e.getWheelRotation(), MouseButton.NONE);
+        MouseEvent event = new MouseEvent(MouseEvent.Type.SCROLL,
+                                          dispatcher.getSource(),
+                                          e.getX(),
+                                          getY(e),
+                                          e.getWheelRotation(),
+                                          MouseButton.NONE);
         dispatcher.dispatchEvent(event);
     }
 }

ferox-input/src/main/java/com/ferox/input/EventListener.java

  * 
  * @author Michael Ludwig
  */
-public interface EventListener {
-}
+public interface EventListener {}

ferox-input/src/main/java/com/ferox/input/EventSource.java

  * 
  * @author Michael Ludwig
  */
-public interface EventSource { }
+public interface EventSource {}

ferox-input/src/main/java/com/ferox/input/KeyEvent.java

     public static enum KeyCode {
         UNKNOWN("Unknown"),
 
-        ESCAPE("Esc"),
-        BACK_QUOTE("`"),
-        TAB("Tab"),
-        LEFT_BRACKET("["),
-        RIGHT_BRACKET("]"),
-        BACK_SLASH("\\"),
-        FORWARD_SLASH("/"),
-        RETURN("Return"),
-        SEMICOLON(";"),
-        QUOTE("'"),
-        COMMA(","),
-        PERIOD("."),
-        MINUS("-"),
-        EQUALS("="),
-        BACK_SPACE("Back Space"),
-        DELETE("Delete"),
-        SPACE("Space"),
-        INSERT("Insert"),
-        PAUSE("Pause"),
-        HOME("Home"),
-        END("End"),
-        PAGE_UP("Page Up"),
+        ESCAPE("Esc"), BACK_QUOTE("`"), TAB("Tab"), LEFT_BRACKET("["),
+        RIGHT_BRACKET("]"), BACK_SLASH("\\"), FORWARD_SLASH("/"), RETURN("Return"),
+        SEMICOLON(";"), QUOTE("'"), COMMA(","), PERIOD("."), MINUS("-"), EQUALS("="),
+        BACK_SPACE("Back Space"), DELETE("Delete"), SPACE("Space"), INSERT("Insert"),
+        PAUSE("Pause"), HOME("Home"), END("End"), PAGE_UP("Page Up"),
         PAGE_DOWN("Page Down"),
 
         UP("Up"), LEFT("Left"), RIGHT("Right"), DOWN("Down"),
 
-        F1("F1"), F2("F2"), F3("F3"), F4("F4"), F5("F5"), F6("F6"), F7("F7"), F8("F8"), F9("F9"), F10("F10"), F11("F11"), F12("F12"),
+        F1("F1"), F2("F2"), F3("F3"), F4("F4"), F5("F5"), F6("F6"), F7("F7"), F8("F8"),
+        F9("F9"), F10("F10"), F11("F11"), F12("F12"),
 
-        N1("1"), N2("2"), N3("3"), N4("4"), N5("5"), N6("6"), N7("7"), N8("8"), N9("9"), N0("0"),
+        N1("1"), N2("2"), N3("3"), N4("4"), N5("5"), N6("6"), N7("7"), N8("8"), N9("9"),
+        N0("0"),
 
-        A("a"), B("b"), C("c"), D("d"), E("e"), F("f"), G("g"), H("h"), I("i"), J("j"), K("k"), L("l"), M("m"),
-        N("n"), O("o"), P("p"), Q("q"), R("r"), S("s"), T("t"), U("u"), V("v"), W("w"), X("x"), Y("y"), Z("z"),
+        A("a"), B("b"), C("c"), D("d"), E("e"), F("f"), G("g"), H("h"), I("i"), J("j"),
+        K("k"), L("l"), M("m"), N("n"), O("o"), P("p"), Q("q"), R("r"), S("s"), T("t"),
+        U("u"), V("v"), W("w"), X("x"), Y("y"), Z("z"),
 
         NUM_LOCK("Num Lock"), SCROLL_LOCK("Scroll Lock"), CAPS_LOCK("Caps Lock"),
 
-        NUMPAD_0("Numpad 0"), NUMPAD_1("Numpad 1"), NUMPAD_2("Numpad 2"), NUMPAD_3("Numpad 3"), NUMPAD_4("Numpad 4"),
-        NUMPAD_5("Numpad 5"), NUMPAD_6("Numpad 6"), NUMPAD_7("Numpad 7"), NUMPAD_8("Numpad 8"), NUMPAD_9("Numpad 9"),
-        NUMPAD_ADD("Numpad +"), NUMPAD_SUBTRACT("Numpad -"), NUMPAD_DECIMAL("Numpad ."), NUMPAD_DIVIDE("Numpad /"), NUMPAD_MULTIPLY("NUMPAD *"),
+        NUMPAD_0("Numpad 0"), NUMPAD_1("Numpad 1"), NUMPAD_2("Numpad 2"),
+        NUMPAD_3("Numpad 3"), NUMPAD_4("Numpad 4"), NUMPAD_5("Numpad 5"),
+        NUMPAD_6("Numpad 6"), NUMPAD_7("Numpad 7"), NUMPAD_8("Numpad 8"),
+        NUMPAD_9("Numpad 9"), NUMPAD_ADD("Numpad +"), NUMPAD_SUBTRACT("Numpad -"),
+        NUMPAD_DECIMAL("Numpad ."), NUMPAD_DIVIDE("Numpad /"),
+        NUMPAD_MULTIPLY("NUMPAD *"),
 
-        RIGHT_ALT("Right Alt"), LEFT_ALT("Left Alt"),
-        RIGHT_CONTROL("Right Control"), LEFT_CONTROL("Left Control"),
-        RIGHT_SHIFT("Right Shift"), LEFT_SHIFT("Left Shift"),
-        RIGHT_META("Right Meta"), LEFT_META("Left Meta");
+        RIGHT_ALT("Right Alt"), LEFT_ALT("Left Alt"), RIGHT_CONTROL("Right Control"),
+        LEFT_CONTROL("Left Control"), RIGHT_SHIFT("Right Shift"),
+        LEFT_SHIFT("Left Shift"), RIGHT_META("Right Meta"), LEFT_META("Left Meta");
 
         private final String descr;
-        private KeyCode(String descr) { this.descr = descr; }
 
-        public String getDescription() { return descr; }
+        private KeyCode(String descr) {
+            this.descr = descr;
+        }
+
+        public String getDescription() {
+            return descr;
+        }
     }
 
     private final KeyCode keyCode;

ferox-input/src/main/java/com/ferox/input/KeyEventSource.java

  */
 public interface KeyEventSource extends EventSource {
     /**
-     * Register the given KeyListener with this KeyEventSource. Nothing is
-     * done if the given listener has already been added.
+     * Register the given KeyListener with this KeyEventSource. Nothing is done
+     * if the given listener has already been added.
      * 
      * @param listener The listener to add
      * @throws NullPointerException if listener is null
     public void addKeyListener(KeyListener listener);
 
     /**
-     * Remove the given KeyListener from this KeyEventSource. Nothing is
-     * done if the given listener has never been added, or was already removed.
+     * Remove the given KeyListener from this KeyEventSource. Nothing is done if
+     * the given listener has never been added, or was already removed.
      * 
      * @param listener The listener to remove
      * @throws NullPointerException if listener is null

ferox-input/src/main/java/com/ferox/input/MouseEvent.java

      * @throws IllegalArgumentException if type, scrollDelta and button are
      *             incompatible
      */
-    public MouseEvent(Type type, MouseEventSource source, int x, int y, int scrollDelta, MouseButton button) {
+    public MouseEvent(Type type, MouseEventSource source, int x, int y, int scrollDelta,
+                      MouseButton button) {
         if (source == null) {
             throw new NullPointerException("Event source cannot be null");
         }

ferox-input/src/main/java/com/ferox/input/MouseKeyEventDispatcher.java

             } else {
                 throw new UnsupportedOperationException("Unsupported type of event: " + e.getClass());
             }
-        } catch(RejectedExecutionException ree) {
+        } catch (RejectedExecutionException ree) {
             // ignore
         }
     }
 
         @Override
         public void run() {
-            for (KeyListener l: keyListeners) {
+            for (KeyListener l : keyListeners) {
                 l.handleEvent(e);
             }
         }
 
         @Override
         public void run() {
-            for (MouseListener l: mouseListeners) {
+            for (MouseListener l : mouseListeners) {
                 l.handleEvent(e);
             }
         }

ferox-input/src/main/java/com/ferox/input/logic/InputManager.java

             throw new NullPointerException("Source cannot be null");
         }
 
-        synchronized(this) {
+        synchronized (this) {
             if (this.source != null) {
                 throw new IllegalStateException("InputManager already attached to another event source");
             }
      * {@link #process()} will no longer work.
      */
     public void detach() {
-        synchronized(this) {
+        synchronized (this) {
             if (source != null) {
                 source.removeKeyListener(listener);
                 source.removeMouseListener(listener);
             throw new NullPointerException("Action cannot be null");
         }
 
-        synchronized(listener) {
+        synchronized (listener) {
             Iterator<PredicatedAction> it = triggers.iterator();
-            while(it.hasNext()) {
+            while (it.hasNext()) {
                 // remove all occurrences of the action
                 if (it.next().trigger == trigger) {
                     it.remove();
      * associated predicate. This will run the actions on the calling thread.
      */
     public void process() {
-        synchronized(listener) {
+        synchronized (listener) {
             InputState prev = lastProcessedState;
-            for (InputState next: stateQueue) {
+            for (InputState next : stateQueue) {
                 processTriggers(prev, next);
                 prev = next;
             }
     private class InternalListener implements KeyListener, MouseListener {
         @Override
         public void handleEvent(KeyEvent event) {
-            synchronized(this) {
+            synchronized (this) {
                 advanceState(new InputState(lastState, event));
             }
         }
 
         @Override
         public void handleEvent(MouseEvent event) {
-            synchronized(this) {
+            synchronized (this) {
                 advanceState(new InputState(lastState, event));
             }
         }
                 throw new NullPointerException("Action cannot be null");
             }
 
-            synchronized(listener) {
+            synchronized (listener) {
                 triggers.add(new PredicatedAction(action, condition));
             }
         }

ferox-input/src/main/java/com/ferox/input/logic/KeyTypedPredicate.java

 
     @Override
     public boolean apply(InputState prev, InputState next) {
-        if (!prev.getKeyboardState().isKeyDown(code) && next.getKeyboardState().isKeyDown(code)) {
+        if (!prev.getKeyboardState().isKeyDown(code) && next.getKeyboardState()
+                                                            .isKeyDown(code)) {
             // record time of first press
             startTime = next.getTimestamp();
             return false;
-        } else if (prev.getKeyboardState().isKeyDown(code) && !next.getKeyboardState().isKeyDown(code)) {
+        } else if (prev.getKeyboardState().isKeyDown(code) && !next.getKeyboardState()
+                                                                   .isKeyDown(code)) {
             // key is released, see if it was fast enough
             long start = startTime;
             startTime = -1;

ferox-input/src/main/java/com/ferox/input/logic/MouseClickedPredicate.java

 
     @Override
     public boolean apply(InputState prev, InputState next) {
-        if (!prev.getMouseState().isButtonDown(button) && next.getMouseState().isButtonDown(button)) {
+        if (!prev.getMouseState().isButtonDown(button) && next.getMouseState()
+                                                              .isButtonDown(button)) {
             // record time of first press
             if (currentClickCount == 0) {
                 startTime = next.getTimestamp();
             // increase the number of 'clicks', which for our purposes is tracked on mouse down
             currentClickCount++;
             return false;
-        } else if (prev.getMouseState().isButtonDown(button) && !next.getMouseState().isButtonDown(button)) {
+        } else if (prev.getMouseState().isButtonDown(button) && !next.getMouseState()
+                                                                     .isButtonDown(button)) {
             // button was released, see if we reached our click goal and were fast enough
             if (currentClickCount == numClicks) {
                 long start = startTime;

ferox-input/src/main/java/com/ferox/input/logic/Predicates.java

  * @author Michael Ludwig
  */
 public final class Predicates {
-    private Predicates() { }
+    private Predicates() {}
 
     /**
      * Return a Predicate that evaluates to true when the key code transitions
         return new Predicate() {
             @Override
             public boolean apply(InputState prev, InputState next) {
-                return !prev.getKeyboardState().isKeyDown(code) && next.getKeyboardState().isKeyDown(code);
+                return !prev.getKeyboardState().isKeyDown(code) && next.getKeyboardState()
+                                                                       .isKeyDown(code);
             }
         };
     }
         return new Predicate() {
             @Override
             public boolean apply(InputState prev, InputState next) {
-                return prev.getKeyboardState().isKeyDown(code) && !next.getKeyboardState().isKeyDown(code);
+                return prev.getKeyboardState().isKeyDown(code) && !next.getKeyboardState()
+                                                                       .isKeyDown(code);
             }
         };
     }
         return new Predicate() {
             @Override
             public boolean apply(InputState prev, InputState next) {
-                return !prev.getMouseState().isButtonDown(button) && next.getMouseState().isButtonDown(button);
+                return !prev.getMouseState().isButtonDown(button) && next.getMouseState()
+                                                                         .isButtonDown(button);
             }
         };
     }
 
     /**
-     * Return a Predicate that evaluates to true when the mouse button transitions
-     * from the down to up position. When the NONE button is used, it
-     * evaluates to true when any button is pressed and there were no other
+     * Return a Predicate that evaluates to true when the mouse button
+     * transitions from the down to up position. When the NONE button is used,
+     * it evaluates to true when any button is pressed and there were no other
      * buttons pressed before that.
      * 
      * @param button The button that is released
         return new Predicate() {
             @Override
             public boolean apply(InputState prev, InputState next) {
-                return prev.getMouseState().isButtonDown(button) && !next.getMouseState().isButtonDown(button);
+                return prev.getMouseState().isButtonDown(button) && !next.getMouseState()
+                                                                         .isButtonDown(button);
             }
         };
     }
 
     /**
      * Return a Predicate that evaluates to true when the mouse button is
-     * pressed and released twice in under 150 milliseconds
-     * (i.e. a double-click). This will not evaluate to true until the button
-     * is released. If the release occurs too slowly, it will not trigger.
+     * pressed and released twice in under 150 milliseconds (i.e. a
+     * double-click). This will not evaluate to true until the button is
+     * released. If the release occurs too slowly, it will not trigger.
      * 
      * @param button The button that is clicked
      * @return A Predicate for matching double-clicking
         return new Predicate() {
             @Override
             public boolean apply(InputState prev, InputState next) {
-                return next.getMouseState().getScrollCount() < next.getMouseState().getScrollCount();
+                return next.getMouseState().getScrollCount() < next.getMouseState()
+                                                                   .getScrollCount();
             }
         };
     }
         return new Predicate() {
             @Override
             public boolean apply(InputState prev, InputState next) {
-                return next.getMouseState().getScrollCount() > next.getMouseState().getScrollCount();
+                return next.getMouseState().getScrollCount() > next.getMouseState()
+                                                                   .getScrollCount();
             }
         };
     }

ferox-math/src/main/java/com/ferox/math/AxisAlignedBox.java

      * Create a new AxisAlignedBox that has its minimum and maximum at the
      * origin.
      */
-    public AxisAlignedBox() { }
+    public AxisAlignedBox() {}
 
     /**
      * Create a new AxisAlignedBox that uses the given minimum and maximum
      * @throws NullPointerException if other is null
      */
     public boolean intersects(@Const AxisAlignedBox other) {
-        return (max.x >= other.min.x && min.x <= other.max.x) &&
-                (max.y >= other.min.y && min.y <= other.max.y) &&
-                (max.z >= other.min.z && min.z <= other.max.z);
+        return (max.x >= other.min.x && min.x <= other.max.x) && (max.y >= other.min.y && min.y <= other.max.y) && (max.z >= other.min.z && min.z <= other.max.z);
     }
 
     /**
      * @throws NullPointerException if other is null
      */
     public boolean contains(@Const AxisAlignedBox other) {
-        return (min.x <= other.min.x && max.x >= other.max.x) &&
-                (min.y <= other.min.y && max.y >= other.max.y) &&
-                (min.z <= other.min.z && max.z >= other.max.z);
+        return (min.x <= other.min.x && max.x >= other.max.x) && (min.y <= other.min.y && max.y >= other.max.y) && (min.z <= other.min.z && max.z >= other.max.z);
     }
 
     /**
      */
     public AxisAlignedBox intersect(@Const AxisAlignedBox a, @Const AxisAlignedBox b) {
         // in the event that getMin() > getMax(), there is no true intersection
-        min.set(Math.max(a.min.x, b.min.x),
-                Math.max(a.min.y, b.min.y),
+        min.set(Math.max(a.min.x, b.min.x), Math.max(a.min.y, b.min.y),
                 Math.max(a.min.z, b.min.z));
-        max.set(Math.min(a.max.x, b.max.x),
-                Math.min(a.max.y, b.max.y),
+        max.set(Math.min(a.max.x, b.max.x), Math.min(a.max.y, b.max.y),
                 Math.min(a.max.z, b.max.z));
         return this;
     }
      * @throws NullPointerException if a or b are null
      */
     public AxisAlignedBox union(@Const AxisAlignedBox a, @Const AxisAlignedBox b) {
-        min.set(Math.min(a.min.x, b.min.x),
-                Math.min(a.min.y, b.min.y),
+        min.set(Math.min(a.min.x, b.min.x), Math.min(a.min.y, b.min.y),
                 Math.min(a.min.z, b.min.z));
-        max.set(Math.max(a.max.x, b.max.x),
-                Math.max(a.max.y, b.max.y),
+        max.set(Math.max(a.max.x, b.max.x), Math.max(a.max.y, b.max.y),
                 Math.max(a.max.z, b.max.z));
         return this;
     }
 
     /**
      * <p>
-     * Transform <tt>aabb</tt> by <tt>m</tt> and store the transformed bounds
-     * in this AxisAlignedBox. This can be used to transform an
-     * AxisAlignedBox from one coordinate space to another while
-     * preserving the property that whatever was contained by the box in its
-     * original space, will be contained by the transformed box after it
-     * has been transformed as well.
+     * Transform <tt>aabb</tt> by <tt>m</tt> and store the transformed bounds in
+     * this AxisAlignedBox. This can be used to transform an AxisAlignedBox from
+     * one coordinate space to another while preserving the property that
+     * whatever was contained by the box in its original space, will be
+     * contained by the transformed box after it has been transformed as well.
      * <p>
      * For best results, <tt>m</tt> should be an affine transformation.
      * </p>

ferox-math/src/main/java/com/ferox/math/ColorRGB.java

      * Create a new ColorRGB with red, green, and blue values equal to 0.
      */
     public ColorRGB() {
-        rgb = new double[] { 0, 0, 0 };
-        rgbHDR = new double[] { 0, 0, 0 };
+        rgb = new double[] {0, 0, 0};
+        rgbHDR = new double[] {0, 0, 0};
     }
 
     /**
     }
 
     /**
-     * Create a new ColorRGB that uses the given red, green and blue color values
-     * initially.
+     * Create a new ColorRGB that uses the given red, green and blue color
+     * values initially.
      * 
      * @see #set(float, float, float)
      * @param red The red value
             throw new IllegalArgumentException("Darkening factor must be in the range (0, 1], not: " + factor);
         }
 
-        return set(Math.max(0, factor * redHDR()),
-                   Math.max(0, factor * greenHDR()),
+        return set(Math.max(0, factor * redHDR()), Math.max(0, factor * greenHDR()),
                    Math.max(0, factor * blueHDR()));
     }
 
 
     /**
      * Set this color to use the given red, green and blue values. This is
-     * equivalent to calling {@link #red(float)}, {@link #green(float)},
-     * and {@link #blue(float)} with their appropriate values.
+     * equivalent to calling {@link #red(float)}, {@link #green(float)}, and
+     * {@link #blue(float)} with their appropriate values.
      * 
      * @param red The new red value
      * @param green The new green value
 
     /**
      * Set the red component value to <tt>blue</tt>. This value can be greater
-     * than 1 and will be unclamped for {@link #redHDR()}, but will be
-     * clamped to below 1 for {@link #red()}. Values below 0 will always be
-     * clamped to 0, regardless of dynamic range.
+     * than 1 and will be unclamped for {@link #redHDR()}, but will be clamped
+     * to below 1 for {@link #red()}. Values below 0 will always be clamped to
+     * 0, regardless of dynamic range.
      * 
      * @param red The new red color value
      * @return This color
 
     /**
      * Set the green component value to <tt>blue</tt>. This value can be greater
-     * than 1 and will be unclamped for {@link #greenHDR()}, but will be
-     * clamped to below 1 for {@link #green()}. Values below 0 will always be
-     * clamped to 0, regardless of dynamic range.
+     * than 1 and will be unclamped for {@link #greenHDR()}, but will be clamped
+     * to below 1 for {@link #green()}. Values below 0 will always be clamped to
+     * 0, regardless of dynamic range.
      * 
      * @param green The new green color value
      * @return This color
 
     /**
      * Set the blue component value to <tt>blue</tt>. This value can be greater
-     * than 1 and will be unclamped for {@link #blueHDR()}, but will be
-     * clamped to below 1 for {@link #blue()}. Values below 0 will always be
-     * clamped to 0, regardless of dynamic range.
+     * than 1 and will be unclamped for {@link #blueHDR()}, but will be clamped
+     * to below 1 for {@link #blue()}. Values below 0 will always be clamped to
+     * 0, regardless of dynamic range.
      * 
      * @param blue The new blue color value
      * @return This color
     /**
      * Return the clamped color value for the red component. This value will be
      * between 0 and 1, where 1 represents full saturation for the component.
-     * This will return 1 if {@link #redHDR()} returns a value greater than
-     * 1. Only clamping is performed to get this to [0, 1], tone-mapping is not
+     * This will return 1 if {@link #redHDR()} returns a value greater than 1.
+     * Only clamping is performed to get this to [0, 1], tone-mapping is not
      * performed.
      * 
      * @return The clamped red value
     /**
      * Return the clamped color value for the green component. This value will
      * be between 0 and 1, where 1 represents full saturation for the component.
-     * This will return 1 if {@link #greenHDR()} returns a value greater than
-     * 1. Only clamping is performed to get this to [0, 1], tone-mapping is not
+     * This will return 1 if {@link #greenHDR()} returns a value greater than 1.
+     * Only clamping is performed to get this to [0, 1], tone-mapping is not
      * performed.
      * 
      * @return The clamped green value
     /**
      * Return the clamped color value for the blue component. This value will be
      * between 0 and 1, where 1 represents full saturation for the component.
-     * This will return 1 if {@link #blueHDR()} returns a value greater than
-     * 1. Only clamping is performed to get this to [0, 1], tone-mapping is not
+     * This will return 1 if {@link #blueHDR()} returns a value greater than 1.
+     * Only clamping is performed to get this to [0, 1], tone-mapping is not
      * performed.
      * 
      * @return The clamped blue value
      * @return The clamped color for the given component
      */
     public double get(int component) {
-        switch(component) {
+        switch (component) {
         case 0:
             return red();
         case 1:
      * @return The unclamped, HDR color for the given component
      */
     public double getHDR(int component) {
-        switch(component) {
+        switch (component) {
         case 0:
             return redHDR();
         case 1:
     }
 
     /**
-     * As {@link #get(double[], int)}, but with a DoubleBuffer.
-     * <tt>offset</tt> is measured from 0, not the buffer's position.
+     * As {@link #get(double[], int)}, but with a DoubleBuffer. <tt>offset</tt>
+     * is measured from 0, not the buffer's position.
      * 
      * @param store The DoubleBuffer to hold the row values
      * @param offset The first index to use in the store
     }
 
     /**
-     * As {@link #get(double[], int)}, but with a FloatBuffer.
-     * <tt>offset</tt> is measured from 0, not the buffer's position.
+     * As {@link #get(double[], int)}, but with a FloatBuffer. <tt>offset</tt>
+     * is measured from 0, not the buffer's position.
      * 
      * @param store The FloatBuffer to hold the row values
      * @param offset The first index to use in the store
         }
 
         if (asHDR) {
-            return Double.compare(redHDR(), color.redHDR()) == 0 &&
-                    Double.compare(greenHDR(), color.greenHDR()) == 0 &&
-                    Double.compare(blueHDR(), color.blueHDR()) == 0;
+            return Double.compare(redHDR(), color.redHDR()) == 0 && Double.compare(greenHDR(),
+                                                                                   color.greenHDR()) == 0 && Double.compare(blueHDR(),
+                                                                                                                            color.blueHDR()) == 0;
         } else {
-            return Double.compare(red(), color.red()) == 0 &&
-                    Double.compare(green(), color.green()) == 0 &&
-                    Double.compare(blue(), color.blue()) == 0;
+            return Double.compare(red(), color.red()) == 0 && Double.compare(green(),
+                                                                             color.green()) == 0 && Double.compare(blue(),
+                                                                                                                   color.blue()) == 0;
         }
     }
 

ferox-math/src/main/java/com/ferox/math/Const.java

 
 @Documented
 @Retention(RetentionPolicy.RUNTIME)
-@Target({ ElementType.PARAMETER, ElementType.METHOD, ElementType.FIELD })
-public @interface Const { }
+@Target({ElementType.PARAMETER, ElementType.METHOD, ElementType.FIELD})
+public @interface Const {}

ferox-math/src/main/java/com/ferox/math/Matrix3.java

      * Create a new matrix with all components equal to 0.
      */
     public Matrix3() {
-        set(0, 0, 0,
-            0, 0, 0,
-            0, 0, 0);
+        set(0, 0, 0, 0, 0, 0, 0, 0, 0);
     }
 
     /**
      * @param m21
      * @param m22
      */
-    public Matrix3(double m00, double m01, double m02,
-                   double m10, double m11, double m12,
-                   double m20, double m21, double m22) {
-        set(m00, m01, m02,
-            m10, m11, m12,
-            m20, m21, m22);
+    public Matrix3(double m00, double m01, double m02, double m10, double m11,
+                   double m12, double m20, double m21, double m22) {
+        set(m00, m01, m02, m10, m11, m12, m20, m21, m22);
     }
 
     @Override
      * @throws NullPointerException if a or b are null
      */
     public Matrix3 add(@Const Matrix3 a, @Const Matrix3 b) {
-        return set(a.m00 + b.m00, a.m01 + b.m01, a.m02 + b.m02,
-                   a.m10 + b.m10, a.m11 + b.m11, a.m12 + b.m12,
-                   a.m20 + b.m20, a.m21 + b.m21, a.m22 + b.m22);
+        return set(a.m00 + b.m00, a.m01 + b.m01, a.m02 + b.m02, a.m10 + b.m10,
+                   a.m11 + b.m11, a.m12 + b.m12, a.m20 + b.m20, a.m21 + b.m21,
+                   a.m22 + b.m22);
     }
 
     /**
      * @throws NullPointerException if a is null
      */
     public Matrix3 add(@Const Matrix3 a, double c) {
-        return set(a.m00 + c, a.m01 + c, a.m02 + c,
-                   a.m10 + c, a.m11 + c, a.m12 + c,
+        return set(a.m00 + c, a.m01 + c, a.m02 + c, a.m10 + c, a.m11 + c, a.m12 + c,
                    a.m20 + c, a.m21 + c, a.m22 + c);
     }
 
         double r21 = a.m20 * a.m01 - a.m21 * a.m00;
         double r22 = a.m11 * a.m00 - a.m10 * a.m01;
 
-        return set(invDet * r00, invDet * r01, invDet * r02,
-                   invDet * r10, invDet * r11, invDet * r12,
-                   invDet * r20, invDet * r21, invDet * r22);
+        return set(invDet * r00, invDet * r01, invDet * r02, invDet * r10, invDet * r11,
+                   invDet * r12, invDet * r20, invDet * r21, invDet * r22);
     }
 
     /**
      * @throws NullPointerException if a or b are null
      */
     public Matrix3 mulDiagonal(@Const Matrix3 a, @Const Vector3 b) {
-        return set(a.m00 * b.x, a.m01 * b.y, a.m02 * b.z,
-                   a.m10 * b.x, a.m11 * b.y, a.m12 * b.z,
-                   a.m20 * b.x, a.m21 * b.y, a.m22 * b.z);
+        return set(a.m00 * b.x, a.m01 * b.y, a.m02 * b.z, a.m10 * b.x, a.m11 * b.y,
+                   a.m12 * b.z, a.m20 * b.x, a.m21 * b.y, a.m22 * b.z);
     }
 
     /**
      * <p>
-     * Multiply the transpose of <tt>a</tt> by the transpose of <tt>b</tt>, or compute
-     * <code>[a]^T x [b]^T</code> and store it in this matrix.
+     * Multiply the transpose of <tt>a</tt> by the transpose of <tt>b</tt>, or
+     * compute <code>[a]^T x [b]^T</code> and store it in this matrix.
      * </p>
      * <p>
      * Note that <code>[a]^T x [b]^T = ([b] x [a])^T</code>
      * @throws NullPointerException if a is null
      */
     public Matrix3 scale(@Const Matrix3 a, double scalar) {
-        return set(scalar * a.m00, scalar * a.m01, scalar * a.m02,
-                   scalar * a.m10, scalar * a.m11, scalar * a.m12,
-                   scalar * a.m20, scalar * a.m21, scalar * a.m22);
+        return set(scalar * a.m00, scalar * a.m01, scalar * a.m02, scalar * a.m10,
+                   scalar * a.m11, scalar * a.m12, scalar * a.m20, scalar * a.m21,
+                   scalar * a.m22);
     }
 
     /**
      * @throws NullPointerException if a is null
      */
     public Matrix3 transpose(@Const Matrix3 a) {
-        return set(a.m00, a.m10, a.m20,
-                   a.m01, a.m11, a.m21,
-                   a.m02, a.m12, a.m22);
+        return set(a.m00, a.m10, a.m20, a.m01, a.m11, a.m21, a.m02, a.m12, a.m22);
     }
 
     /**
     }
 
     /**
-     * As {@link #mul(Matrix3, Matrix3)} with the first parameter being
-     * this matrix.
+     * As {@link #mul(Matrix3, Matrix3)} with the first parameter being this
+     * matrix.
      * 
      * @param r
      * @return This matrix
     }
 
     /**
-     * As {@link #mulDiagonal(Matrix3, Vector3)} with the first parameter
-     * being this matrix.
+     * As {@link #mulDiagonal(Matrix3, Vector3)} with the first parameter being
+     * this matrix.
      * 
      * @param diag
      * @return This matrix
     }
 
     /**
-     * As {@link #mulTransposeRight(Matrix3, Matrix3)} with the first
-     * parameter being this matrix.
+     * As {@link #mulTransposeRight(Matrix3, Matrix3)} with the first parameter
+     * being this matrix.
      * 
      * @param r
      * @return This matrix
     }
 
     /**
-     * Transpose this matrix in place, equivalent to
-     * {@link #transpose(Matrix3)} with the first parameter being this matrix.
+     * Transpose this matrix in place, equivalent to {@link #transpose(Matrix3)}
+     * with the first parameter being this matrix.
      * 
      * @return This matrix
      */
     }
 
     /**
-     * Set this Matrix3 to be the rotation matrix representing the same
-     * rotation stored by <tt>q</tt>.
+     * Set this Matrix3 to be the rotation matrix representing the same rotation
+     * stored by <tt>q</tt>.
      * 
      * @param q The quaternion to convert to matrix form
      * @return This matrix for chaining
 
         double s = 2 / d;
 
-        double xs = q.x * s,  ys = q.y * s,  zs = q.z * s;
+        double xs = q.x * s, ys = q.y * s, zs = q.z * s;
         double wx = q.w * xs, wy = q.w * ys, wz = q.w * zs;
         double xx = q.x * xs, xy = q.x * ys, xz = q.x * zs;
         double yy = q.y * ys, yz = q.y * zs, zz = q.z * zs;
 
-        return set(1.0 - (yy + zz), xy - wz, xz + wy,
-                   xy + wz, 1.0 - (xx + zz), yz - wx,
+        return set(1.0 - (yy + zz), xy - wz, xz + wy, xy + wz, 1.0 - (xx + zz), yz - wx,
                    xz - wy, yz + wx, 1.0 - (xx + yy));
     }
 
      * @throws NullPointerException if m is null
      */
     public Matrix3 setUpper(@Const Matrix4 m) {
-        return set(m.m00, m.m01, m.m02,
-                   m.m10, m.m11, m.m12,
-                   m.m20, m.m21, m.m22);
+        return set(m.m00, m.m01, m.m02, m.m10, m.m11, m.m12, m.m20, m.m21, m.m22);
     }
 
     /**
      */
     public Matrix3 set(DoubleBuffer values, int offset, boolean rowMajor) {
         if (rowMajor) {
-            return set(values.get(offset), values.get(offset + 1), values.get(offset + 2),
-                       values.get(offset + 3), values.get(offset + 4), values.get(offset + 5),
-                       values.get(offset + 6), values.get(offset + 7), values.get(offset + 8));
+            return set(values.get(offset), values.get(offset + 1),
+                       values.get(offset + 2), values.get(offset + 3),
+                       values.get(offset + 4), values.get(offset + 5),
+                       values.get(offset + 6), values.get(offset + 7),
+                       values.get(offset + 8));
         } else {
-            return set(values.get(offset), values.get(offset + 3), values.get(offset + 6),
-                       values.get(offset + 1), values.get(offset + 4), values.get(offset + 7),
-                       values.get(offset + 2), values.get(offset + 5), values.get(offset + 8));
+            return set(values.get(offset), values.get(offset + 3),
+                       values.get(offset + 6), values.get(offset + 1),
+                       values.get(offset + 4), values.get(offset + 7),
+                       values.get(offset + 2), values.get(offset + 5),
+                       values.get(offset + 8));
         }
     }
 
      */
     public Matrix3 set(FloatBuffer values, int offset, boolean rowMajor) {
         if (rowMajor) {
-            return set(values.get(offset), values.get(offset + 1), values.get(offset + 2),
-                       values.get(offset + 3), values.get(offset + 4), values.get(offset + 5),
-                       values.get(offset + 6), values.get(offset + 7), values.get(offset + 8));
+            return set(values.get(offset), values.get(offset + 1),
+                       values.get(offset + 2), values.get(offset + 3),
+                       values.get(offset + 4), values.get(offset + 5),
+                       values.get(offset + 6), values.get(offset + 7),
+                       values.get(offset + 8));
         } else {
-            return set(values.get(offset), values.get(offset + 3), values.get(offset + 6),
-                       values.get(offset + 1), values.get(offset + 4), values.get(offset + 7),
-                       values.get(offset + 2), values.get(offset + 5), values.get(offset + 8));
+            return set(values.get(offset), values.get(offset + 3),
+                       values.get(offset + 6), values.get(offset + 1),
+                       values.get(offset + 4), values.get(offset + 7),
+                       values.get(offset + 2), values.get(offset + 5),
+                       values.get(offset + 8));
         }
     }
 
      * @param m22 New value for 3rd row and 3rd column
      * @return This matrix
      */
-    public Matrix3 set(double m00, double m01, double m02,
-                       double m10, double m11, double m12,
-                       double m20, double m21, double m22) {
-        this.m00 = m00; this.m01 = m01; this.m02 = m02;
-        this.m10 = m10; this.m11 = m11; this.m12 = m12;
-        this.m20 = m20; this.m21 = m21; this.m22 = m22;
+    public Matrix3 set(double m00, double m01, double m02, double m10, double m11,
+                       double m12, double m20, double m21, double m22) {
+        this.m00 = m00;
+        this.m01 = m01;
+        this.m02 = m02;
+        this.m10 = m10;
+        this.m11 = m11;
+        this.m12 = m12;
+        this.m20 = m20;
+        this.m21 = m21;
+        this.m22 = m22;
         return this;
     }
 
      * @throws NullPointerException if o is null
      */
     public Matrix3 set(@Const Matrix3 o) {
-        this.m00 = o.m00; this.m01 = o.m01; this.m02 = o.m02;
-        this.m10 = o.m10; this.m11 = o.m11; this.m12 = o.m12;
-        this.m20 = o.m20; this.m21 = o.m21; this.m22 = o.m22;
+        this.m00 = o.m00;
+        this.m01 = o.m01;
+        this.m02 = o.m02;
+        this.m10 = o.m10;
+        this.m11 = o.m11;
+        this.m12 = o.m12;
+        this.m20 = o.m20;
+        this.m21 = o.m21;
+        this.m22 = o.m22;
         return this;
     }
 
      * @return This matrix
      */
     public Matrix3 setIdentity() {
-        return set(1, 0, 0,
-                   0, 1, 0,
-                   0, 0, 1);
+        return set(1, 0, 0, 0, 1, 0, 0, 0, 1);
     }
 
     /**
     }
 
     /**
-     * As {@link #get(double[], int, boolean)}, but the data is cast
-     * to floats.
+     * As {@link #get(double[], int, boolean)}, but the data is cast to floats.
      * 
      * @param store The float[] to hold the row values
      * @param offset The first index to use in the store
      * @param rowMajor True if the matrix values are stored as rows, otherwise
-     * as columns
+     *            as columns
      * @throws ArrayIndexOutOfBoundsException if store doesn't have enough space
      *             for the column
      */
      * @param store The DoubleBuffer to hold the row values
      * @param offset The first index to use in the store
      * @param rowMajor True if the matrix values are stored as rows, otherwise
-     * as columns
+     *            as columns
      * @throws ArrayIndexOutOfBoundsException if store doesn't have enough space
      *             for the column
      */
      * @param store The FloatBuffer to hold the row values
      * @param offset The first index to use in the store
      * @param rowMajor True if the matrix values are stored as rows, otherwise
-     * as columns
+     *            as columns
      * @throws ArrayIndexOutOfBoundsException if store doesn't have enough space
      *             for the column
      */
             return false;
         }
 
-        return Math.abs(m00 - e.m00) <= eps &&
-                Math.abs(m01 - e.m01) <= eps &&
-                Math.abs(m02 - e.m02) <= eps &&
-                Math.abs(m10 - e.m10) <= eps &&
-                Math.abs(m11 - e.m11) <= eps &&
-                Math.abs(m12 - e.m12) <= eps &&
-                Math.abs(m20 - e.m20) <= eps &&
-                Math.abs(m21 - e.m21) <= eps &&
-                Math.abs(m22 - e.m22) <= eps;
+        return Math.abs(m00 - e.m00) <= eps && Math.abs(m01 - e.m01) <= eps && Math.abs(m02 - e.m02) <= eps && Math.abs(m10 - e.m10) <= eps && Math.abs(m11 - e.m11) <= eps && Math.abs(m12 - e.m12) <= eps && Math.abs(m20 - e.m20) <= eps && Math.abs(m21 - e.m21) <= eps && Math.abs(m22 - e.m22) <= eps;
     }
 
     @Override
             return false;
         }
         Matrix3 e = (Matrix3) o;
-        return m00 == e.m00 && m01 == e.m01 && m02 == e.m02 &&
-                m10 == e.m10 && m11 == e.m11 && m12 == e.m12 &&
-                m20 == e.m20 && m21 == e.m21 && m22 == e.m22;
+        return m00 == e.m00 && m01 == e.m01 && m02 == e.m02 && m10 == e.m10 && m11 == e.m11 && m12 == e.m12 && m20 == e.m20 && m21 == e.m21 && m22 == e.m22;
     }
 
     @Override
 
     @Override
     public String toString() {
-        return "[[ " + m00 + ", " + m01 + ", " + m02 + " ]\n" +
-                "[ " + m10 + ", " + m11 + ", " + m12 + " ]\n" +
-                "[ " + m20 + ", " + m21 + ", " + m22 + " ]]";
+        return "[[ " + m00 + ", " + m01 + ", " + m02 + " ]\n" + "[ " + m10 + ", " + m11 + ", " + m12 + " ]\n" + "[ " + m20 + ", " + m21 + ", " + m22 + " ]]";
     }
 }

ferox-math/src/main/java/com/ferox/math/Matrix4.java

      * Construct a new Matrix4 that's set to the identity matrix.
      */
     public Matrix4() {
-        set(0, 0, 0, 0,
-            0, 0, 0, 0,
-            0, 0, 0, 0,
-            0, 0, 0, 0);
+        set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
     }
 
     /**
      * @param m32
      * @param m33
      */
-    public Matrix4(double m00, double m01, double m02, double m03,
-                   double m10, double m11, double m12, double m13,
-                   double m20, double m21, double m22, double m23,
-                   double m30, double m31, double m32, double m33) {
-        set(m00, m01, m02, m03,
-            m10, m11, m12, m13,
-            m20, m21, m22, m23,
-            m30, m31, m32, m33);
+    public Matrix4(double m00, double m01, double m02, double m03, double m10,
+                   double m11, double m12, double m13, double m20, double m21,
+                   double m22, double m23, double m30, double m31, double m32, double m33) {
+        set(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32,
+            m33);
     }
 
     @Override
      * @throws NullPointerException if m is null
      */
     public Matrix4 add(@Const Matrix4 m, double c) {
-        return set(m.m00 + c, m.m01 + c, m.m02 + c, m.m03 + c,
-                   m.m10 + c, m.m11 + c, m.m12 + c, m.m13 + c,
-                   m.m20 + c, m.m21 + c, m.m22 + c, m.m23 + c,
+        return set(m.m00 + c, m.m01 + c, m.m02 + c, m.m03 + c, m.m10 + c, m.m11 + c,
+                   m.m12 + c, m.m13 + c, m.m20 + c, m.m21 + c, m.m22 + c, m.m23 + c,
                    m.m30 + c, m.m31 + c, m.m32 + c, m.m33 + c);
     }
 
         double t23 = m.m21 * ra2 - m.m23 * ra0 - m.m20 * ra4;
         double t33 = m.m20 * ra3 - m.m21 * ra1 + m.m22 * ra0;
 
-        return set(invDet * t00, invDet * t01, invDet * t02, invDet * t03,
-                   invDet * t10, invDet * t11, invDet * t12, invDet * t13,
-                   invDet * t20, invDet * t21, invDet * t22, invDet * t23,
-                   invDet * t30, invDet * t31, invDet * t32, invDet * t33);
+        return set(invDet * t00, invDet * t01, invDet * t02, invDet * t03, invDet * t10,
+                   invDet * t11, invDet * t12, invDet * t13, invDet * t20, invDet * t21,
+                   invDet * t22, invDet * t23, invDet * t30, invDet * t31, invDet * t32,
+                   invDet * t33);
     }
 
     /**
      * @throws NullPointerException if a or b are null
      */
     public Matrix4 mulDiagonal(@Const Matrix4 a, @Const Vector4 b) {
-        return set(a.m00 * b.x, a.m01 * b.y, a.m02 * b.z, a.m03 * b.w,
-                   a.m10 * b.x, a.m11 * b.y, a.m12 * b.z, a.m13 * b.w,
-                   a.m20 * b.x, a.m21 * b.y, a.m22 * b.z, a.m23 * b.w,
-                   a.m30 * b.x, a.m31 * b.y, a.m32 * b.z, a.m33 * b.w);
+        return set(a.m00 * b.x, a.m01 * b.y, a.m02 * b.z, a.m03 * b.w, a.m10 * b.x,
+                   a.m11 * b.y, a.m12 * b.z, a.m13 * b.w, a.m20 * b.x, a.m21 * b.y,
+                   a.m22 * b.z, a.m23 * b.w, a.m30 * b.x, a.m31 * b.y, a.m32 * b.z,
+                   a.m33 * b.w);
     }
 
     /**
      * <p>
-     * Multiply the transpose of <tt>a</tt> by the transpose of <tt>b</tt>, or compute
-     * <code>[a]^T x [b]^T</code> and store it in this matrix.
+     * Multiply the transpose of <tt>a</tt> by the transpose of <tt>b</tt>, or
+     * compute <code>[a]^T x [b]^T</code> and store it in this matrix.
      * </p>
      * <p>
      * Note that <code>[a]^T x [b]^T = ([b] x [a])^T</code>
      * @throws NullPointerException if m is null
      */
     public Matrix4 transpose(@Const Matrix4 m) {
-        return set(m.m00, m.m10, m.m20, m.m30,
-                   m.m01, m.m11, m.m21, m.m31,
-                   m.m02, m.m12, m.m22, m.m32,
-                   m.m03, m.m13, m.m23, m.m33);
+        return set(m.m00, m.m10, m.m20, m.m30, m.m01, m.m11, m.m21, m.m31, m.m02, m.m12,
+                   m.m22, m.m32, m.m03, m.m13, m.m23, m.m33);
     }
 
     /**
-     * As {@link #add(Matrix4, Matrix4)} with the first parameter being
-     * this matrix.
+     * As {@link #add(Matrix4, Matrix4)} with the first parameter being this
+     * matrix.
      * 
      * @param r
      * @return This matrix
     }
 
     /**
-     * As {@link #add(Matrix4, double)} with the first parameter being
-     * this matrix.
+     * As {@link #add(Matrix4, double)} with the first parameter being this
+     * matrix.
      * 
      * @param c
      * @return This matrix
     }
 
     /**
-     * Invert this matrix in place, equivalent to {@link #inverse(Matrix4)}
-     * with the first parameter being this matrix.
+     * Invert this matrix in place, equivalent to {@link #inverse(Matrix4)} with
+     * the first parameter being this matrix.
      * 
      * @return This matrix
      * @throws ArithmeticException if this matrix isn't invertible
     }
 
     /**
-     * As {@link #mul(Matrix4, Matrix4)} with the first parameter being
-     * this matrix.
+     * As {@link #mul(Matrix4, Matrix4)} with the first parameter being this
+     * matrix.
      * 
      * @param r
      * @return This matrix
     }
 
     /**
-     * As {@link #mulDiagonal(Matrix4, Vector4)} with the first parameter
-     * being this matrix.
+     * As {@link #mulDiagonal(Matrix4, Vector4)} with the first parameter being
+     * this matrix.
      * 
      * @param diag
      * @return This matrix
     }