Browse Source

Correct typo and formatting

MeFisto94 6 years ago
parent
commit
1fbe7a66b2

+ 25 - 32
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/NewGeometrySettings.java

@@ -48,23 +48,21 @@ import org.openide.util.NbPreferences;
  *
  *
  * @author david.bernard.31
  * @author david.bernard.31
  */
  */
-
-
 public class NewGeometrySettings implements Serializable, PreferenceChangeListener {
 public class NewGeometrySettings implements Serializable, PreferenceChangeListener {
+
     public static enum Plan {
     public static enum Plan {
         XY, XZ, YZ
         XY, XZ, YZ
     }
     }
-    
+
     private transient final PropertyChangeSupport propertySupport;
     private transient final PropertyChangeSupport propertySupport;
     private transient final Preferences pref;
     private transient final Preferences pref;
-    
+
     public NewGeometrySettings() {
     public NewGeometrySettings() {
         propertySupport = new PropertyChangeSupport(this);
         propertySupport = new PropertyChangeSupport(this);
         pref = NbPreferences.forModule(NewGeometrySettings.class);
         pref = NbPreferences.forModule(NewGeometrySettings.class);
     }
     }
 
 
     // -- Listeners management
     // -- Listeners management
-
     public void open() {
     public void open() {
         pref.addPreferenceChangeListener(this);
         pref.addPreferenceChangeListener(this);
     }
     }
@@ -73,20 +71,20 @@ public class NewGeometrySettings implements Serializable, PreferenceChangeListen
         pref.removePreferenceChangeListener(this);
         pref.removePreferenceChangeListener(this);
     }
     }
 
 
+    @Override
     public void preferenceChange(PreferenceChangeEvent evt) {
     public void preferenceChange(PreferenceChangeEvent evt) {
         propertySupport.firePropertyChange(evt.getKey(), null, evt.getNewValue());
         propertySupport.firePropertyChange(evt.getKey(), null, evt.getNewValue());
     }
     }
-    
+
     public void addPropertyChangeListener(final PropertyChangeListener listener) {
     public void addPropertyChangeListener(final PropertyChangeListener listener) {
         propertySupport.addPropertyChangeListener(listener);
         propertySupport.addPropertyChangeListener(listener);
     }
     }
-    
+
     public void removePropertyChangeListener(PropertyChangeListener listener) {
     public void removePropertyChangeListener(PropertyChangeListener listener) {
         propertySupport.removePropertyChangeListener(listener);
         propertySupport.removePropertyChangeListener(listener);
     }
     }
 
 
     //-- Material info
     //-- Material info
