Home » openjdk-7 » java » awt » image » [javadoc | source]
java.awt.image
public final class: DataBufferFloat [javadoc | source]
java.lang.Object
   java.awt.image.DataBuffer
      java.awt.image.DataBufferFloat
This class extends DataBuffer and stores data internally in float form.

Note that some implementations may function more efficiently if they can maintain control over how the data for an image is stored. For example, optimizations such as caching an image in video memory require that the implementation track all modifications to that data. Other implementations may operate better if they can store the data in locations other than a Java array. To maintain optimum compatibility with various optimizations it is best to avoid constructors and methods which expose the underlying storage as a Java array as noted below in the documentation for those methods.

Field Summary
 float[][] bankdata    The array of data banks. 
 float[] data    A reference to the default data bank. 
Fields inherited from java.awt.image.DataBuffer:
TYPE_BYTE,  TYPE_USHORT,  TYPE_SHORT,  TYPE_INT,  TYPE_FLOAT,  TYPE_DOUBLE,  TYPE_UNDEFINED,  dataType,  banks,  offset,  size,  offsets,  theTrackable
Constructor:
 public DataBufferFloat(int size) 
 public DataBufferFloat(int size,
    int numBanks) 
 public DataBufferFloat(float[] dataArray,
    int size) 
    Parameters:
    dataArray - An array of floats to be used as the first and only bank of this DataBuffer.
    size - The number of elements of the array to be used.
 public DataBufferFloat(float[][] dataArray,
    int size) 
    Parameters:
    dataArray - An array of arrays of floats to be used as the banks of this DataBuffer.
    size - The number of elements of each array to be used.
 public DataBufferFloat(float[] dataArray,
    int size,
    int offset) 
    Parameters:
    dataArray - An array of floats to be used as the first and only bank of this DataBuffer.
    size - The number of elements of the array to be used.
    offset - The offset of the first element of the array that will be used.
 public DataBufferFloat(float[][] dataArray,
    int size,
    int[] offsets) 
    Parameters:
    dataArray - An array of arrays of floats to be used as the banks of this DataBuffer.
    size - The number of elements of each array to be used.
    offsets - An array of integer offsets, one for each bank.
Method from java.awt.image.DataBufferFloat Summary:
getBankData,   getData,   getData,   getElem,   getElem,   getElemDouble,   getElemDouble,   getElemFloat,   getElemFloat,   setElem,   setElem,   setElemDouble,   setElemDouble,   setElemFloat,   setElemFloat
Methods from java.awt.image.DataBuffer:
getDataType,   getDataTypeSize,   getElem,   getElem,   getElemDouble,   getElemDouble,   getElemFloat,   getElemFloat,   getNumBanks,   getOffset,   getOffsets,   getSize,   setElem,   setElem,   setElemDouble,   setElemDouble,   setElemFloat,   setElemFloat,   toIntArray
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.awt.image.DataBufferFloat Detail:
 public float[][] getBankData() 
    Returns the data array for all banks.

    Note that calling this method may cause this {@code DataBuffer} object to be incompatible with performance optimizations used by some implementations (such as caching an associated image in video memory).

 public float[] getData() 
    Returns the default (first) float data array.

    Note that calling this method may cause this {@code DataBuffer} object to be incompatible with performance optimizations used by some implementations (such as caching an associated image in video memory).

 public float[] getData(int bank) 
    Returns the data array for the specified bank.

    Note that calling this method may cause this {@code DataBuffer} object to be incompatible with performance optimizations used by some implementations (such as caching an associated image in video memory).

 public int getElem(int i) 
    Returns the requested data array element from the first (default) bank as an int.
 public int getElem(int bank,
    int i) 
    Returns the requested data array element from the specified bank as an int.
 public double getElemDouble(int i) 
    Returns the requested data array element from the first (default) bank as a double.
 public double getElemDouble(int bank,
    int i) 
    Returns the requested data array element from the specified bank as a double.
 public float getElemFloat(int i) 
    Returns the requested data array element from the first (default) bank as a float.
 public float getElemFloat(int bank,
    int i) 
    Returns the requested data array element from the specified bank as a float.
 public  void setElem(int i,
    int val) 
    Sets the requested data array element in the first (default) bank to the given int.
 public  void setElem(int bank,
    int i,
    int val) 
    Sets the requested data array element in the specified bank to the given int.
 public  void setElemDouble(int i,
    double val) 
    Sets the requested data array element in the first (default) bank to the given double.
 public  void setElemDouble(int bank,
    int i,
    double val) 
    Sets the requested data array element in the specified bank to the given double.
 public  void setElemFloat(int i,
    float val) 
    Sets the requested data array element in the first (default) bank to the given float.
 public  void setElemFloat(int bank,
    int i,
    float val) 
    Sets the requested data array element in the specified bank to the given float.