瀏覽代碼

jme3-desktop: improve the javadoc

Stephen Gold 4 年之前
父節點
當前提交
77b8344d1b

+ 4 - 1
jme3-desktop/src/main/java/com/jme3/app/SettingsDialog.java

@@ -115,6 +115,8 @@ public final class SettingsDialog extends JFrame {
      * @param imageFile
      *            the image file to use as the title of the dialog;
      *            <code>null</code> will result in to image being displayed
+     * @param loadSettings
+     *            if true, copy the settings, otherwise merge them
      * @throws NullPointerException
      *             if the source is <code>null</code>
      */
@@ -132,7 +134,8 @@ public final class SettingsDialog extends JFrame {
      * @param imageFile
      *            the image file to use as the title of the dialog;
      *            <code>null</code> will result in to image being displayed
-     * @param loadSettings 
+     * @param loadSettings
+     *            if true, copy the settings, otherwise merge them
      * @throws NullPointerException
      *             if the source is <code>null</code>
      */

+ 1 - 0
jme3-desktop/src/main/java/com/jme3/app/state/VideoRecorderAppState.java

@@ -132,6 +132,7 @@ public class VideoRecorderAppState extends AbstractAppState {
      * This constructor allows you to specify the output file of the video as well as the quality
      * @param file the video file
      * @param quality the quality of the jpegs in the video stream (0.0 smallest file - 1.0 largest file)
+     * @param framerate the frame rate of the resulting video, the application will be locked to this framerate
      */
     public VideoRecorderAppState(File file, float quality, int framerate) {
         this.file = file;

+ 7 - 5
jme3-desktop/src/main/java/com/jme3/system/ErrorDialog.java

@@ -22,8 +22,9 @@ public class ErrorDialog extends JDialog {
     
     /**
      * Create a new Dialog with a title and a message.
-     * @param message
-     * @param title 
+     *
+     * @param message the message to display
+     * @param title the title to display
      */
     public ErrorDialog(String message, String title) {
         setTitle(title);
@@ -55,10 +56,11 @@ public class ErrorDialog extends JDialog {
     }
     
     /**
-     * Show a dialog with the proved message.
-     * @param message 
+     * Show a dialog with the provided message.
+     *
+     * @param message the message to display
      */
-    public static void showDialog(String message){
+    public static void showDialog(String message) {
         ErrorDialog dialog = new ErrorDialog(message);
         dialog.setVisible(true);
     }

+ 3 - 3
jme3-desktop/src/main/java/com/jme3/util/Screenshots.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -67,8 +67,8 @@ public final class Screenshots {
     /**
      * Flips the image along the Y axis and converts BGRA to ABGR
      * 
-     * @param bgraBuf
-     * @param out 
+     * @param bgraBuf (not null, modified)
+     * @param out (not null) 
      */
     public static void convertScreenShot(ByteBuffer bgraBuf, BufferedImage out){
         WritableRaster wr = out.getRaster();

+ 9 - 6
jme3-desktop/src/main/java/jme3tools/converters/ImageToAwt.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -200,11 +200,14 @@ public class ImageToAwt {
         }
     }
 
-
     /**
-     * Convert an AWT image to jME image.
+     * Convert an AWT image to jME image. XXX not implemented yet!
+     *
+     * @param image the input image (not null, unaffected)
+     * @param format the data format
+     * @param buf the output buffer (not null, modified)
      */
-    public static void convert(BufferedImage image, Format format, ByteBuffer buf){
+    public static void convert(BufferedImage image, Format format, ByteBuffer buf) {
         DecodeParams p = params.get(format);
         if (p == null)
             throw new UnsupportedOperationException("Image format " + format + " is not supported");
@@ -297,8 +300,8 @@ public class ImageToAwt {
      * It is assumed that both images have buffers with the appropriate
      * number of elements and that both have the same dimensions.
      *
-     * @param input
-     * @param output
+     * @param input the input image (not null, unaffected)
+     * @param output the output image (not null, modified)
      */
     public static void convert(Image input, Image output){
         DecodeParams inParams  = params.get(input.getFormat());