< prev index next >

src/java.desktop/share/classes/java/awt/image/SampleModel.java

Print this page

        

@@ -109,16 +109,16 @@
      * Constructs a SampleModel with the specified parameters.
      * @param dataType  The data type of the DataBuffer storing the pixel data.
      * @param w         The width (in pixels) of the region of image data.
      * @param h         The height (in pixels) of the region of image data.
      * @param numBands  The number of bands of the image data.
-     * @throws IllegalArgumentException if <code>w</code> or <code>h</code>
+     * @throws IllegalArgumentException if {@code w} or {@code h}
      *         is not greater than 0
-     * @throws IllegalArgumentException if the product of <code>w</code>
-     *         and <code>h</code> is greater than
-     *         <code>Integer.MAX_VALUE</code>
-     * @throws IllegalArgumentException if <code>dataType</code> is not
+     * @throws IllegalArgumentException if the product of {@code w}
+     *         and {@code h} is greater than
+     *         {@code Integer.MAX_VALUE}
+     * @throws IllegalArgumentException if {@code dataType} is not
      *         one of the supported data types
      */
     public SampleModel(int dataType, int w, int h, int numBands)
     {
         long size = (long)w * h;

@@ -149,27 +149,27 @@
         this.numBands = numBands;
     }
 
     /** Returns the width in pixels.
      *  @return the width in pixels of the region of image data
-     *          that this <code>SampleModel</code> describes.
+     *          that this {@code SampleModel} describes.
      */
     public final int getWidth() {
          return width;
     }
 
     /** Returns the height in pixels.
      *  @return the height in pixels of the region of image data
-     *          that this <code>SampleModel</code> describes.
+     *          that this {@code SampleModel} describes.
      */
     public final int getHeight() {
          return height;
     }
 
     /** Returns the total number of bands of image data.
      *  @return the number of bands of image data that this
-     *          <code>SampleModel</code> describes.
+     *          {@code SampleModel} describes.
      */
     public final int getNumBands() {
          return numBands;
     }
 

@@ -259,13 +259,13 @@
      * thus increasing efficiency for data transfers. Generally, obj
      * should be passed in as null, so that the Object will be created
      * automatically and will be of the right primitive data type.
      * <p>
      * The following code illustrates transferring data for one pixel from
-     * DataBuffer <code>db1</code>, whose storage layout is described by
-     * SampleModel <code>sm1</code>, to DataBuffer <code>db2</code>, whose
-     * storage layout is described by SampleModel <code>sm2</code>.
+     * DataBuffer {@code db1}, whose storage layout is described by
+     * SampleModel {@code sm1}, to DataBuffer {@code db2}, whose
+     * storage layout is described by SampleModel {@code sm2}.
      * The transfer will generally be more efficient than using
      * getPixel/setPixel.
      * <pre>
      *       SampleModel sm1, sm2;
      *       DataBuffer db1, db2;

@@ -310,13 +310,13 @@
      * should be passed in as null, so that the Object will be created
      * automatically and will be of the right primitive data type.
      * <p>
      * The following code illustrates transferring data for a rectangular
      * region of pixels from
-     * DataBuffer <code>db1</code>, whose storage layout is described by
-     * SampleModel <code>sm1</code>, to DataBuffer <code>db2</code>, whose
-     * storage layout is described by SampleModel <code>sm2</code>.
+     * DataBuffer {@code db1}, whose storage layout is described by
+     * SampleModel {@code sm1}, to DataBuffer {@code db2}, whose
+     * storage layout is described by SampleModel {@code sm2}.
      * The transfer will generally be more efficient than using
      * getPixels/setPixels.
      * <pre>
      *       SampleModel sm1, sm2;
      *       DataBuffer db1, db2;

@@ -496,13 +496,13 @@
      * DataBuffer.TYPE_FLOAT, or DataBuffer.TYPE_DOUBLE.  Data in the array
      * may be in a packed format, thus increasing efficiency for data
      * transfers.
      * <p>
      * The following code illustrates transferring data for one pixel from
