@Test public void testSet() { polygon1.addPostionChangeListener(this); polygon1.setXY(10f, 10f); Assert.assertEquals(1, positionNotificationReceived); }
@Override public <T extends Positionable> void addPostionChangeListener( PositionChangeListener<T> listener) { positionChangeListenerLock.lockWrite(); if (positionChangeListeners == null) { positionChangeListeners = new Array<PositionChangeListener>(true, 1); } positionChangeListeners.add(listener); positionChangeListenerLock.unlockWrite(); }
CollisionPolygon extends Polygon implements CollisionArea,
		PositionChangeListener<CollisionPolygon>, SizeChangeListener<CollisionPolygon> { @Override public <T extends Positionable> void addPostionChangeListener( PositionChangeListener<T> listener) { positionChangeListenerLock.lockWrite(); if (positionChangeListeners == null) { positionChangeListeners = new Array<PositionChangeListener>(true, 1); } positionChangeListeners.add(listener); positionChangeListenerLock.unlockWrite(); } }
CollisionPolygon extends Polygon implements CollisionArea,
		PositionChangeListener<CollisionPolygon>, SizeChangeListener<CollisionPolygon> { @Override public <T extends Positionable> void addPostionChangeListener( PositionChangeListener<T> listener) { positionChangeListenerLock.lockWrite(); if (positionChangeListeners == null) { positionChangeListeners = new Array<PositionChangeListener>(true, 1); } positionChangeListeners.add(listener); positionChangeListenerLock.unlockWrite(); } CollisionPolygon(float [] vertices);  CollisionPolygon(Vector2[] vectors);  CollisionPolygon(int id, float[] vertices);  CollisionPolygon(int id, Vector2[] vectors);  CollisionPolygon(int id, Collisions collisions, float [] vertices);  CollisionPolygon(int id, Collisions collisions, Vector2[] vectors); }
CollisionPolygon extends Polygon implements CollisionArea,
		PositionChangeListener<CollisionPolygon>, SizeChangeListener<CollisionPolygon> { @Override public <T extends Positionable> void addPostionChangeListener( PositionChangeListener<T> listener) { positionChangeListenerLock.lockWrite(); if (positionChangeListeners == null) { positionChangeListeners = new Array<PositionChangeListener>(true, 1); } positionChangeListeners.add(listener); positionChangeListenerLock.unlockWrite(); } CollisionPolygon(float [] vertices);  CollisionPolygon(Vector2[] vectors);  CollisionPolygon(int id, float[] vertices);  CollisionPolygon(int id, Vector2[] vectors);  CollisionPolygon(int id, Collisions collisions, float [] vertices);  CollisionPolygon(int id, Collisions collisions, Vector2[] vectors); @Override void dispose(); @Override void preUpdate(); @Override void interpolate(float alpha); @Override void forceTo(float x, float y); @Override CollisionArea setTo(float x, float y, float width, float height); @Override void forceTo(float x, float y, float width, float height); @Override void forceToWidth(float width); @Override void forceToHeight(float height); void forceTo(float [] vertices); @Override int getId(); @Override int getRenderX(); @Override int getRenderY(); @Override float getRawRenderX(); @Override float getRawRenderY(); @Override int getRenderWidth(); @Override int getRenderHeight(); @Override float getRawRenderWidth(); @Override float getRawRenderHeight(); int getRenderX(int index); int getRenderY(int index); @Override void positionChanged(CollisionPolygon moved); @Override void sizeChanged(CollisionPolygon changed); @Override void addPostionChangeListener(
			PositionChangeListener<T> listener); @Override void removePositionChangeListener(
			PositionChangeListener<T> listener); @Override void addSizeChangeListener(SizeChangeListener<T> listener); @Override void removeSizeChangeListener(SizeChangeListener<T> listener); @Override RenderCoordMode getRenderCoordMode(); @Override void setRenderCoordMode(RenderCoordMode mode); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
CollisionPolygon extends Polygon implements CollisionArea,
		PositionChangeListener<CollisionPolygon>, SizeChangeListener<CollisionPolygon> { @Override public <T extends Positionable> void addPostionChangeListener( PositionChangeListener<T> listener) { positionChangeListenerLock.lockWrite(); if (positionChangeListeners == null) { positionChangeListeners = new Array<PositionChangeListener>(true, 1); } positionChangeListeners.add(listener); positionChangeListenerLock.unlockWrite(); } CollisionPolygon(float [] vertices);  CollisionPolygon(Vector2[] vectors);  CollisionPolygon(int id, float[] vertices);  CollisionPolygon(int id, Vector2[] vectors);  CollisionPolygon(int id, Collisions collisions, float [] vertices);  CollisionPolygon(int id, Collisions collisions, Vector2[] vectors); @Override void dispose(); @Override void preUpdate(); @Override void interpolate(float alpha); @Override void forceTo(float x, float y); @Override CollisionArea setTo(float x, float y, float width, float height); @Override void forceTo(float x, float y, float width, float height); @Override void forceToWidth(float width); @Override void forceToHeight(float height); void forceTo(float [] vertices); @Override int getId(); @Override int getRenderX(); @Override int getRenderY(); @Override float getRawRenderX(); @Override float getRawRenderY(); @Override int getRenderWidth(); @Override int getRenderHeight(); @Override float getRawRenderWidth(); @Override float getRawRenderHeight(); int getRenderX(int index); int getRenderY(int index); @Override void positionChanged(CollisionPolygon moved); @Override void sizeChanged(CollisionPolygon changed); @Override void addPostionChangeListener(
			PositionChangeListener<T> listener); @Override void removePositionChangeListener(
			PositionChangeListener<T> listener); @Override void addSizeChangeListener(SizeChangeListener<T> listener); @Override void removeSizeChangeListener(SizeChangeListener<T> listener); @Override RenderCoordMode getRenderCoordMode(); @Override void setRenderCoordMode(RenderCoordMode mode); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }