From 45c3776395188571060b93998d540c64f1c5247e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Bouquet?= Date: Fri, 27 Feb 2015 08:32:40 +0100 Subject: [PATCH] Fixed warnings due to missing @Override or missing @params in javadoc. In BasicProfilerState and BaseAppState --- .../main/java/com/jme3/app/BasicProfilerState.java | 5 ++++- .../main/java/com/jme3/app/state/BaseAppState.java | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/app/BasicProfilerState.java b/jme3-core/src/main/java/com/jme3/app/BasicProfilerState.java index 52e1d49a1..50ace1dab 100644 --- a/jme3-core/src/main/java/com/jme3/app/BasicProfilerState.java +++ b/jme3-core/src/main/java/com/jme3/app/BasicProfilerState.java @@ -61,7 +61,7 @@ public class BasicProfilerState extends BaseAppState { private Geometry background; private float scale = 2; - private ProfilerKeyListener keyListener = new ProfilerKeyListener(); + private final ProfilerKeyListener keyListener = new ProfilerKeyListener(); public BasicProfilerState() { this(false); @@ -84,6 +84,7 @@ public class BasicProfilerState extends BaseAppState { * Sets the vertical scale of the visualization where * each unit is a millisecond. Defaults to 2, ie: a * single millisecond stretches two pixels high. + * @param scale the scale */ public void setGraphScale( float scale ) { if( this.scale == scale ) { @@ -101,6 +102,7 @@ public class BasicProfilerState extends BaseAppState { /** * Sets the number frames displayed and tracked. + * @param count the number of frames */ public void setFrameCount( int count ) { if( profiler.getFrameCount() == count ) { @@ -229,6 +231,7 @@ public class BasicProfilerState extends BaseAppState { private class ProfilerKeyListener implements ActionListener { + @Override public void onAction(String name, boolean value, float tpf) { if (!value) { return; diff --git a/jme3-core/src/main/java/com/jme3/app/state/BaseAppState.java b/jme3-core/src/main/java/com/jme3/app/state/BaseAppState.java index d28f3d921..a8a80f19e 100644 --- a/jme3-core/src/main/java/com/jme3/app/state/BaseAppState.java +++ b/jme3-core/src/main/java/com/jme3/app/state/BaseAppState.java @@ -82,6 +82,7 @@ public abstract class BaseAppState implements AppState { /** * Called during initialization once the app state is * attached and before onEnable() is called. + * @param app the application */ protected abstract void initialize( Application app ); @@ -90,6 +91,7 @@ public abstract class BaseAppState implements AppState { * application shutdown if the state is still attached. * onDisable() is called before this cleanup() method if * the state is enabled at the time of cleanup. + * @param app the application */ protected abstract void cleanup( Application app ); @@ -113,6 +115,7 @@ public abstract class BaseAppState implements AppState { * This implementation calls initialize(app) and then onEnable() if the * state is enabled. */ + @Override public final void initialize( AppStateManager stateManager, Application app ) { log.log(Level.FINEST, "initialize():{0}", this); @@ -125,6 +128,7 @@ public abstract class BaseAppState implements AppState { } } + @Override public final boolean isInitialized() { return initialized; } @@ -141,6 +145,7 @@ public abstract class BaseAppState implements AppState { return getStateManager().getState(type); } + @Override public final void setEnabled( boolean enabled ) { if( this.enabled == enabled ) @@ -157,22 +162,28 @@ public abstract class BaseAppState implements AppState { } } + @Override public final boolean isEnabled() { return enabled; } + @Override public void stateAttached( AppStateManager stateManager ) { } + @Override public void stateDetached( AppStateManager stateManager ) { } + @Override public void update( float tpf ) { } + @Override public void render( RenderManager rm ) { } + @Override public void postRender() { } @@ -182,6 +193,7 @@ public abstract class BaseAppState implements AppState { * This implementation calls onDisable() if the state is enabled and * then cleanup(app). */ + @Override public final void cleanup() { log.log(Level.FINEST, "cleanup():{0}", this);