diff options
author | Julien Gouesse <[email protected]> | 2014-08-08 22:02:24 +0200 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2014-08-08 22:02:24 +0200 |
commit | d8553c06068332a2e604f1336238e5cdf12c762c (patch) | |
tree | cbd1b37833a82868bd30621ba1cf053f2853c6ed /ardor3d-core/src/main/java | |
parent | 2835439b704b945e3121b5a9f17d207bc5b2c5ea (diff) |
Removes tons of warnings
Diffstat (limited to 'ardor3d-core/src/main/java')
81 files changed, 447 insertions, 59 deletions
diff --git a/ardor3d-core/src/main/java/com/ardor3d/bounding/BoundingVolume.java b/ardor3d-core/src/main/java/com/ardor3d/bounding/BoundingVolume.java index 19a9822..3b6a94b 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/bounding/BoundingVolume.java +++ b/ardor3d-core/src/main/java/com/ardor3d/bounding/BoundingVolume.java @@ -250,14 +250,17 @@ public abstract class BoundingVolume implements Serializable, Savable { */ public abstract BoundingVolume asType(Type newType); + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(_center, "center", new Vector3(Vector3.ZERO)); } + @Override public void read(final InputCapsule capsule) throws IOException { _center.set((Vector3) capsule.readSavable("center", new Vector3(Vector3.ZERO))); } + @Override public Class<? extends BoundingVolume> getClassTag() { return this.getClass(); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/bounding/TreeComparator.java b/ardor3d-core/src/main/java/com/ardor3d/bounding/TreeComparator.java index 9f4626e..c4057e0 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/bounding/TreeComparator.java +++ b/ardor3d-core/src/main/java/com/ardor3d/bounding/TreeComparator.java @@ -37,6 +37,7 @@ public class TreeComparator implements Comparator<PrimitiveKey> { _mesh = mesh; } + @Override public int compare(final PrimitiveKey o1, final PrimitiveKey o2) { if (o1.equals(o2)) { diff --git a/ardor3d-core/src/main/java/com/ardor3d/bounding/UsageTreeController.java b/ardor3d-core/src/main/java/com/ardor3d/bounding/UsageTreeController.java index ba4d285..a868610 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/bounding/UsageTreeController.java +++ b/ardor3d-core/src/main/java/com/ardor3d/bounding/UsageTreeController.java @@ -34,6 +34,7 @@ public class UsageTreeController implements CollisionTreeController { * @param desiredSize * the final size of the cache to attempt to reach. */ + @Override public void clean(final Map<Mesh, CollisionTree> cache, final List<Mesh> protectedList, final int desiredSize) { // get the ordered keyset (this will be ordered with oldest to newest). diff --git a/ardor3d-core/src/main/java/com/ardor3d/image/util/AbiLoader.java b/ardor3d-core/src/main/java/com/ardor3d/image/util/AbiLoader.java index b69ffa8..8b0133d 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/image/util/AbiLoader.java +++ b/ardor3d-core/src/main/java/com/ardor3d/image/util/AbiLoader.java @@ -33,6 +33,7 @@ public final class AbiLoader implements ImageLoader { * @throws IOException * if an error occurs during read. */ + @Override public Image load(final InputStream is, final boolean flip) throws IOException { return (Image) new BinaryImporter().load(is); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/image/util/TgaLoader.java b/ardor3d-core/src/main/java/com/ardor3d/image/util/TgaLoader.java index 1d81fbb..67d2a07 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/image/util/TgaLoader.java +++ b/ardor3d-core/src/main/java/com/ardor3d/image/util/TgaLoader.java @@ -378,49 +378,51 @@ public final class TgaLoader implements ImageLoader { } } else if (imageType == TYPE_COLORMAPPED) { - final int bytesPerIndex = pixelDepth / 8; + if (cMapEntries != null) { + final int bytesPerIndex = pixelDepth / 8; - if (bytesPerIndex == 1) { - for (int i = 0; i <= (height - 1); i++) { - if (!flip) { - rawDataIndex = (height - 1 - i) * width * dl; - } - for (int j = 0; j < width; j++) { - final int index = dis.readUnsignedByte(); - if (index >= cMapEntries.length || index < 0) { - throw new Ardor3dException("TGA: Invalid color map entry referenced: " + index); - } - final ColorMapEntry entry = cMapEntries[index]; - rawData[rawDataIndex++] = entry.red; - rawData[rawDataIndex++] = entry.green; - rawData[rawDataIndex++] = entry.blue; - if (dl == 4) { - rawData[rawDataIndex++] = entry.alpha; + if (bytesPerIndex == 1) { + for (int i = 0; i <= (height - 1); i++) { + if (!flip) { + rawDataIndex = (height - 1 - i) * width * dl; } + for (int j = 0; j < width; j++) { + final int index = dis.readUnsignedByte(); + if (index >= cMapEntries.length || index < 0) { + throw new Ardor3dException("TGA: Invalid color map entry referenced: " + index); + } + final ColorMapEntry entry = cMapEntries[index]; + rawData[rawDataIndex++] = entry.red; + rawData[rawDataIndex++] = entry.green; + rawData[rawDataIndex++] = entry.blue; + if (dl == 4) { + rawData[rawDataIndex++] = entry.alpha; + } + } } - } - } else if (bytesPerIndex == 2) { - for (int i = 0; i <= (height - 1); i++) { - if (!flip) { - rawDataIndex = (height - 1 - i) * width * dl; - } - for (int j = 0; j < width; j++) { - final int index = flipEndian(dis.readShort()); - if (index >= cMapEntries.length || index < 0) { - throw new Ardor3dException("TGA: Invalid color map entry referenced: " + index); + } else if (bytesPerIndex == 2) { + for (int i = 0; i <= (height - 1); i++) { + if (!flip) { + rawDataIndex = (height - 1 - i) * width * dl; } - final ColorMapEntry entry = cMapEntries[index]; - rawData[rawDataIndex++] = entry.red; - rawData[rawDataIndex++] = entry.green; - rawData[rawDataIndex++] = entry.blue; - if (dl == 4) { - rawData[rawDataIndex++] = entry.alpha; + for (int j = 0; j < width; j++) { + final int index = flipEndian(dis.readShort()); + if (index >= cMapEntries.length || index < 0) { + throw new Ardor3dException("TGA: Invalid color map entry referenced: " + index); + } + final ColorMapEntry entry = cMapEntries[index]; + rawData[rawDataIndex++] = entry.red; + rawData[rawDataIndex++] = entry.green; + rawData[rawDataIndex++] = entry.blue; + if (dl == 4) { + rawData[rawDataIndex++] = entry.alpha; + } } } + } else { + throw new Ardor3dException("TGA: unknown colormap indexing size used: " + bytesPerIndex); } - } else { - throw new Ardor3dException("TGA: unknown colormap indexing size used: " + bytesPerIndex); } } diff --git a/ardor3d-core/src/main/java/com/ardor3d/image/util/dds/DdsLoader.java b/ardor3d-core/src/main/java/com/ardor3d/image/util/dds/DdsLoader.java index 8d551ac..494c76c 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/image/util/dds/DdsLoader.java +++ b/ardor3d-core/src/main/java/com/ardor3d/image/util/dds/DdsLoader.java @@ -56,6 +56,7 @@ import com.google.common.collect.Lists; public class DdsLoader implements ImageLoader { private static final Logger logger = Logger.getLogger(DdsLoader.class.getName()); + @Override public Image load(final InputStream is, final boolean flipVertically) throws IOException { final LittleEndianDataInput in = new LittleEndianDataInput(is); diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/ControllerState.java b/ardor3d-core/src/main/java/com/ardor3d/input/ControllerState.java index 15d3106..28f4c6d 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/ControllerState.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/ControllerState.java @@ -107,6 +107,7 @@ public class ControllerState { public List<ControllerEvent> getEvents() { Collections.sort(_eventsSinceLastState, new Comparator<ControllerEvent>() { + @Override public int compare(final ControllerEvent o1, final ControllerEvent o2) { return (int) (o2.getNanos() - o1.getNanos()); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/control/FirstPersonControl.java b/ardor3d-core/src/main/java/com/ardor3d/input/control/FirstPersonControl.java index d93f9c0..a7467d8 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/control/FirstPersonControl.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/control/FirstPersonControl.java @@ -227,6 +227,7 @@ public class FirstPersonControl { // Test boolean to allow us to ignore first mouse event. First event can wildly vary based on platform. private boolean firstPing = true; + @Override public void perform(final Canvas source, final TwoInputStates inputStates, final double tpf) { final MouseState mouse = inputStates.getCurrent().getMouseState(); if (mouse.getDx() != 0 || mouse.getDy() != 0) { @@ -249,6 +250,7 @@ public class FirstPersonControl { final Predicate<TwoInputStates> keysHeld = new Predicate<TwoInputStates>() { Key[] keys = new Key[] { Key.W, Key.A, Key.S, Key.D, Key.LEFT, Key.RIGHT, Key.UP, Key.DOWN }; + @Override public boolean apply(final TwoInputStates states) { for (final Key k : keys) { if (states.getCurrent() != null && states.getCurrent().getKeyboardState().isDown(k)) { @@ -260,6 +262,7 @@ public class FirstPersonControl { }; final TriggerAction moveAction = new TriggerAction() { + @Override public void perform(final Canvas source, final TwoInputStates inputStates, final double tpf) { FirstPersonControl.this.move(source.getCanvasRenderer().getCamera(), inputStates.getCurrent() .getKeyboardState(), tpf); diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/control/OrbitCamControl.java b/ardor3d-core/src/main/java/com/ardor3d/input/control/OrbitCamControl.java index 2be9c8b..4025b66 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/control/OrbitCamControl.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/control/OrbitCamControl.java @@ -349,8 +349,8 @@ public class OrbitCamControl { public void setupMouseTriggers(final LogicalLayer layer, final boolean dragOnly) { // Mouse look - final Predicate<TwoInputStates> someMouseDown = Predicates.or(TriggerConditions.leftButtonDown(), Predicates - .or(TriggerConditions.rightButtonDown(), TriggerConditions.middleButtonDown())); + final Predicate<TwoInputStates> someMouseDown = Predicates.or(TriggerConditions.leftButtonDown(), + Predicates.or(TriggerConditions.rightButtonDown(), TriggerConditions.middleButtonDown())); final Predicate<TwoInputStates> scrollWheelMoved = new MouseWheelMovedCondition(); final Predicate<TwoInputStates> dragged = Predicates.and(TriggerConditions.mouseMoved(), someMouseDown); final TriggerAction mouseAction = new TriggerAction() { @@ -358,6 +358,7 @@ public class OrbitCamControl { // Test boolean to allow us to ignore first mouse event. First event can wildly vary based on platform. private boolean firstPing = true; + @Override public void perform(final Canvas source, final TwoInputStates inputStates, final double tpf) { final MouseState mouse = inputStates.getCurrent().getMouseState(); if (mouse.getDx() != 0 || mouse.getDy() != 0) { diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/AnyControllerCondition.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/AnyControllerCondition.java index 8626a5f..084c5e1 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/AnyControllerCondition.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/AnyControllerCondition.java @@ -15,6 +15,7 @@ import com.google.common.base.Predicate; public final class AnyControllerCondition implements Predicate<TwoInputStates> { + @Override public boolean apply(final TwoInputStates states) { final ControllerState oldState = states.getPrevious().getControllerState(); final ControllerState currentState = states.getCurrent().getControllerState(); diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/AnyKeyCondition.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/AnyKeyCondition.java index 5ab407f..c6074d8 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/AnyKeyCondition.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/AnyKeyCondition.java @@ -17,6 +17,7 @@ import com.google.common.base.Predicate; * Applicable whenever 'any' key has been pressed. */ public class AnyKeyCondition implements Predicate<TwoInputStates> { + @Override public boolean apply(final TwoInputStates twoInputStates) { final InputState currentState = twoInputStates.getCurrent(); final InputState previousState = twoInputStates.getPrevious(); diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/BasicTriggersApplier.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/BasicTriggersApplier.java index 5b77235..f3324c8 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/BasicTriggersApplier.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/BasicTriggersApplier.java @@ -16,6 +16,7 @@ import com.ardor3d.framework.Canvas; public class BasicTriggersApplier implements LogicalTriggersApplier { + @Override public void checkAndPerformTriggers(final Set<InputTrigger> triggers, final Canvas source, final TwoInputStates states, final double tpf) { for (final InputTrigger trigger : triggers) { diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/ControllerComponentActiveCondition.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/ControllerComponentActiveCondition.java index 6289c88..75ecf72 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/ControllerComponentActiveCondition.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/ControllerComponentActiveCondition.java @@ -24,6 +24,7 @@ public final class ControllerComponentActiveCondition implements Predicate<TwoIn componentNames = components; } + @Override public boolean apply(final TwoInputStates states) { final Map<String, Float> currentStates = states.getCurrent().getControllerState() .getControllerComponentValues(controllerName); diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/ControllerComponentCondition.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/ControllerComponentCondition.java index a088149..8e6b5ec 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/ControllerComponentCondition.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/ControllerComponentCondition.java @@ -33,6 +33,7 @@ public final class ControllerComponentCondition implements Predicate<TwoInputSta componentName = component; } + @Override public boolean apply(final TwoInputStates states) { boolean apply = false; final ControllerState currentState = states.getCurrent().getControllerState(); diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/ControllerCondition.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/ControllerCondition.java index 757b2b6..ea20d0f 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/ControllerCondition.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/ControllerCondition.java @@ -29,6 +29,7 @@ public final class ControllerCondition implements Predicate<TwoInputStates> { controllerName = controller; } + @Override public boolean apply(final TwoInputStates states) { boolean apply = false; final ControllerState currentState = states.getCurrent().getControllerState(); diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/DummyControllerWrapper.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/DummyControllerWrapper.java index 2194704..86b5d68 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/DummyControllerWrapper.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/DummyControllerWrapper.java @@ -19,25 +19,31 @@ public class DummyControllerWrapper implements ControllerWrapper { public static final DummyControllerWrapper INSTANCE = new DummyControllerWrapper(); PeekingIterator<ControllerEvent> empty = new PeekingIterator<ControllerEvent>() { + @Override public boolean hasNext() { return false; } + @Override public void remove() {} + @Override public ControllerEvent peek() { return null; } + @Override public ControllerEvent next() { return null; } }; + @Override public PeekingIterator<ControllerEvent> getEvents() { return empty; } + @Override public void init() { ; // ignore, does nothing } diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/DummyFocusWrapper.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/DummyFocusWrapper.java index 7ff0c3e..57d2e79 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/DummyFocusWrapper.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/DummyFocusWrapper.java @@ -18,10 +18,12 @@ import com.ardor3d.input.FocusWrapper; public class DummyFocusWrapper implements FocusWrapper { public static final DummyFocusWrapper INSTANCE = new DummyFocusWrapper(); + @Override public void init() { ; // ignore, does nothing } + @Override public boolean getAndClearFocusLost() { return false; } diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/DummyKeyboardWrapper.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/DummyKeyboardWrapper.java index 3de004e..d17287f 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/DummyKeyboardWrapper.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/DummyKeyboardWrapper.java @@ -22,25 +22,31 @@ public class DummyKeyboardWrapper implements KeyboardWrapper { PeekingIterator<KeyEvent> empty = new PeekingIterator<KeyEvent>() { + @Override public boolean hasNext() { return false; } + @Override public void remove() {} + @Override public KeyEvent peek() { return null; } + @Override public KeyEvent next() { return null; } }; + @Override public PeekingIterator<KeyEvent> getEvents() { return empty; } + @Override public void init() { ; // ignore, does nothing. } diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/DummyMouseWrapper.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/DummyMouseWrapper.java index dc47f24..a9b1e74 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/DummyMouseWrapper.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/DummyMouseWrapper.java @@ -22,25 +22,31 @@ public class DummyMouseWrapper implements MouseWrapper { PeekingIterator<MouseState> empty = new PeekingIterator<MouseState>() { + @Override public boolean hasNext() { return false; } + @Override public void remove() {} + @Override public MouseState peek() { return null; } + @Override public MouseState next() { return null; } }; + @Override public PeekingIterator<MouseState> getEvents() { return empty; } + @Override public void init() { ; // ignore, does nothing } diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/KeyHeldCondition.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/KeyHeldCondition.java index ce2b600..cc244dc 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/KeyHeldCondition.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/KeyHeldCondition.java @@ -37,6 +37,7 @@ public final class KeyHeldCondition implements Predicate<TwoInputStates> { this.key = key; } + @Override public boolean apply(final TwoInputStates states) { return states.getCurrent().getKeyboardState().isDown(key); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/KeyPressedCondition.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/KeyPressedCondition.java index cdb19d6..67b7a85 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/KeyPressedCondition.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/KeyPressedCondition.java @@ -38,6 +38,7 @@ public final class KeyPressedCondition implements Predicate<TwoInputStates> { this.key = key; } + @Override public boolean apply(final TwoInputStates states) { final InputState currentState = states.getCurrent(); final InputState previousState = states.getPrevious(); diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/KeyReleasedCondition.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/KeyReleasedCondition.java index b08f5ef..0bb6ece 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/KeyReleasedCondition.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/KeyReleasedCondition.java @@ -38,6 +38,7 @@ public final class KeyReleasedCondition implements Predicate<TwoInputStates> { this.key = key; } + @Override public boolean apply(final TwoInputStates states) { final InputState currentState = states.getCurrent(); final InputState previousState = states.getPrevious(); diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonClickedCondition.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonClickedCondition.java index 4c2a5ff..4b3c601 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonClickedCondition.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonClickedCondition.java @@ -39,6 +39,7 @@ public final class MouseButtonClickedCondition implements Predicate<TwoInputStat _button = button; } + @Override public boolean apply(final TwoInputStates states) { final InputState currentState = states.getCurrent(); diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonCondition.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonCondition.java index af19920..54625ae 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonCondition.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonCondition.java @@ -42,6 +42,7 @@ public final class MouseButtonCondition implements Predicate<TwoInputStates> { } } + @Override public boolean apply(final TwoInputStates states) { final InputState currentState = states.getCurrent(); diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonPressedCondition.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonPressedCondition.java index a460517..69f9110 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonPressedCondition.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonPressedCondition.java @@ -39,6 +39,7 @@ public final class MouseButtonPressedCondition implements Predicate<TwoInputStat _button = button; } + @Override public boolean apply(final TwoInputStates states) { final InputState currentState = states.getCurrent(); final InputState previousState = states.getPrevious(); diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonReleasedCondition.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonReleasedCondition.java index f9b0ebb..ea3744d 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonReleasedCondition.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseButtonReleasedCondition.java @@ -39,6 +39,7 @@ public final class MouseButtonReleasedCondition implements Predicate<TwoInputSta _button = button; } + @Override public boolean apply(final TwoInputStates states) { final InputState currentState = states.getCurrent(); final InputState previousState = states.getPrevious(); diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseMovedCondition.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseMovedCondition.java index cf3b47d..9cc2acd 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseMovedCondition.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseMovedCondition.java @@ -19,6 +19,7 @@ import com.google.common.base.Predicate; */ @Immutable public final class MouseMovedCondition implements Predicate<TwoInputStates> { + @Override public boolean apply(final TwoInputStates states) { final InputState currentState = states.getCurrent(); final InputState previousState = states.getPrevious(); diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseWheelMovedCondition.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseWheelMovedCondition.java index 59ccb97..1f68e11 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseWheelMovedCondition.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/MouseWheelMovedCondition.java @@ -19,6 +19,7 @@ import com.google.common.base.Predicate; */ @Immutable public final class MouseWheelMovedCondition implements Predicate<TwoInputStates> { + @Override public boolean apply(final TwoInputStates states) { final InputState currentState = states.getCurrent(); final InputState previousState = states.getPrevious(); diff --git a/ardor3d-core/src/main/java/com/ardor3d/intersection/PickResults.java b/ardor3d-core/src/main/java/com/ardor3d/intersection/PickResults.java index 402b934..283dc27 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/intersection/PickResults.java +++ b/ardor3d-core/src/main/java/com/ardor3d/intersection/PickResults.java @@ -129,6 +129,7 @@ public abstract class PickResults { */ private static class DistanceComparator implements Comparator<PickData> { + @Override public int compare(final PickData o1, final PickData o2) { if (o1.getIntersectionRecord().getClosestDistance() <= o2.getIntersectionRecord().getClosestDistance()) { return -1; diff --git a/ardor3d-core/src/main/java/com/ardor3d/light/Light.java b/ardor3d-core/src/main/java/com/ardor3d/light/Light.java index cf1a9cd..3bd3037 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/light/Light.java +++ b/ardor3d-core/src/main/java/com/ardor3d/light/Light.java @@ -202,7 +202,7 @@ public abstract class Light implements Serializable, Savable { * the specular color value of the light. */ public void setSpecular(final ReadOnlyColorRGBA specular) { - this._specular.set(specular); + _specular.set(specular); } /** @@ -221,7 +221,7 @@ public abstract class Light implements Serializable, Savable { * the diffuse color value for this light. */ public void setDiffuse(final ReadOnlyColorRGBA diffuse) { - this._diffuse.set(diffuse); + _diffuse.set(diffuse); } /** @@ -240,7 +240,7 @@ public abstract class Light implements Serializable, Savable { * the ambient color value for this light. */ public void setAmbient(final ReadOnlyColorRGBA ambient) { - this._ambient.set(ambient); + _ambient.set(ambient); } /** @@ -316,9 +316,10 @@ public abstract class Light implements Serializable, Savable { } public void setName(final String name) { - this._name = name; + _name = name; } + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(_ambient, "ambient", new ColorRGBA(DEFAULT_AMBIENT)); capsule.write(_diffuse, "diffuse", new ColorRGBA(DEFAULT_DIFFUSE)); @@ -334,6 +335,7 @@ public abstract class Light implements Serializable, Savable { capsule.write(_name, "name", null); } + @Override public void read(final InputCapsule capsule) throws IOException { _ambient.set((ColorRGBA) capsule.readSavable("ambient", new ColorRGBA(DEFAULT_AMBIENT))); _diffuse.set((ColorRGBA) capsule.readSavable("diffuse", new ColorRGBA(DEFAULT_DIFFUSE))); @@ -349,6 +351,7 @@ public abstract class Light implements Serializable, Savable { _name = capsule.readString("name", null); } + @Override public Class<? extends Light> getClassTag() { return this.getClass(); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/AbstractFBOTextureRenderer.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/AbstractFBOTextureRenderer.java index f7a8c2e..0bf54fb 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/renderer/AbstractFBOTextureRenderer.java +++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/AbstractFBOTextureRenderer.java @@ -102,18 +102,22 @@ public abstract class AbstractFBOTextureRenderer implements TextureRenderer { * * @return the camera this renderer is using. */ + @Override public Camera getCamera() { return _camera; } + @Override public void setBackgroundColor(final ReadOnlyColorRGBA c) { _backgroundColor.set(c); } + @Override public ReadOnlyColorRGBA getBackgroundColor() { return _backgroundColor; } + @Override public void render(final Spatial toDraw, final Texture tex, final int clear) { try { ContextManager.getCurrentContext().pushFBOTextureRenderer(this); @@ -140,6 +144,7 @@ public abstract class AbstractFBOTextureRenderer implements TextureRenderer { } } + @Override public void render(final Scene toDraw, final Texture tex, final int clear) { try { ContextManager.getCurrentContext().pushFBOTextureRenderer(this); @@ -166,6 +171,7 @@ public abstract class AbstractFBOTextureRenderer implements TextureRenderer { } } + @Override public void render(final List<? extends Spatial> toDraw, final Texture tex, final int clear) { try { ContextManager.getCurrentContext().pushFBOTextureRenderer(this); @@ -257,10 +263,12 @@ public abstract class AbstractFBOTextureRenderer implements TextureRenderer { toDraw.renderUnto(_parentRenderer); } + @Override public int getWidth() { return _width; } + @Override public int getHeight() { return _height; } @@ -269,22 +277,27 @@ public abstract class AbstractFBOTextureRenderer implements TextureRenderer { return _parentRenderer; } + @Override public void setMultipleTargets(final boolean multi) { - // ignore. Does not matter to FBO. + // ignore. Does not matter to FBO. } + @Override public void enforceState(final RenderState state) { _enforcedStates.put(state.getType(), state); } + @Override public void enforceStates(final EnumMap<StateType, RenderState> states) { _enforcedStates.putAll(states); } + @Override public void clearEnforcedState(final StateType type) { _enforcedStates.remove(type); } + @Override public void clearEnforcedStates() { _enforcedStates.clear(); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/AbstractPbufferTextureRenderer.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/AbstractPbufferTextureRenderer.java index a428526..565f531 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/renderer/AbstractPbufferTextureRenderer.java +++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/AbstractPbufferTextureRenderer.java @@ -139,39 +139,48 @@ public abstract class AbstractPbufferTextureRenderer implements TextureRenderer * * @return the camera this renderer is using. */ + @Override public Camera getCamera() { return _camera; } + @Override public void setBackgroundColor(final ReadOnlyColorRGBA c) { _backgroundColor.set(c); _bgColorDirty = true; } + @Override public ReadOnlyColorRGBA getBackgroundColor() { return _backgroundColor; } + @Override public int getWidth() { return _width; } + @Override public int getHeight() { return _height; } + @Override public void enforceState(final RenderState state) { _enforcedStates.put(state.getType(), state); } + @Override public void enforceStates(final EnumMap<StateType, RenderState> states) { _enforcedStates.putAll(states); } + @Override public void clearEnforcedState(final StateType type) { _enforcedStates.remove(type); } + @Override public void clearEnforcedStates() { _enforcedStates.clear(); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/AbstractRenderer.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/AbstractRenderer.java index 8aa7f94..c3b04fd 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/renderer/AbstractRenderer.java +++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/AbstractRenderer.java @@ -58,22 +58,27 @@ public abstract class AbstractRenderer implements Renderer { } } + @Override public boolean isInOrthoMode() { return _inOrthoMode; } + @Override public ReadOnlyColorRGBA getBackgroundColor() { return _backgroundColor; } + @Override public RenderQueue getQueue() { return _queue; } + @Override public boolean isProcessingQueue() { return _processingQueue; } + @Override public void applyState(final StateType type, final RenderState state) { if (Constants.stats) { StatCollector.startStat(StatType.STAT_STATES_TIMER); @@ -165,12 +170,14 @@ public abstract class AbstractRenderer implements Renderer { _stencilClearValue = stencilClearValue; } + @Override public boolean isClipTestEnabled() { final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord record = context.getRendererRecord(); return record.isClippingTestEnabled(); } + @Override public RenderState getProperRenderState(final StateType type, final RenderState current) { final RenderContext context = ContextManager.getCurrentContext(); @@ -189,6 +196,7 @@ public abstract class AbstractRenderer implements Renderer { } } + @Override public void setRenderLogic(final RenderLogic renderLogic) { this.renderLogic = renderLogic; } diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/Camera.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/Camera.java index 3b72a92..c8e3c33 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/renderer/Camera.java +++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/Camera.java @@ -1498,6 +1498,7 @@ public class Camera implements Savable, Externalizable { renderer.setModelViewMatrix(_matrixBuffer); } + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(_location, "location", new Vector3(Vector3.ZERO)); capsule.write(_left, "left", new Vector3(Vector3.UNIT_X)); @@ -1524,6 +1525,7 @@ public class Camera implements Savable, Externalizable { capsule.write(_depthRangeFar, "depthRangeFar", 1.0); } + @Override public void read(final InputCapsule capsule) throws IOException { _location.set((Vector3) capsule.readSavable("location", new Vector3(Vector3.ZERO))); _left.set((Vector3) capsule.readSavable("left", new Vector3(Vector3.UNIT_X))); @@ -1550,6 +1552,7 @@ public class Camera implements Savable, Externalizable { _depthRangeFar = capsule.readDouble("depthRangeFar", 1.0); } + @Override public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException { _location.set((Vector3) in.readObject()); _left.set((Vector3) in.readObject()); @@ -1576,6 +1579,7 @@ public class Camera implements Savable, Externalizable { _depthRangeFar = in.readDouble(); } + @Override public void writeExternal(final ObjectOutput out) throws IOException { out.writeObject(_location); out.writeObject(_left); @@ -1609,6 +1613,7 @@ public class Camera implements Savable, Externalizable { + " left - " + Arrays.toString(getLeft().toArray(null)); } + @Override public Class<? extends Camera> getClassTag() { return getClass(); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/AbstractRenderBucket.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/AbstractRenderBucket.java index 3350df3..89f21c8 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/AbstractRenderBucket.java +++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/AbstractRenderBucket.java @@ -37,6 +37,7 @@ public class AbstractRenderBucket implements RenderBucket { _tempList = new Spatial[_currentList.length]; } + @Override public void add(final Spatial spatial) { spatial._queueDistance = Double.NEGATIVE_INFINITY; if (_currentListSize >= _currentList.length) { @@ -51,6 +52,7 @@ public class AbstractRenderBucket implements RenderBucket { _currentList[_currentListSize++] = spatial; } + @Override public void remove(final Spatial spatial) { int index = 0; for (int i = 0; i < _currentListSize; i++) { @@ -66,6 +68,7 @@ public class AbstractRenderBucket implements RenderBucket { _currentListSize--; } + @Override public void clear() { if (_currentListSize > 0) { Arrays.fill(_currentList, 0, _currentListSize, null); @@ -73,12 +76,14 @@ public class AbstractRenderBucket implements RenderBucket { } } + @Override public void render(final Renderer renderer) { for (int i = 0; i < _currentListSize; i++) { _currentList[i].draw(renderer); } } + @Override public void sort() { // only sort if we have more than one item in our bucket. if (_currentListSize > 1) { @@ -98,6 +103,7 @@ public class AbstractRenderBucket implements RenderBucket { } } + @Override public void pushBucket() { _listStack.push(_currentList); if (_listStackPool.isEmpty()) { @@ -110,6 +116,7 @@ public class AbstractRenderBucket implements RenderBucket { _currentListSize = 0; } + @Override public void popBucket() { if (_currentList != null) { _listStackPool.push(_currentList); diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/OpaqueRenderBucket.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/OpaqueRenderBucket.java index f74e9a3..a5de698 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/OpaqueRenderBucket.java +++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/OpaqueRenderBucket.java @@ -27,6 +27,7 @@ public class OpaqueRenderBucket extends AbstractRenderBucket { } private class OpaqueComparator implements Comparator<Spatial> { + @Override public int compare(final Spatial o1, final Spatial o2) { if (o1 instanceof Mesh && o2 instanceof Mesh) { return compareByStates((Mesh) o1, (Mesh) o2); @@ -50,12 +51,20 @@ public class OpaqueRenderBucket extends AbstractRenderBucket { private int compareByStates(final Mesh mesh1, final Mesh mesh2) { final TextureState ts1 = (TextureState) mesh1.getWorldRenderState(RenderState.StateType.Texture); final TextureState ts2 = (TextureState) mesh2.getWorldRenderState(RenderState.StateType.Texture); - if (ts1 == ts2) { - return 0; - } else if (ts1 == null && ts2 != null) { - return -1; - } else if (ts2 == null && ts1 != null) { - return 1; + if (ts1 == null) { + if (ts2 == null) { + return 0; + } else { + return -1; + } + } else { + if (ts2 == null) { + return 1; + } else { + if (ts1 == ts2) { + return 0; + } + } } for (int x = 0, maxIndex = Math.min(ts1.getMaxTextureIndexUsed(), ts2.getMaxTextureIndexUsed()); x <= maxIndex; x++) { diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/OrthoRenderBucket.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/OrthoRenderBucket.java index fa4f8c3..3655bc1 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/OrthoRenderBucket.java +++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/OrthoRenderBucket.java @@ -38,6 +38,7 @@ public class OrthoRenderBucket extends AbstractRenderBucket { } private static class OrthoComparator implements Comparator<Spatial> { + @Override public int compare(final Spatial o1, final Spatial o2) { if (o2.getSceneHints().getOrthoOrder() == o1.getSceneHints().getOrthoOrder()) { return 0; diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/TransparentRenderBucket.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/TransparentRenderBucket.java index fe3e73d..06953aa 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/TransparentRenderBucket.java +++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/queue/TransparentRenderBucket.java @@ -16,10 +16,10 @@ import com.ardor3d.renderer.ContextManager; import com.ardor3d.renderer.RenderContext; import com.ardor3d.renderer.Renderer; import com.ardor3d.renderer.state.CullState; -import com.ardor3d.renderer.state.RenderState; -import com.ardor3d.renderer.state.ZBufferState; import com.ardor3d.renderer.state.CullState.Face; +import com.ardor3d.renderer.state.RenderState; import com.ardor3d.renderer.state.RenderState.StateType; +import com.ardor3d.renderer.state.ZBufferState; import com.ardor3d.scenegraph.Mesh; import com.ardor3d.scenegraph.Spatial; import com.ardor3d.scenegraph.hint.TransparencyType; @@ -120,6 +120,7 @@ public class TransparentRenderBucket extends AbstractRenderBucket { } private class TransparentComparator implements Comparator<Spatial> { + @Override public int compare(final Spatial o1, final Spatial o2) { final double d1 = distanceToCam(o1); final double d2 = distanceToCam(o2); diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/state/LightUtil.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/state/LightUtil.java index 112a955..643f462 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/renderer/state/LightUtil.java +++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/state/LightUtil.java @@ -32,6 +32,7 @@ public abstract class LightUtil { _sp = sp; } + @Override public int compare(final Light l1, final Light l2) { final double v1 = getValueFor(l1, _sp.getWorldBound()); final double v2 = getValueFor(l2, _sp.getWorldBound()); diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/state/RenderState.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/state/RenderState.java index 560daf7..4f4bef5 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/renderer/state/RenderState.java +++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/state/RenderState.java @@ -196,14 +196,17 @@ public abstract class RenderState implements Savable { return stack.peek(); } + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(_enabled, "enabled", true); } + @Override public void read(final InputCapsule capsule) throws IOException { _enabled = capsule.readBoolean("enabled", true); } + @Override public Class<? extends RenderState> getClassTag() { return this.getClass(); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/AbstractBufferData.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/AbstractBufferData.java index 9274fb0..6eb0b3d 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/AbstractBufferData.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/AbstractBufferData.java @@ -39,6 +39,7 @@ public abstract class AbstractBufferData<T extends Buffer> { static { ContextManager.addContextCleanListener(new ContextCleanListener() { + @Override public void cleanForContext(final RenderContext renderContext) { AbstractBufferData.cleanAllVBOs(null, renderContext); } @@ -301,6 +302,7 @@ public abstract class AbstractBufferData<T extends Buffer> { else { GameTaskQueueManager.getManager(ContextManager.getContextForRef(glref)).render( new RendererCallable<Void>() { + @Override public Void call() throws Exception { getRenderer().deleteVBOs(idMap.get(glref)); return null; diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/ByteBufferData.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/ByteBufferData.java index 4091e06..7f34ce3 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/ByteBufferData.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/ByteBufferData.java @@ -50,6 +50,7 @@ public class ByteBufferData extends IndexBufferData<ByteBuffer> implements Savab _buffer = buffer; } + @Override public Class<? extends ByteBufferData> getClassTag() { return getClass(); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/FloatBufferData.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/FloatBufferData.java index 19d0a16..3f5c383 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/FloatBufferData.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/FloatBufferData.java @@ -126,6 +126,7 @@ public class FloatBufferData extends AbstractBufferData<FloatBuffer> implements return copy; } + @Override public Class<? extends FloatBufferData> getClassTag() { return getClass(); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/IntBufferData.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/IntBufferData.java index 219a729..6290f88 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/IntBufferData.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/IntBufferData.java @@ -49,6 +49,7 @@ public class IntBufferData extends IndexBufferData<IntBuffer> implements Savable _buffer = buffer; } + @Override public Class<? extends IntBufferData> getClassTag() { return getClass(); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/Mesh.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/Mesh.java index b81eb1c..f238cb4 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/Mesh.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/Mesh.java @@ -238,6 +238,7 @@ public class Mesh extends Spatial implements Renderable, Pickable { return store; } + @Override public void render(final Renderer renderer) { if (isVisible()) { render(renderer, getMeshData()); diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/ShortBufferData.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/ShortBufferData.java index 5d8f8f8..7d23a84 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/ShortBufferData.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/ShortBufferData.java @@ -50,6 +50,7 @@ public class ShortBufferData extends IndexBufferData<ShortBuffer> implements Sav _buffer = buffer; } + @Override public Class<? extends ShortBufferData> getClassTag() { return getClass(); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/Spatial.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/Spatial.java index 14d8da4..dc837f3 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/Spatial.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/Spatial.java @@ -258,6 +258,7 @@ public abstract class Spatial implements Savable, Hintable { /** * @see Hintable#getParentHintable() */ + @Override public Hintable getParentHintable() { return _parent; } @@ -267,6 +268,7 @@ public abstract class Spatial implements Savable, Hintable { * * @return the scene hints set on this Spatial */ + @Override public SceneHints getSceneHints() { return _sceneHints; } @@ -1349,6 +1351,7 @@ public abstract class Spatial implements Savable, Hintable { /** * @see Savable#getClassTag() */ + @Override public Class<? extends Spatial> getClassTag() { return this.getClass(); } @@ -1360,6 +1363,7 @@ public abstract class Spatial implements Savable, Hintable { * Signals that an I/O exception has occurred. * @see Savable#read(InputCapsule) */ + @Override public void read(final InputCapsule capsule) throws IOException { _name = capsule.readString("name", null); @@ -1398,6 +1402,7 @@ public abstract class Spatial implements Savable, Hintable { * Signals that an I/O exception has occurred. * @see Savable#write(OutputCapsule) */ + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(_name, "name", null); diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/controller/ComplexSpatialController.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/controller/ComplexSpatialController.java index 909a004..a8c028d 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/controller/ComplexSpatialController.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/controller/ComplexSpatialController.java @@ -199,8 +199,10 @@ public abstract class ComplexSpatialController<T extends Spatial> implements Spa return RepeatType.CYCLE.equals(getRepeatType()); } + @Override public abstract void update(double time, T caller); + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(_repeatType, "repeatType", RepeatType.CLAMP); capsule.write(_minTime, "minTime", 0); @@ -209,6 +211,7 @@ public abstract class ComplexSpatialController<T extends Spatial> implements Spa capsule.write(_active, "active", true); } + @Override public void read(final InputCapsule capsule) throws IOException { _repeatType = capsule.readEnum("repeatType", RepeatType.class, RepeatType.CLAMP); _minTime = capsule.readDouble("minTime", 0); @@ -217,6 +220,7 @@ public abstract class ComplexSpatialController<T extends Spatial> implements Spa _active = capsule.readBoolean("active", true); } + @Override @SuppressWarnings("rawtypes") public Class<? extends ComplexSpatialController> getClassTag() { return this.getClass(); diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/event/SceneGraphManager.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/event/SceneGraphManager.java index 3300c6d..ba65860 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/event/SceneGraphManager.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/event/SceneGraphManager.java @@ -47,6 +47,7 @@ public class SceneGraphManager implements DirtyEventListener { _listeners.remove(listener); } + @Override public boolean spatialDirty(final Spatial spatial, final DirtyType dirtyType) { for (final DirtyEventListener listener : _listeners) { listener.spatialDirty(spatial, dirtyType); @@ -54,6 +55,7 @@ public class SceneGraphManager implements DirtyEventListener { return false; } + @Override public boolean spatialClean(final Spatial spatial, final DirtyType dirtyType) { for (final DirtyEventListener listener : _listeners) { listener.spatialClean(spatial, dirtyType); diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/extension/PassNodeState.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/extension/PassNodeState.java index c34d4f9..abbc917 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/extension/PassNodeState.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/extension/PassNodeState.java @@ -99,16 +99,19 @@ public class PassNodeState implements Savable, Serializable { _enabled = enabled; } + @Override public Class<? extends PassNodeState> getClassTag() { return this.getClass(); } + @Override public void write(final OutputCapsule capsule) throws IOException { final OutputCapsule oc = capsule; oc.write(_enabled, "enabled", true); oc.write(_passStates.values().toArray(new RenderState[0]), "passStates", null); } + @Override public void read(final InputCapsule capsule) throws IOException { final InputCapsule ic = capsule; _enabled = ic.readBoolean("enabled", true); diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/hint/SceneHints.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/hint/SceneHints.java index 36a239c..5bde95b 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/hint/SceneHints.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/hint/SceneHints.java @@ -448,10 +448,12 @@ public class SceneHints implements Savable { // Methods for Savable // ///////////////// + @Override public Class<? extends SceneHints> getClassTag() { return this.getClass(); } + @Override public void read(final InputCapsule capsule) throws IOException { _orthoOrder = capsule.readInt("orthoOrder", 0); _cullHint = capsule.readEnum("cullMode", CullHint.class, CullHint.Inherit); @@ -478,6 +480,7 @@ public class SceneHints implements Savable { } } + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(_orthoOrder, "orthoOrder", 0); capsule.write(_cullHint, "cullMode", CullHint.Inherit); diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/visitor/DeleteVBOsVisitor.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/visitor/DeleteVBOsVisitor.java index 03c075a..d9299d8 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/visitor/DeleteVBOsVisitor.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/visitor/DeleteVBOsVisitor.java @@ -22,6 +22,7 @@ public class DeleteVBOsVisitor implements Visitor { _deleter = deleter; } + @Override public void visit(final Spatial spatial) { if (spatial instanceof Mesh) { final Mesh mesh = (Mesh) spatial; diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/visitor/SetModelBoundVisitor.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/visitor/SetModelBoundVisitor.java index 9e809df..509c37f 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/visitor/SetModelBoundVisitor.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/visitor/SetModelBoundVisitor.java @@ -21,6 +21,7 @@ public class SetModelBoundVisitor implements Visitor { _bound = bound; } + @Override public void visit(final Spatial spatial) { if (spatial instanceof Mesh) { ((Mesh) spatial).setModelBound(_bound.clone(null)); diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/visitor/UpdateModelBoundVisitor.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/visitor/UpdateModelBoundVisitor.java index b313613..f3e3525 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/visitor/UpdateModelBoundVisitor.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/visitor/UpdateModelBoundVisitor.java @@ -14,6 +14,7 @@ import com.ardor3d.scenegraph.Mesh; import com.ardor3d.scenegraph.Spatial; public class UpdateModelBoundVisitor implements Visitor { + @Override public void visit(final Spatial spatial) { if (spatial instanceof Mesh) { ((Mesh) spatial).updateModelBound(); diff --git a/ardor3d-core/src/main/java/com/ardor3d/spline/CatmullRomSpline.java b/ardor3d-core/src/main/java/com/ardor3d/spline/CatmullRomSpline.java index 14ceb0c..0d39f4a 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/spline/CatmullRomSpline.java +++ b/ardor3d-core/src/main/java/com/ardor3d/spline/CatmullRomSpline.java @@ -32,6 +32,7 @@ public class CatmullRomSpline implements Spline { /** * @see #interpolate(ReadOnlyVector3, ReadOnlyVector3, ReadOnlyVector3, ReadOnlyVector3, double, Vector3) */ + @Override public Vector3 interpolate(final ReadOnlyVector3 p0, final ReadOnlyVector3 p1, final ReadOnlyVector3 p2, final ReadOnlyVector3 p3, final double t) { @@ -56,6 +57,7 @@ public class CatmullRomSpline implements Spline { * The results from the interpolation will be stored in this vector. * @return The result vector as a convenience. */ + @Override public Vector3 interpolate(final ReadOnlyVector3 p0, final ReadOnlyVector3 p1, final ReadOnlyVector3 p2, final ReadOnlyVector3 p3, final double t, final Vector3 result) { diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/GameTask.java b/ardor3d-core/src/main/java/com/ardor3d/util/GameTask.java index 6811d5c..70b4dc4 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/GameTask.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/GameTask.java @@ -42,6 +42,7 @@ public class GameTask<V> implements Future<V> { * @param mayInterruptIfRunning * ignored by this implementation. */ + @Override public boolean cancel(final boolean mayInterruptIfRunning) { _stateLock.lock(); try { @@ -58,6 +59,7 @@ public class GameTask<V> implements Future<V> { } } + @Override public V get() throws InterruptedException, ExecutionException { _stateLock.lock(); try { @@ -73,6 +75,7 @@ public class GameTask<V> implements Future<V> { } } + @Override public V get(final long timeout, final TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { _stateLock.lock(); @@ -92,6 +95,7 @@ public class GameTask<V> implements Future<V> { } } + @Override public boolean isCancelled() { _stateLock.lock(); try { @@ -101,6 +105,7 @@ public class GameTask<V> implements Future<V> { } } + @Override public boolean isDone() { _stateLock.lock(); try { diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/LittleEndianDataInput.java b/ardor3d-core/src/main/java/com/ardor3d/util/LittleEndianDataInput.java index c3c8ec4..914364e 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/LittleEndianDataInput.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/LittleEndianDataInput.java @@ -41,6 +41,7 @@ public class LittleEndianDataInput implements DataInput { _stream = new BufferedInputStream(in); } + @Override public final int readUnsignedShort() throws IOException { return (_stream.read() & 0xff) | ((_stream.read() & 0xff) << 8); } @@ -53,31 +54,38 @@ public class LittleEndianDataInput implements DataInput { .read() & 0xff)) << 24)); } + @Override public final boolean readBoolean() throws IOException { return (_stream.read() != 0); } + @Override public final byte readByte() throws IOException { return (byte) _stream.read(); } + @Override public final int readUnsignedByte() throws IOException { return _stream.read(); } + @Override public final short readShort() throws IOException { return (short) readUnsignedShort(); } + @Override public final char readChar() throws IOException { return (char) readUnsignedShort(); } + @Override public final int readInt() throws IOException { return ((_stream.read() & 0xff) | ((_stream.read() & 0xff) << 8) | ((_stream.read() & 0xff) << 16) | ((_stream .read() & 0xff) << 24)); } + @Override public final long readLong() throws IOException { return ((_stream.read() & 0xff) | ((long) (_stream.read() & 0xff) << 8) | ((long) (_stream.read() & 0xff) << 16) | ((long) (_stream.read() & 0xff) << 24) @@ -85,18 +93,22 @@ public class LittleEndianDataInput implements DataInput { | ((long) (_stream.read() & 0xff) << 48) | ((long) (_stream.read() & 0xff) << 56)); } + @Override public final float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); } + @Override public final double readDouble() throws IOException { return Double.longBitsToDouble(readLong()); } + @Override public final void readFully(final byte b[]) throws IOException { readFully(b, 0, b.length); } + @Override public final void readFully(final byte b[], final int off, final int len) throws IOException { // this may look over-complicated, but the problem is that the InputStream.read() methods are // not guaranteed to fill up the buffer you pass to it. So we need to loop until we have filled @@ -114,14 +126,17 @@ public class LittleEndianDataInput implements DataInput { } } + @Override public final int skipBytes(final int n) throws IOException { return (int) _stream.skip(n); } + @Override public final String readLine() throws IOException { throw new IOException("Unsupported operation"); } + @Override public final String readUTF() throws IOException { throw new IOException("Unsupported operation"); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/LittleEndianRandomAccessDataInput.java b/ardor3d-core/src/main/java/com/ardor3d/util/LittleEndianRandomAccessDataInput.java index 33ced8f..e32140d 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/LittleEndianRandomAccessDataInput.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/LittleEndianRandomAccessDataInput.java @@ -59,6 +59,7 @@ public class LittleEndianRandomAccessDataInput implements DataInput { _contents = contents; } + @Override public final int readUnsignedShort() throws IOException { return (readByte() & 0xff) | ((readByte() & 0xff) << 8); } @@ -67,48 +68,59 @@ public class LittleEndianRandomAccessDataInput implements DataInput { return ((readByte() & 0xff) | ((readByte() & 0xff) << 8) | ((readByte() & 0xff) << 16) | (((long) (readByte() & 0xff)) << 24)); } + @Override public final boolean readBoolean() throws IOException { return (readByte() != 0); } + @Override public final byte readByte() throws IOException { return _contents.get(); } + @Override public final int readUnsignedByte() throws IOException { return readByte() & 0xff; } + @Override public final short readShort() throws IOException { return (short) readUnsignedShort(); } + @Override public final char readChar() throws IOException { return (char) readUnsignedShort(); } + @Override public final int readInt() throws IOException { return ((readByte() & 0xff) | ((readByte() & 0xff) << 8) | ((readByte() & 0xff) << 16) | ((readByte() & 0xff) << 24)); } + @Override public final long readLong() throws IOException { return ((readByte() & 0xff) | ((long) (readByte() & 0xff) << 8) | ((long) (readByte() & 0xff) << 16) | ((long) (readByte() & 0xff) << 24) | ((long) (readByte() & 0xff) << 32) | ((long) (readByte() & 0xff) << 40) | ((long) (readByte() & 0xff) << 48) | ((long) (readByte() & 0xff) << 56)); } + @Override public final float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); } + @Override public final double readDouble() throws IOException { return Double.longBitsToDouble(readLong()); } + @Override public final void readFully(final byte b[]) throws IOException { readFully(b, 0, b.length); } + @Override public final void readFully(final byte b[], final int off, final int len) throws IOException { if (len - off + _contents.position() > _contents.capacity()) { throw new EOFException("EOF reached"); @@ -117,6 +129,7 @@ public class LittleEndianRandomAccessDataInput implements DataInput { } } + @Override public final int skipBytes(final int n) throws IOException { if (_contents.remaining() >= n) { _contents.position(_contents.position() + n); @@ -155,6 +168,7 @@ public class LittleEndianRandomAccessDataInput implements DataInput { * @throws IOException * if this method is called. */ + @Override public final String readLine() throws IOException { throw new IOException("operation unsupported."); } @@ -165,6 +179,7 @@ public class LittleEndianRandomAccessDataInput implements DataInput { * @throws IOException * if this method is called. */ + @Override public final String readUTF() throws IOException { throw new IOException("operation unsupported."); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/TextureKey.java b/ardor3d-core/src/main/java/com/ardor3d/util/TextureKey.java index a8b7bb9..fe0274b 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/TextureKey.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/TextureKey.java @@ -394,10 +394,12 @@ final public class TextureKey implements Savable { // Methods for Savable // ///////////////// + @Override public Class<? extends TextureKey> getClassTag() { return this.getClass(); } + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(_source, "source", null); capsule.write(_flipped, "flipped", false); @@ -406,6 +408,7 @@ final public class TextureKey implements Savable { capsule.write(_id, "id", null); } + @Override public void read(final InputCapsule capsule) throws IOException { _source = (ResourceSource) capsule.readSavable("source", null); _flipped = capsule.readBoolean("flipped", false); diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/Timer.java b/ardor3d-core/src/main/java/com/ardor3d/util/Timer.java index 4f99a60..40ccaed 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/Timer.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/Timer.java @@ -27,22 +27,27 @@ public class Timer implements ReadOnlyTimer { _startTime = System.nanoTime(); } + @Override public double getTimeInSeconds() { return getTime() * INVERSE_TIMER_RESOLUTION; } + @Override public long getTime() { return System.nanoTime() - _startTime; } + @Override public long getResolution() { return TIMER_RESOLUTION; } + @Override public double getFrameRate() { return _fps; } + @Override public double getTimePerFrame() { return _tpf; } diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryExporter.java b/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryExporter.java index 1c3359c..471e053 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryExporter.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryExporter.java @@ -147,6 +147,7 @@ public class BinaryExporter implements Ardor3dExporter { _compression = compression; } + @Override public void save(final Savable object, final OutputStream os) throws IOException { try { GZIPOutputStream zos = new GZIPOutputStream(os) { @@ -297,6 +298,7 @@ public class BinaryExporter implements Ardor3dExporter { return bytes; } + @Override public void save(final Savable object, final File file) throws IOException { final File parentDirectory = file.getParentFile(); if (parentDirectory != null && !parentDirectory.exists()) { diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryImporter.java b/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryImporter.java index 6e2c847..3c0a4d2 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryImporter.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryImporter.java @@ -50,6 +50,7 @@ public class BinaryImporter implements Ardor3dImporter { public BinaryImporter() {} + @Override public Savable load(final InputStream is) throws IOException { return load(is, null, null); } @@ -155,6 +156,7 @@ public class BinaryImporter implements Ardor3dImporter { } } + @Override public Savable load(final URL url) throws IOException { return load(url, null); } @@ -166,6 +168,7 @@ public class BinaryImporter implements Ardor3dImporter { return rVal; } + @Override public Savable load(final File file) throws IOException { return load(file, null); } @@ -177,6 +180,7 @@ public class BinaryImporter implements Ardor3dImporter { return rVal; } + @Override public Savable load(final byte[] data) throws IOException { final ByteArrayInputStream bais = new ByteArrayInputStream(data); final Savable rVal = load(bais); @@ -243,15 +247,14 @@ public class BinaryImporter implements Ardor3dImporter { + "Some types may require the annotation SavableFactory. Please double check.", e); throw new Ardor3dException(e); } catch (final NoSuchMethodException e) { - logger - .logp( - Level.SEVERE, - this.getClass().toString(), - "readObject(int)", - e.getMessage() - + " \n" - + "Method specified in annotation does not appear to exist or has an invalid method signature.", - e); + logger.logp( + Level.SEVERE, + this.getClass().toString(), + "readObject(int)", + e.getMessage() + + " \n" + + "Method specified in annotation does not appear to exist or has an invalid method signature.", + e); throw new Ardor3dException(e); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryInputCapsule.java b/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryInputCapsule.java index ade60ff..3d99d16 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryInputCapsule.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryInputCapsule.java @@ -227,6 +227,7 @@ public class BinaryInputCapsule implements InputCapsule { } } + @Override public BitSet readBitSet(final String name, final BitSet defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -235,6 +236,7 @@ public class BinaryInputCapsule implements InputCapsule { return (BitSet) _fieldData.get(field._alias); } + @Override public boolean readBoolean(final String name, final boolean defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -243,6 +245,7 @@ public class BinaryInputCapsule implements InputCapsule { return ((Boolean) _fieldData.get(field._alias)).booleanValue(); } + @Override public boolean[] readBooleanArray(final String name, final boolean[] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -251,6 +254,7 @@ public class BinaryInputCapsule implements InputCapsule { return (boolean[]) _fieldData.get(field._alias); } + @Override public boolean[][] readBooleanArray2D(final String name, final boolean[][] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -259,6 +263,7 @@ public class BinaryInputCapsule implements InputCapsule { return (boolean[][]) _fieldData.get(field._alias); } + @Override public byte readByte(final String name, final byte defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -267,6 +272,7 @@ public class BinaryInputCapsule implements InputCapsule { return ((Byte) _fieldData.get(field._alias)).byteValue(); } + @Override public byte[] readByteArray(final String name, final byte[] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -275,6 +281,7 @@ public class BinaryInputCapsule implements InputCapsule { return (byte[]) _fieldData.get(field._alias); } + @Override public byte[][] readByteArray2D(final String name, final byte[][] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -283,6 +290,7 @@ public class BinaryInputCapsule implements InputCapsule { return (byte[][]) _fieldData.get(field._alias); } + @Override public ByteBuffer readByteBuffer(final String name, final ByteBuffer defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -291,6 +299,7 @@ public class BinaryInputCapsule implements InputCapsule { return (ByteBuffer) _fieldData.get(field._alias); } + @Override @SuppressWarnings("unchecked") public List<ByteBuffer> readByteBufferList(final String name, final List<ByteBuffer> defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); @@ -300,6 +309,7 @@ public class BinaryInputCapsule implements InputCapsule { return (List<ByteBuffer>) _fieldData.get(field._alias); } + @Override public double readDouble(final String name, final double defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -308,6 +318,7 @@ public class BinaryInputCapsule implements InputCapsule { return ((Double) _fieldData.get(field._alias)).doubleValue(); } + @Override public double[] readDoubleArray(final String name, final double[] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -316,6 +327,7 @@ public class BinaryInputCapsule implements InputCapsule { return (double[]) _fieldData.get(field._alias); } + @Override public double[][] readDoubleArray2D(final String name, final double[][] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -324,6 +336,7 @@ public class BinaryInputCapsule implements InputCapsule { return (double[][]) _fieldData.get(field._alias); } + @Override public float readFloat(final String name, final float defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -332,6 +345,7 @@ public class BinaryInputCapsule implements InputCapsule { return ((Float) _fieldData.get(field._alias)).floatValue(); } + @Override public float[] readFloatArray(final String name, final float[] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -340,6 +354,7 @@ public class BinaryInputCapsule implements InputCapsule { return (float[]) _fieldData.get(field._alias); } + @Override public float[][] readFloatArray2D(final String name, final float[][] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -348,6 +363,7 @@ public class BinaryInputCapsule implements InputCapsule { return (float[][]) _fieldData.get(field._alias); } + @Override public FloatBuffer readFloatBuffer(final String name, final FloatBuffer defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -356,6 +372,7 @@ public class BinaryInputCapsule implements InputCapsule { return (FloatBuffer) _fieldData.get(field._alias); } + @Override @SuppressWarnings("unchecked") public List<FloatBuffer> readFloatBufferList(final String name, final List<FloatBuffer> defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); @@ -365,6 +382,7 @@ public class BinaryInputCapsule implements InputCapsule { return (List<FloatBuffer>) _fieldData.get(field._alias); } + @Override public int readInt(final String name, final int defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -373,6 +391,7 @@ public class BinaryInputCapsule implements InputCapsule { return ((Integer) _fieldData.get(field._alias)).intValue(); } + @Override public int[] readIntArray(final String name, final int[] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -381,6 +400,7 @@ public class BinaryInputCapsule implements InputCapsule { return (int[]) _fieldData.get(field._alias); } + @Override public int[][] readIntArray2D(final String name, final int[][] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -389,6 +409,7 @@ public class BinaryInputCapsule implements InputCapsule { return (int[][]) _fieldData.get(field._alias); } + @Override public IntBuffer readIntBuffer(final String name, final IntBuffer defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -397,6 +418,7 @@ public class BinaryInputCapsule implements InputCapsule { return (IntBuffer) _fieldData.get(field._alias); } + @Override public long readLong(final String name, final long defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -405,6 +427,7 @@ public class BinaryInputCapsule implements InputCapsule { return ((Long) _fieldData.get(field._alias)).longValue(); } + @Override public long[] readLongArray(final String name, final long[] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -413,6 +436,7 @@ public class BinaryInputCapsule implements InputCapsule { return (long[]) _fieldData.get(field._alias); } + @Override public long[][] readLongArray2D(final String name, final long[][] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -421,6 +445,7 @@ public class BinaryInputCapsule implements InputCapsule { return (long[][]) _fieldData.get(field._alias); } + @Override public Savable readSavable(final String name, final Savable defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -438,6 +463,7 @@ public class BinaryInputCapsule implements InputCapsule { } } + @Override public Savable[] readSavableArray(final String name, final Savable[] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -466,6 +492,7 @@ public class BinaryInputCapsule implements InputCapsule { } } + @Override public Savable[][] readSavableArray2D(final String name, final Savable[][] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -548,6 +575,7 @@ public class BinaryInputCapsule implements InputCapsule { return map; } + @Override @SuppressWarnings("unchecked") public <E extends Savable> List<E> readSavableList(final String name, final List<E> defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); @@ -564,6 +592,7 @@ public class BinaryInputCapsule implements InputCapsule { return (List<E>) value; } + @Override @SuppressWarnings("unchecked") public <E extends Savable> List<E>[] readSavableListArray(final String name, final List<E>[] defVal) throws IOException { @@ -589,6 +618,7 @@ public class BinaryInputCapsule implements InputCapsule { return (List<E>[]) value; } + @Override @SuppressWarnings("unchecked") public <E extends Savable> List<E>[][] readSavableListArray2D(final String name, final List<E>[][] defVal) throws IOException { @@ -617,6 +647,7 @@ public class BinaryInputCapsule implements InputCapsule { return (List<E>[][]) value; } + @Override @SuppressWarnings("unchecked") public <K extends Savable, V extends Savable> Map<K, V> readSavableMap(final String name, final Map<K, V> defVal) throws IOException { @@ -634,6 +665,7 @@ public class BinaryInputCapsule implements InputCapsule { return (Map<K, V>) value; } + @Override @SuppressWarnings("unchecked") public <V extends Savable> Map<String, V> readStringSavableMap(final String name, final Map<String, V> defVal) throws IOException { @@ -652,6 +684,7 @@ public class BinaryInputCapsule implements InputCapsule { return (Map<String, V>) value; } + @Override public short readShort(final String name, final short defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -660,6 +693,7 @@ public class BinaryInputCapsule implements InputCapsule { return ((Short) _fieldData.get(field._alias)).shortValue(); } + @Override public short[] readShortArray(final String name, final short[] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -668,6 +702,7 @@ public class BinaryInputCapsule implements InputCapsule { return (short[]) _fieldData.get(field._alias); } + @Override public short[][] readShortArray2D(final String name, final short[][] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -676,6 +711,7 @@ public class BinaryInputCapsule implements InputCapsule { return (short[][]) _fieldData.get(field._alias); } + @Override public ShortBuffer readShortBuffer(final String name, final ShortBuffer defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -684,6 +720,7 @@ public class BinaryInputCapsule implements InputCapsule { return (ShortBuffer) _fieldData.get(field._alias); } + @Override public String readString(final String name, final String defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -692,6 +729,7 @@ public class BinaryInputCapsule implements InputCapsule { return (String) _fieldData.get(field._alias); } + @Override public String[] readStringArray(final String name, final String[] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -700,6 +738,7 @@ public class BinaryInputCapsule implements InputCapsule { return (String[]) _fieldData.get(field._alias); } + @Override public String[][] readStringArray2D(final String name, final String[][] defVal) throws IOException { final BinaryClassField field = _cObj._nameFields.get(name); if (field == null || !_fieldData.containsKey(field._alias)) { @@ -1389,6 +1428,7 @@ public class BinaryInputCapsule implements InputCapsule { public ID[] values; } + @Override public <T extends Enum<T>> T readEnum(final String name, final Class<T> enumType, final T defVal) throws IOException { final String eVal = readString(name, defVal != null ? defVal.name() : null); @@ -1399,6 +1439,7 @@ public class BinaryInputCapsule implements InputCapsule { } } + @Override @SuppressWarnings("unchecked") public <T extends Enum<T>> T[] readEnumArray(final String name, final Class<T> enumType, final T[] defVal) throws IOException { diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryOutputCapsule.java b/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryOutputCapsule.java index 82a14dd..996cbd7 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryOutputCapsule.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/export/binary/BinaryOutputCapsule.java @@ -53,6 +53,7 @@ public class BinaryOutputCapsule implements OutputCapsule { _forceDirectNioBuffers = forceDirectNioBuffers; } + @Override public void write(final byte value, final String name, final byte defVal) throws IOException { if (value == defVal) { return; @@ -61,6 +62,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final byte[] value, final String name, final byte[] defVal) throws IOException { if (value == defVal) { return; @@ -69,6 +71,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final byte[][] value, final String name, final byte[][] defVal) throws IOException { if (value == defVal) { return; @@ -77,6 +80,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final int value, final String name, final int defVal) throws IOException { if (value == defVal) { return; @@ -85,6 +89,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final int[] value, final String name, final int[] defVal) throws IOException { if (value == defVal) { return; @@ -93,6 +98,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final int[][] value, final String name, final int[][] defVal) throws IOException { if (value == defVal) { return; @@ -101,6 +107,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final float value, final String name, final float defVal) throws IOException { if (value == defVal) { return; @@ -109,6 +116,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final float[] value, final String name, final float[] defVal) throws IOException { if (value == defVal) { return; @@ -117,6 +125,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final float[][] value, final String name, final float[][] defVal) throws IOException { if (value == defVal) { return; @@ -125,6 +134,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final double value, final String name, final double defVal) throws IOException { if (value == defVal) { return; @@ -133,6 +143,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final double[] value, final String name, final double[] defVal) throws IOException { if (value == defVal) { return; @@ -141,6 +152,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final double[][] value, final String name, final double[][] defVal) throws IOException { if (value == defVal) { return; @@ -149,6 +161,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final long value, final String name, final long defVal) throws IOException { if (value == defVal) { return; @@ -157,6 +170,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final long[] value, final String name, final long[] defVal) throws IOException { if (value == defVal) { return; @@ -165,6 +179,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final long[][] value, final String name, final long[][] defVal) throws IOException { if (value == defVal) { return; @@ -173,6 +188,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final short value, final String name, final short defVal) throws IOException { if (value == defVal) { return; @@ -181,6 +197,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final short[] value, final String name, final short[] defVal) throws IOException { if (value == defVal) { return; @@ -189,6 +206,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final short[][] value, final String name, final short[][] defVal) throws IOException { if (value == defVal) { return; @@ -197,6 +215,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final boolean value, final String name, final boolean defVal) throws IOException { if (value == defVal) { return; @@ -205,6 +224,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final boolean[] value, final String name, final boolean[] defVal) throws IOException { if (value == defVal) { return; @@ -213,6 +233,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final boolean[][] value, final String name, final boolean[][] defVal) throws IOException { if (value == defVal) { return; @@ -221,6 +242,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final String value, final String name, final String defVal) throws IOException { if (value == null ? defVal == null : value.equals(defVal)) { return; @@ -229,6 +251,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final String[] value, final String name, final String[] defVal) throws IOException { if (value == defVal) { return; @@ -237,6 +260,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final String[][] value, final String name, final String[][] defVal) throws IOException { if (value == defVal) { return; @@ -245,6 +269,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final BitSet value, final String name, final BitSet defVal) throws IOException { if (value == defVal) { return; @@ -253,6 +278,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final Savable object, final String name, final Savable defVal) throws IOException { if (object == defVal) { return; @@ -261,6 +287,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(object); } + @Override public void write(final Savable[] objects, final String name, final Savable[] defVal) throws IOException { if (objects == defVal) { return; @@ -269,6 +296,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(objects); } + @Override public void write(final Savable[][] objects, final String name, final Savable[][] defVal) throws IOException { if (objects == defVal) { return; @@ -277,6 +305,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(objects); } + @Override public void write(final FloatBuffer value, final String name, final FloatBuffer defVal) throws IOException { if (value == defVal) { return; @@ -285,6 +314,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final IntBuffer value, final String name, final IntBuffer defVal) throws IOException { if (value == defVal) { return; @@ -293,6 +323,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final ByteBuffer value, final String name, final ByteBuffer defVal) throws IOException { if (value == defVal) { return; @@ -301,6 +332,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void write(final ShortBuffer value, final String name, final ShortBuffer defVal) throws IOException { if (value == defVal) { return; @@ -309,6 +341,7 @@ public class BinaryOutputCapsule implements OutputCapsule { write(value); } + @Override public void writeFloatBufferList(final List<FloatBuffer> array, final String name, final List<FloatBuffer> defVal) throws IOException { if (array == defVal) { @@ -318,6 +351,7 @@ public class BinaryOutputCapsule implements OutputCapsule { writeFloatBufferArrayList(array); } + @Override public void writeByteBufferList(final List<ByteBuffer> array, final String name, final List<ByteBuffer> defVal) throws IOException { if (array == defVal) { @@ -327,6 +361,7 @@ public class BinaryOutputCapsule implements OutputCapsule { writeByteBufferArrayList(array); } + @Override public void writeSavableList(final List<? extends Savable> array, final String name, final List<? extends Savable> defVal) throws IOException { if (array == defVal) { @@ -336,6 +371,7 @@ public class BinaryOutputCapsule implements OutputCapsule { writeSavableArrayList(array); } + @Override public void writeSavableListArray(final List<? extends Savable>[] array, final String name, final List<? extends Savable>[] defVal) throws IOException { if (array == defVal) { @@ -345,6 +381,7 @@ public class BinaryOutputCapsule implements OutputCapsule { writeSavableArrayListArray(array); } + @Override public void writeSavableListArray2D(final List<? extends Savable>[][] array, final String name, final List<? extends Savable>[][] defVal) throws IOException { if (array == defVal) { @@ -354,6 +391,7 @@ public class BinaryOutputCapsule implements OutputCapsule { writeSavableArrayListArray2D(array); } + @Override public void writeSavableMap(final Map<? extends Savable, ? extends Savable> map, final String name, final Map<? extends Savable, ? extends Savable> defVal) throws IOException { if (map == defVal) { @@ -363,6 +401,7 @@ public class BinaryOutputCapsule implements OutputCapsule { writeSavableMap(map); } + @Override public void writeStringSavableMap(final Map<String, ? extends Savable> map, final String name, final Map<String, ? extends Savable> defVal) throws IOException { if (map == defVal) { @@ -987,6 +1026,7 @@ public class BinaryOutputCapsule implements OutputCapsule { _baos.write(array); } + @Override public void write(final Enum<?> value, final String name, final Enum<?> defVal) throws IOException { if (value == defVal) { return; @@ -998,6 +1038,7 @@ public class BinaryOutputCapsule implements OutputCapsule { } } + @Override public void write(final Enum<?>[] value, final String name) throws IOException { if (value == null) { write(NULL_OBJECT); diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/DOMInputCapsule.java b/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/DOMInputCapsule.java index 00babb9..2a92b9e 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/DOMInputCapsule.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/DOMInputCapsule.java @@ -94,6 +94,7 @@ public class DOMInputCapsule implements InputCapsule { return null; } + @Override public byte readByte(final String name, final byte defVal) throws IOException { byte ret = defVal; try { @@ -106,6 +107,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public byte[] readByteArray(final String name, final byte[] defVal) throws IOException { byte[] ret = defVal; try { @@ -133,6 +135,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public byte[][] readByteArray2D(final String name, final byte[][] defVal) throws IOException { byte[][] ret = defVal; try { @@ -169,6 +172,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public int readInt(final String name, final int defVal) throws IOException { int ret = defVal; try { @@ -184,6 +188,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public int[] readIntArray(final String name, final int[] defVal) throws IOException { int[] ret = defVal; try { @@ -211,6 +216,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public int[][] readIntArray2D(final String name, final int[][] defVal) throws IOException { int[][] ret = defVal; try { @@ -247,6 +253,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public float readFloat(final String name, final float defVal) throws IOException { float ret = defVal; try { @@ -262,6 +269,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public float[] readFloatArray(final String name, final float[] defVal) throws IOException { float[] ret = defVal; try { @@ -289,6 +297,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public float[][] readFloatArray2D(final String name, final float[][] defVal) throws IOException { float[][] ret = defVal; try { @@ -322,6 +331,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public double readDouble(final String name, final double defVal) throws IOException { double ret = defVal; try { @@ -337,6 +347,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public double[] readDoubleArray(final String name, final double[] defVal) throws IOException { double[] ret = defVal; try { @@ -364,6 +375,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public double[][] readDoubleArray2D(final String name, final double[][] defVal) throws IOException { double[][] ret = defVal; try { @@ -400,6 +412,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public long readLong(final String name, final long defVal) throws IOException { long ret = defVal; try { @@ -415,6 +428,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public long[] readLongArray(final String name, final long[] defVal) throws IOException { long[] ret = defVal; try { @@ -442,6 +456,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public long[][] readLongArray2D(final String name, final long[][] defVal) throws IOException { long[][] ret = defVal; try { @@ -478,6 +493,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public short readShort(final String name, final short defVal) throws IOException { short ret = defVal; try { @@ -493,6 +509,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public short[] readShortArray(final String name, final short[] defVal) throws IOException { short[] ret = defVal; try { @@ -520,6 +537,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public short[][] readShortArray2D(final String name, final short[][] defVal) throws IOException { short[][] ret = defVal; try { @@ -556,6 +574,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public boolean readBoolean(final String name, final boolean defVal) throws IOException { boolean ret = defVal; try { @@ -571,6 +590,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public boolean[] readBooleanArray(final String name, final boolean[] defVal) throws IOException { boolean[] ret = defVal; try { @@ -598,6 +618,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public boolean[][] readBooleanArray2D(final String name, final boolean[][] defVal) throws IOException { boolean[][] ret = defVal; try { @@ -634,6 +655,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public String readString(final String name, final String defVal) throws IOException { String ret = defVal; try { @@ -646,6 +668,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public String[] readStringArray(final String name, final String[] defVal) throws IOException { String[] ret = defVal; try { @@ -682,6 +705,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public String[][] readStringArray2D(final String name, final String[][] defVal) throws IOException { String[][] ret = defVal; try { @@ -718,6 +742,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public BitSet readBitSet(final String name, final BitSet defVal) throws IOException { BitSet ret = defVal; try { @@ -739,6 +764,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public Savable readSavable(final String name, final Savable defVal) throws IOException { Savable ret = defVal; @@ -880,6 +906,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public Savable[] readSavableArray(final String name, final Savable[] defVal) throws IOException { Savable[] ret = defVal; try { @@ -912,6 +939,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public Savable[][] readSavableArray2D(final String name, final Savable[][] defVal) throws IOException { Savable[][] ret = defVal; try { @@ -944,6 +972,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override @SuppressWarnings("unchecked") public <E extends Savable> List<E> readSavableList(final String name, final List<E> defVal) throws IOException { List<E> ret = defVal; @@ -975,6 +1004,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override @SuppressWarnings("unchecked") public <E extends Savable> List<E>[] readSavableListArray(final String name, final List<E>[] defVal) throws IOException { @@ -1007,6 +1037,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override @SuppressWarnings({ "unchecked", "rawtypes" }) public <E extends Savable> List<E>[][] readSavableListArray2D(final String name, final List<E>[][] defVal) throws IOException { @@ -1034,6 +1065,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public List<FloatBuffer> readFloatBufferList(final String name, final List<FloatBuffer> defVal) throws IOException { List<FloatBuffer> ret = defVal; try { @@ -1062,6 +1094,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override @SuppressWarnings("unchecked") public <K extends Savable, V extends Savable> Map<K, V> readSavableMap(final String name, final Map<K, V> defVal) throws IOException { @@ -1090,6 +1123,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override @SuppressWarnings("unchecked") public <V extends Savable> Map<String, V> readStringSavableMap(final String name, final Map<String, V> defVal) throws IOException { @@ -1125,6 +1159,7 @@ public class DOMInputCapsule implements InputCapsule { /** * reads from currentElem if name is null */ + @Override public FloatBuffer readFloatBuffer(final String name, final FloatBuffer defVal) throws IOException { FloatBuffer ret = defVal; try { @@ -1155,6 +1190,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public IntBuffer readIntBuffer(final String name, final IntBuffer defVal) throws IOException { IntBuffer ret = defVal; try { @@ -1181,6 +1217,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public ByteBuffer readByteBuffer(final String name, final ByteBuffer defVal) throws IOException { ByteBuffer ret = defVal; try { @@ -1207,6 +1244,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public ShortBuffer readShortBuffer(final String name, final ShortBuffer defVal) throws IOException { ShortBuffer ret = defVal; try { @@ -1233,6 +1271,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public List<ByteBuffer> readByteBufferList(final String name, final List<ByteBuffer> defVal) throws IOException { List<ByteBuffer> ret = defVal; try { @@ -1261,6 +1300,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override public <T extends Enum<T>> T readEnum(final String name, final Class<T> enumType, final T defVal) throws IOException { T ret = defVal; @@ -1277,6 +1317,7 @@ public class DOMInputCapsule implements InputCapsule { return ret; } + @Override @SuppressWarnings("unchecked") public <T extends Enum<T>> T[] readEnumArray(final String name, final Class<T> enumType, final T[] defVal) throws IOException { diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/DOMOutputCapsule.java b/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/DOMOutputCapsule.java index ce2e9c7..bf781a1 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/DOMOutputCapsule.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/DOMOutputCapsule.java @@ -72,6 +72,7 @@ public class DOMOutputCapsule implements OutputCapsule { return s; } + @Override public void write(final byte value, final String name, final byte defVal) throws IOException { if (value == defVal) { return; @@ -79,6 +80,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement.setAttribute(name, String.valueOf(value)); } + @Override public void write(byte[] value, final String name, final byte[] defVal) throws IOException { final StringBuilder buf = new StringBuilder(); if (value == null) { @@ -97,6 +99,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) _currentElement.getParentNode(); } + @Override public void write(byte[][] value, final String name, final byte[][] defVal) throws IOException { final StringBuilder buf = new StringBuilder(); if (value == null) { @@ -119,6 +122,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) _currentElement.getParentNode(); } + @Override public void write(final int value, final String name, final int defVal) throws IOException { if (value == defVal) { return; @@ -126,6 +130,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement.setAttribute(name, String.valueOf(value)); } + @Override public void write(final int[] value, final String name, final int[] defVal) throws IOException { final StringBuilder buf = new StringBuilder(); if (value == null) { @@ -148,6 +153,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) _currentElement.getParentNode(); } + @Override public void write(final int[][] value, final String name, final int[][] defVal) throws IOException { if (value == null) { return; @@ -166,6 +172,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) el.getParentNode(); } + @Override public void write(final float value, final String name, final float defVal) throws IOException { if (value == defVal) { return; @@ -173,6 +180,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement.setAttribute(name, String.valueOf(value)); } + @Override public void write(float[] value, final String name, final float[] defVal) throws IOException { final StringBuilder buf = new StringBuilder(); if (value == null) { @@ -191,6 +199,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) _currentElement.getParentNode(); } + @Override public void write(final float[][] value, final String name, final float[][] defVal) throws IOException { final StringBuilder buf = new StringBuilder(); if (value == null) { @@ -216,6 +225,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) _currentElement.getParentNode(); } + @Override public void write(final double value, final String name, final double defVal) throws IOException { if (value == defVal) { return; @@ -223,6 +233,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement.setAttribute(name, String.valueOf(value)); } + @Override public void write(double[] value, final String name, final double[] defVal) throws IOException { final StringBuilder buf = new StringBuilder(); if (value == null) { @@ -241,6 +252,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) _currentElement.getParentNode(); } + @Override public void write(final double[][] value, final String name, final double[][] defVal) throws IOException { if (value == null) { return; @@ -259,6 +271,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) el.getParentNode(); } + @Override public void write(final long value, final String name, final long defVal) throws IOException { if (value == defVal) { return; @@ -266,6 +279,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement.setAttribute(name, String.valueOf(value)); } + @Override public void write(long[] value, final String name, final long[] defVal) throws IOException { final StringBuilder buf = new StringBuilder(); if (value == null) { @@ -284,6 +298,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) _currentElement.getParentNode(); } + @Override public void write(final long[][] value, final String name, final long[][] defVal) throws IOException { if (value == null) { return; @@ -302,6 +317,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) el.getParentNode(); } + @Override public void write(final short value, final String name, final short defVal) throws IOException { if (value == defVal) { return; @@ -309,6 +325,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement.setAttribute(name, String.valueOf(value)); } + @Override public void write(short[] value, final String name, final short[] defVal) throws IOException { final StringBuilder buf = new StringBuilder(); if (value == null) { @@ -327,6 +344,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) _currentElement.getParentNode(); } + @Override public void write(final short[][] value, final String name, final short[][] defVal) throws IOException { if (value == null) { return; @@ -345,6 +363,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) el.getParentNode(); } + @Override public void write(final boolean value, final String name, final boolean defVal) throws IOException { if (value == defVal) { return; @@ -352,6 +371,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement.setAttribute(name, String.valueOf(value)); } + @Override public void write(boolean[] value, final String name, final boolean[] defVal) throws IOException { final StringBuilder buf = new StringBuilder(); if (value == null) { @@ -370,6 +390,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) _currentElement.getParentNode(); } + @Override public void write(final boolean[][] value, final String name, final boolean[][] defVal) throws IOException { if (value == null) { return; @@ -388,6 +409,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) el.getParentNode(); } + @Override public void write(final String value, final String name, final String defVal) throws IOException { if (value == null || value.equals(defVal)) { return; @@ -395,6 +417,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement.setAttribute(name, encodeString(value)); } + @Override public void write(String[] value, final String name, final String[] defVal) throws IOException { final Element el = appendElement(name); @@ -414,6 +437,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) _currentElement.getParentNode(); } + @Override public void write(final String[][] value, final String name, final String[][] defVal) throws IOException { if (value == null) { return; @@ -432,6 +456,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) el.getParentNode(); } + @Override public void write(final BitSet value, final String name, final BitSet defVal) throws IOException { if (value == null || value.equals(defVal)) { return; @@ -446,6 +471,7 @@ public class DOMOutputCapsule implements OutputCapsule { } + @Override public void write(final Savable object, String name, final Savable defVal) throws IOException { if (object == null) { return; @@ -488,6 +514,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = old; } + @Override public void write(final Savable[] objects, final String name, final Savable[] defVal) throws IOException { if (objects == null) { return; @@ -515,6 +542,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = old; } + @Override public void write(final Savable[][] value, final String name, final Savable[][] defVal) throws IOException { if (value == null) { return; @@ -534,6 +562,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) _currentElement.getParentNode(); } + @Override public void writeSavableList(final List<? extends Savable> array, final String name, final List<? extends Savable> defVal) throws IOException { if (array == null) { @@ -559,6 +588,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = old; } + @Override public void writeSavableListArray(final List<? extends Savable>[] objects, final String name, final List<? extends Savable>[] defVal) throws IOException { if (objects == null) { @@ -586,6 +616,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = old; } + @Override public void writeSavableListArray2D(final List<? extends Savable>[][] value, final String name, final List<? extends Savable>[][] defVal) throws IOException { if (value == null) { @@ -606,6 +637,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) el.getParentNode(); } + @Override public void writeFloatBufferList(final List<FloatBuffer> array, final String name, final List<FloatBuffer> defVal) throws IOException { if (array == null) { @@ -622,6 +654,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) el.getParentNode(); } + @Override public void writeSavableMap(final Map<? extends Savable, ? extends Savable> map, final String name, final Map<? extends Savable, ? extends Savable> defVal) throws IOException { if (map == null) { @@ -645,6 +678,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) stringMap.getParentNode(); } + @Override public void writeStringSavableMap(final Map<String, ? extends Savable> map, final String name, final Map<String, ? extends Savable> defVal) throws IOException { if (map == null) { @@ -668,6 +702,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) stringMap.getParentNode(); } + @Override public void write(final FloatBuffer value, final String name, final FloatBuffer defVal) throws IOException { if (value == null) { return; @@ -688,6 +723,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) el.getParentNode(); } + @Override public void write(final IntBuffer value, final String name, final IntBuffer defVal) throws IOException { if (value == null) { return; @@ -711,6 +747,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) el.getParentNode(); } + @Override public void write(final ByteBuffer value, final String name, final ByteBuffer defVal) throws IOException { if (value == null) { return; @@ -734,6 +771,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) el.getParentNode(); } + @Override public void write(final ShortBuffer value, final String name, final ShortBuffer defVal) throws IOException { if (value == null) { return; @@ -757,6 +795,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement = (Element) el.getParentNode(); } + @Override public void writeByteBufferList(final List<ByteBuffer> array, final String name, final List<ByteBuffer> defVal) throws IOException { if (array == null) { @@ -774,6 +813,7 @@ public class DOMOutputCapsule implements OutputCapsule { } + @Override public void write(final Enum<?> value, final String name, final Enum<?> defVal) throws IOException { if (value == defVal || value == null) { return; @@ -781,6 +821,7 @@ public class DOMOutputCapsule implements OutputCapsule { _currentElement.setAttribute(name, String.valueOf(value)); } + @Override public void write(final Enum<?>[] value, final String name) throws IOException { if (value == null) { return; diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/XMLExporter.java b/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/XMLExporter.java index e23bf32..76ee29e 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/XMLExporter.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/XMLExporter.java @@ -34,6 +34,7 @@ public class XMLExporter implements Ardor3dExporter { } + @Override public void save(final Savable object, final OutputStream os) throws IOException { try { // Initialize Document when saving so we don't retain state of previous exports @@ -49,6 +50,7 @@ public class XMLExporter implements Ardor3dExporter { } } + @Override public void save(final Savable object, final File f) throws IOException { save(object, new FileOutputStream(f)); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/XMLImporter.java b/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/XMLImporter.java index a5caa2a..f177ee0 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/XMLImporter.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/export/xml/XMLImporter.java @@ -32,6 +32,7 @@ public class XMLImporter implements Ardor3dImporter { public XMLImporter() {} + @Override public Savable load(final InputStream is) throws IOException { try { final DOMInputCapsule _domIn = new DOMInputCapsule(DocumentBuilderFactory.newInstance() @@ -48,14 +49,17 @@ public class XMLImporter implements Ardor3dImporter { } } + @Override public Savable load(final URL url) throws IOException { return load(url.openStream()); } + @Override public Savable load(final File f) throws IOException { return load(new FileInputStream(f)); } + @Override public Savable load(final byte[] data) throws IOException { return load(new ByteArrayInputStream(data)); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/geom/SharedCopyLogic.java b/ardor3d-core/src/main/java/com/ardor3d/util/geom/SharedCopyLogic.java index 048086f..56d4461 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/geom/SharedCopyLogic.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/geom/SharedCopyLogic.java @@ -27,6 +27,7 @@ import com.ardor3d.scenegraph.Spatial; public class SharedCopyLogic implements CopyLogic { private static final Logger logger = Logger.getLogger(SharedCopyLogic.class.getName()); + @Override public Spatial copy(final Spatial source, final AtomicBoolean recurse) { recurse.set(false); if (source instanceof Node) { diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/resource/RelativeResourceLocator.java b/ardor3d-core/src/main/java/com/ardor3d/util/resource/RelativeResourceLocator.java index 5f959f9..47f2f58 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/resource/RelativeResourceLocator.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/resource/RelativeResourceLocator.java @@ -34,6 +34,7 @@ public class RelativeResourceLocator implements ResourceLocator { return _baseSource; } + @Override public ResourceSource locateResource(String resourceName) { // Trim off any prepended local dir. while (resourceName.startsWith("./") && resourceName.length() > 2) { diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/resource/SimpleResourceLocator.java b/ardor3d-core/src/main/java/com/ardor3d/util/resource/SimpleResourceLocator.java index 580f408..bb6734d 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/resource/SimpleResourceLocator.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/resource/SimpleResourceLocator.java @@ -71,6 +71,7 @@ public class SimpleResourceLocator implements ResourceLocator { return _baseDir; } + @Override public ResourceSource locateResource(final String resourceName) { return doRecursiveLocate(cleanup(resourceName)); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/resource/StringResourceSource.java b/ardor3d-core/src/main/java/com/ardor3d/util/resource/StringResourceSource.java index 69a2339..7c60292 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/resource/StringResourceSource.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/resource/StringResourceSource.java @@ -60,6 +60,7 @@ public class StringResourceSource implements ResourceSource { /** * Returns "string resource" as strings have no name. */ + @Override public String getName() { return "string resource"; } @@ -67,6 +68,7 @@ public class StringResourceSource implements ResourceSource { /** * Returns null and logs a warning as this is not supported. */ + @Override public ResourceSource getRelativeSource(final String name) { if (logger.isLoggable(Level.WARNING)) { logger.logp(Level.WARNING, getClass().getName(), "getRelativeSource(String)", @@ -75,6 +77,7 @@ public class StringResourceSource implements ResourceSource { return null; } + @Override public String getType() { return _type; } @@ -82,6 +85,7 @@ public class StringResourceSource implements ResourceSource { /** * Grabs our data as a UTF8 byte array and returns it in a ByteArrayInputStream. */ + @Override public InputStream openStream() throws IOException { return new ByteArrayInputStream(_data.getBytes("UTF8")); } @@ -90,15 +94,18 @@ public class StringResourceSource implements ResourceSource { // Methods for Savable // ///////////////// + @Override public Class<?> getClassTag() { return StringResourceSource.class; } + @Override public void read(final InputCapsule capsule) throws IOException { _data = capsule.readString("data", null); _type = capsule.readString("type", null); } + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(_data, "data", null); capsule.write(_type, "type", null); diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/resource/URLResourceSource.java b/ardor3d-core/src/main/java/com/ardor3d/util/resource/URLResourceSource.java index 9bcc3c0..a2769a2 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/resource/URLResourceSource.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/resource/URLResourceSource.java @@ -76,6 +76,7 @@ public class URLResourceSource implements ResourceSource { _type = type; } + @Override public ResourceSource getRelativeSource(final String name) { try { final URL srcURL = UrlUtils.resolveRelativeURL(_url, "./" + name); @@ -106,10 +107,12 @@ public class URLResourceSource implements ResourceSource { return _url; } + @Override public String getName() { return _urlToString; } + @Override public String getType() { return _type; } @@ -118,6 +121,7 @@ public class URLResourceSource implements ResourceSource { _type = type; } + @Override public InputStream openStream() throws IOException { return _url.openStream(); } @@ -168,10 +172,12 @@ public class URLResourceSource implements ResourceSource { return true; } + @Override public Class<?> getClassTag() { return URLResourceSource.class; } + @Override public void read(final InputCapsule capsule) throws IOException { final String protocol = capsule.readString("protocol", null); final String host = capsule.readString("host", null); @@ -194,6 +200,7 @@ public class URLResourceSource implements ResourceSource { _type = capsule.readString("type", null); } + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(_url.getProtocol(), "protocol", null); capsule.write(_url.getHost(), "host", null); diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/scenegraph/DisplayListDelegate.java b/ardor3d-core/src/main/java/com/ardor3d/util/scenegraph/DisplayListDelegate.java index b8f5680..0df947a 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/scenegraph/DisplayListDelegate.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/scenegraph/DisplayListDelegate.java @@ -34,6 +34,7 @@ public class DisplayListDelegate implements RenderDelegate { static { ContextManager.addContextCleanListener(new ContextCleanListener() { + @Override public void cleanForContext(final RenderContext renderContext) { // TODO: Need a way to call back to the creator of the display list? } @@ -47,6 +48,7 @@ public class DisplayListDelegate implements RenderDelegate { _identityCache.put(this, STATIC_REF); } + @Override public void render(final Spatial spatial, final Renderer renderer) { // do transforms final boolean transformed = renderer.doTransforms(spatial.getWorldTransform()); @@ -118,6 +120,7 @@ public class DisplayListDelegate implements RenderDelegate { else { GameTaskQueueManager.getManager(ContextManager.getContextForRef(glref)).render( new RendererCallable<Void>() { + @Override public Void call() throws Exception { getRenderer().deleteDisplayLists(idMap.get(glref)); return null; diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/scenegraph/SceneCompiler.java b/ardor3d-core/src/main/java/com/ardor3d/util/scenegraph/SceneCompiler.java index 285806e..30cc6dd 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/scenegraph/SceneCompiler.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/scenegraph/SceneCompiler.java @@ -75,6 +75,7 @@ public class SceneCompiler { _renderer = renderer; } + @Override public void visit(final Spatial spatial) { if (spatial instanceof Mesh) { final Mesh mesh = (Mesh) spatial; diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/shader/ShaderVariable.java b/ardor3d-core/src/main/java/com/ardor3d/util/shader/ShaderVariable.java index a425753..6ea3c80 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/shader/ShaderVariable.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/shader/ShaderVariable.java @@ -57,16 +57,19 @@ public class ShaderVariable implements Savable { } } + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(name, "name", ""); capsule.write(variableID, "variableID", -1); } + @Override public void read(final InputCapsule capsule) throws IOException { name = capsule.readString("name", ""); variableID = capsule.readInt("variableID", -1); } + @Override public Class<? extends ShaderVariable> getClassTag() { return this.getClass(); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/stat/StatType.java b/ardor3d-core/src/main/java/com/ardor3d/util/stat/StatType.java index 2d4436f..42bfee6 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/stat/StatType.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/stat/StatType.java @@ -60,6 +60,7 @@ public class StatType implements Comparable<StatType> { return hash; } + @Override public int compareTo(final StatType obj) { final StatType other = obj; return _statName.compareTo(other._statName); diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/DefColorFadeController.java b/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/DefColorFadeController.java index c69b02f..0fffc82 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/DefColorFadeController.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/DefColorFadeController.java @@ -61,6 +61,7 @@ public class DefColorFadeController implements SpatialController<Spatial> { _rate = rate; } + @Override public void update(final double time, final Spatial caller) { if (_target == null) { return; diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/LineGrapher.java b/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/LineGrapher.java index 544b530..6e84991 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/LineGrapher.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/LineGrapher.java @@ -72,6 +72,7 @@ public class LineGrapher extends AbstractStatGrapher implements TableLinkable { _graphRoot.getSceneHints().setCullHint(CullHint.Never); } + @Override public void statsUpdated() { if (!isEnabled() || !Constants.updateGraphs) { return; @@ -301,6 +302,7 @@ public class LineGrapher extends AbstractStatGrapher implements TableLinkable { } } + @Override public Line updateLineKey(final StatType type, Line lineKey) { if (lineKey == null) { lineKey = new Line("lk", BufferUtils.createVector3Buffer(2), null, null, null); diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/TabledLabelGrapher.java b/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/TabledLabelGrapher.java index bd32181..316a77e 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/TabledLabelGrapher.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/TabledLabelGrapher.java @@ -69,6 +69,7 @@ public class TabledLabelGrapher extends AbstractStatGrapher { _graphRoot.getSceneHints().setCullHint(CullHint.Never); } + @Override public void statsUpdated() { if (!isEnabled() || !Constants.updateGraphs) { return; diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/TimedAreaGrapher.java b/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/TimedAreaGrapher.java index bc336d5..9f650ea 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/TimedAreaGrapher.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/TimedAreaGrapher.java @@ -72,6 +72,7 @@ public class TimedAreaGrapher extends AbstractStatGrapher implements TableLinkab _graphRoot.getSceneHints().setCullHint(CullHint.Never); } + @Override public void statsUpdated() { if (!isEnabled() || !Constants.updateGraphs) { return; @@ -282,6 +283,7 @@ public class TimedAreaGrapher extends AbstractStatGrapher implements TableLinkab } } + @Override public Line updateLineKey(final StatType type, Line lineKey) { if (lineKey == null) { lineKey = new Line("lk", BufferUtils.createVector3Buffer(2), null, null, null); |