-     * DataBuffer <code>db1</code>, whose storage layout is described by
-     * SampleModel <code>sm1</code>, to DataBuffer <code>db2</code>, whose
-     * storage layout is described by SampleModel <code>sm2</code>.
+     * DataBuffer {@code db1}, whose storage layout is described by
+     * SampleModel {@code sm1}, to DataBuffer {@code db2}, whose
+     * storage layout is described by SampleModel {@code sm2}.
      * The transfer will generally be more efficient than using
      * getPixel/setPixel.
      * <pre>
      *       SampleModel sm1, sm2;
      *       DataBuffer db1, db2;

@@ -543,13 +543,13 @@
      * may be in a packed format, thus increasing efficiency for data
      * transfers.
      * <p>
      * The following code illustrates transferring data for a rectangular
      * region of pixels from
-     * DataBuffer <code>db1</code>, whose storage layout is described by
-     * SampleModel <code>sm1</code>, to DataBuffer <code>db2</code>, whose
-     * storage layout is described by SampleModel <code>sm2</code>.
+     * DataBuffer {@code db1}, whose storage layout is described by
+     * SampleModel {@code sm1}, to DataBuffer {@code db2}, whose
+     * storage layout is described by SampleModel {@code sm2}.
      * The transfer will generally be more efficient than using
      * getPixels/setPixels.
      * <pre>
      *       SampleModel sm1, sm2;
      *       DataBuffer db1, db2;

@@ -1296,11 +1296,11 @@
     /**
      * Sets a sample in the specified band for the pixel located at (x,y)
      * in the DataBuffer using a float for input.
      * The default implementation of this method casts the input
      * float sample to an int and then calls the
-     * <code>setSample(int, int, int, DataBuffer)</code> method using
+     * {@code setSample(int, int, int, DataBuffer)} method using
      * that int value.
      * ArrayIndexOutOfBoundsException may be thrown if the coordinates are
      * not in bounds.
      * @param x         The X coordinate of the pixel location.
      * @param y         The Y coordinate of the pixel location.

@@ -1324,11 +1324,11 @@
     /**
      * Sets a sample in the specified band for the pixel located at (x,y)
      * in the DataBuffer using a double for input.
      * The default implementation of this method casts the input
      * double sample to an int and then calls the
-     * <code>setSample(int, int, int, DataBuffer)</code> method using
+     * {@code setSample(int, int, int, DataBuffer)} method using
      * that int value.
      * ArrayIndexOutOfBoundsException may be thrown if the coordinates are
      * not in bounds.
      * @param x         The X coordinate of the pixel location.
      * @param y         The Y coordinate of the pixel location.

@@ -1467,31 +1467,31 @@
     /**
      *  Creates a SampleModel which describes data in this SampleModel's
      *  format, but with a different width and height.
      *  @param w the width of the image data
      *  @param h the height of the image data
-     *  @return a <code>SampleModel</code> describing the same image
-     *          data as this <code>SampleModel</code>, but with a
+     *  @return a {@code SampleModel} describing the same image
+     *          data as this {@code SampleModel}, but with a
      *          different size.
      */
     public abstract SampleModel createCompatibleSampleModel(int w, int h);
 
     /**
      * Creates a new SampleModel
      * with a subset of the bands of this
      * SampleModel.
-     * @param bands the subset of bands of this <code>SampleModel</code>
-     * @return a <code>SampleModel</code> with a subset of bands of this
-     *         <code>SampleModel</code>.
+     * @param bands the subset of bands of this {@code SampleModel}
+     * @return a {@code SampleModel} with a subset of bands of this
+     *         {@code SampleModel}.
      */
     public abstract SampleModel createSubsetSampleModel(int bands[]);
 
     /**
      * Creates a DataBuffer that corresponds to this SampleModel.
      * The DataBuffer's width and height will match this SampleModel's.
-     * @return a <code>DataBuffer</code> corresponding to this
-     *         <code>SampleModel</code>.
+     * @return a {@code DataBuffer} corresponding to this
+     *         {@code SampleModel}.
      */
     public abstract DataBuffer createDataBuffer();
 
     /** Returns the size in bits of samples for all bands.
      *  @return the size of samples for all bands.
< prev index next >