-
     public static final String PROP_MatRandom = "MatRandom";
     public static final String PROP_MatRandom = "MatRandom";
 
 
     public boolean getMatRandom() {
     public boolean getMatRandom() {
@@ -108,11 +106,8 @@ public class NewGeometrySettings implements Serializable, PreferenceChangeListen
     public void setMatColor(ColorRGBA value) {
     public void setMatColor(ColorRGBA value) {
         pref.putInt(PROP_MatColor, value.asIntRGBA());
         pref.putInt(PROP_MatColor, value.asIntRGBA());
     }
     }
-    
-
 
 
     //-- Box
     //-- Box
-
     public static final String PROP_BoxName = "BoxName";
     public static final String PROP_BoxName = "BoxName";
 
 
     public String getBoxName() {
     public String getBoxName() {
@@ -164,7 +159,6 @@ public class NewGeometrySettings implements Serializable, PreferenceChangeListen
     }
     }
 
 
     //-- Sphere
     //-- Sphere
-    
     public static final String PROP_SphereName = "SphereName";
     public static final String PROP_SphereName = "SphereName";
 
 
     public String getSphereName() {
     public String getSphereName() {
@@ -194,17 +188,17 @@ public class NewGeometrySettings implements Serializable, PreferenceChangeListen
     public void setSphereZSamples(int value) {
     public void setSphereZSamples(int value) {
         pref.putInt(PROP_SphereZSamples, value);
         pref.putInt(PROP_SphereZSamples, value);
     }
     }
-    
-    public static final String PROP_SpherRadialSamples = "SpherRadialSamples";
 
 
-    public int getSpherRadialSamples() {
-        return pref.getInt(PROP_SpherRadialSamples, 10);
+    public static final String PROP_SphereRadialSamples = "SphereRadialSamples";
+
+    public int getSphereRadialSamples() {
+        return pref.getInt(PROP_SphereRadialSamples, 10);
     }
     }
 
 
-    public void setSpherRadialSamples(int value) {
-        pref.putInt(PROP_SpherRadialSamples, value);
+    public void setSphereRadialSamples(int value) {
+        pref.putInt(PROP_SphereRadialSamples, value);
     }
     }
-    
+
     public static final String PROP_SphereRadius = "SphereRadius";
     public static final String PROP_SphereRadius = "SphereRadius";
 
 
     public float getSphereRadius() {
     public float getSphereRadius() {
@@ -214,7 +208,7 @@ public class NewGeometrySettings implements Serializable, PreferenceChangeListen
     public void setSphereRadius(float value) {
     public void setSphereRadius(float value) {
         pref.putFloat(PROP_SphereRadius, value);
         pref.putFloat(PROP_SphereRadius, value);
     }
     }
-    
+
     public static final String PROP_SphereUseEvenSlices = "SphereUseEvenSlices";
     public static final String PROP_SphereUseEvenSlices = "SphereUseEvenSlices";
 
 
     public boolean getSphereUseEvenSlices() {
     public boolean getSphereUseEvenSlices() {
@@ -224,7 +218,7 @@ public class NewGeometrySettings implements Serializable, PreferenceChangeListen
     public void setSphereUseEvenSlices(boolean value) {
     public void setSphereUseEvenSlices(boolean value) {
         pref.putBoolean(PROP_SphereUseEvenSlices, value);
         pref.putBoolean(PROP_SphereUseEvenSlices, value);
     }
     }
-    
+
     public static final String PROP_SphereInterior = "SphereInterior";
     public static final String PROP_SphereInterior = "SphereInterior";
 
 
     public boolean getSphereInterior() {
     public boolean getSphereInterior() {
@@ -245,7 +239,7 @@ public class NewGeometrySettings implements Serializable, PreferenceChangeListen
     public void setLineName(String value) {
     public void setLineName(String value) {
         pref.put(PROP_LineName, value);
         pref.put(PROP_LineName, value);
     }
     }
-        
+
     public static final String PROP_LineMode = "LineMode";
     public static final String PROP_LineMode = "LineMode";
 
 
     public Mode getLineMode() {
     public Mode getLineMode() {
@@ -259,7 +253,7 @@ public class NewGeometrySettings implements Serializable, PreferenceChangeListen
     public static final String PROP_LineStart = "LineStart";
     public static final String PROP_LineStart = "LineStart";
 
 
     public Vector3f getLineStart() {
     public Vector3f getLineStart() {
-        return getVector3f(PROP_LineStart, new Vector3f(0,0,0));
+        return getVector3f(PROP_LineStart, new Vector3f(0, 0, 0));
     }
     }
 
 
     public void setLineStart(Vector3f value) {
     public void setLineStart(Vector3f value) {
@@ -269,7 +263,7 @@ public class NewGeometrySettings implements Serializable, PreferenceChangeListen
     public static final String PROP_LineEnd = "LineEnd";
     public static final String PROP_LineEnd = "LineEnd";
 
 
     public Vector3f getLineEnd() {
     public Vector3f getLineEnd() {
-        return getVector3f(PROP_LineEnd, new Vector3f(2f,0,2f));
+        return getVector3f(PROP_LineEnd, new Vector3f(2f, 0, 2f));
     }
     }
 
 
     public void setLineEnd(Vector3f value) {
     public void setLineEnd(Vector3f value) {
@@ -338,14 +332,13 @@ public class NewGeometrySettings implements Serializable, PreferenceChangeListen
     }
     }
 
 
     //-- Tools
     //-- Tools
-        
     protected Vector3f getVector3f(String baseName, Vector3f def) {
     protected Vector3f getVector3f(String baseName, Vector3f def) {
         return new Vector3f(
         return new Vector3f(
-            pref.getFloat(baseName + "X", def.x)
-            ,pref.getFloat(baseName + "Y", def.y)
-            ,pref.getFloat(baseName + "Z", def.z)
+                pref.getFloat(baseName + "X", def.x),
+                 pref.getFloat(baseName + "Y", def.y),
+                 pref.getFloat(baseName + "Z", def.z)
         );
         );
-        
+
     }
     }
 
 
     protected void putVector3f(String baseName, Vector3f value) {
     protected void putVector3f(String baseName, Vector3f value) {
@@ -361,13 +354,13 @@ public class NewGeometrySettings implements Serializable, PreferenceChangeListen
     public void putMode(String baseName, Mode value) {
     public void putMode(String baseName, Mode value) {
         pref.putInt(baseName, value.ordinal());
         pref.putInt(baseName, value.ordinal());
     }
     }
-    
+
     public List<Mode> getModes() {
     public List<Mode> getModes() {
         return Arrays.asList(Mode.values());
         return Arrays.asList(Mode.values());
     }
     }
-    
+
     public List<Plan> getPlans() {
     public List<Plan> getPlans() {
         return Arrays.asList(Plan.values());
         return Arrays.asList(Plan.values());
     }
     }
-    
+
 }
 }

+ 1 - 1
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/NewGeometrySphereAction.java

@@ -57,7 +57,7 @@ public class NewGeometrySphereAction extends AbstractNewSpatialAction implements
         NewGeometrySettings cfg = new NewGeometrySettings();
         NewGeometrySettings cfg = new NewGeometrySettings();
         Sphere b = new Sphere(
         Sphere b = new Sphere(
             cfg.getSphereZSamples()
             cfg.getSphereZSamples()
-            , cfg.getSpherRadialSamples()
+            , cfg.getSphereRadialSamples()
             , cfg.getSphereRadius()
             , cfg.getSphereRadius()
             , cfg.getSphereUseEvenSlices()
             , cfg.getSphereUseEvenSlices()
             , cfg.getSphereInterior()
             , cfg.getSphereInterior()