Java Doc for NioImageBuffer.java in  » 6.0-JDK-Modules » java-3d » javax » media » j3d » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » java 3d » javax.media.j3d 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.j3d.NioImageBuffer

NioImageBuffer
public class NioImageBuffer (Code)
The NioImageBuffer class is a container for an image whose DataBuffer is specified via a java.nio.Buffer. An an NioImageBuffer can be wrapped by an ImageComponent and used for texture mapping, or for rendering Raster objects or background images. An NioImageBuffer must not be used as the buffer of an off-screen Canvas3D, or for reading back a raster image.
See Also:   ImageComponent2D
See Also:   ImageComponent3D
since:
   Java 3D 1.5

Inner Class :public enum ImageType
Inner Class : enum BufferType

Field Summary
 Bufferbuffer
    
 BufferTypebufferType
    
 intbytesPerPixel
    
 intelementsPerPixel
    
 intheight
    
 ImageTypeimageType
    
 intwidth
    

Constructor Summary
public  NioImageBuffer(int width, int height, ImageType imageType)
     Constructs an NIO image buffer of the specified size and type.
public  NioImageBuffer(int width, int height, ImageType imageType, Buffer dataBuffer)
     Constructs an NIO image buffer of the specified size and type, using the specified dataBuffer. The the byte order of the specified dataBuffer must match the native byte order of the underlying platform. For best performance, the NIO buffer should be a direct buffer.
Parameters:
  width - width of the image
Parameters:
  height - height of the image
Parameters:
  imageType - type of the image.
Parameters:
  dataBuffer - an NIO buffer of the correct type (ByteBuffer orIntBuffer) to match the specified imageType.This constructor will create a new view ofthe buffer, and will call rewind on that view,such that elements 0 through dataBuffer.limit()-1will be available internally.

Method Summary
public  BuffergetDataBuffer()
     Gets the data buffer to the specified input data buffer.
public  intgetHeight()
     Gets the height of this data buffer.
public  ImageTypegetImageType()
     Gets the image type of this data buffer.
public  intgetWidth()
     Gets the width of this data buffer.
public  voidsetDataBuffer(Buffer dataBuffer)
     Sets the data buffer to the specified input data buffer. The the byte order of the specified dataBuffer must match the native byte order of the underlying platform. For best performance, the NIO buffer should be a direct buffer.
Parameters:
  dataBuffer - an NIO buffer of the correct type (ByteBuffer orIntBuffer) to match the imageType of thisNioImageBuffer.

Field Detail
buffer
Buffer buffer(Code)



bufferType
BufferType bufferType(Code)



bytesPerPixel
int bytesPerPixel(Code)



elementsPerPixel
int elementsPerPixel(Code)



height
int height(Code)



imageType
ImageType imageType(Code)



width
int width(Code)




Constructor Detail
NioImageBuffer
public NioImageBuffer(int width, int height, ImageType imageType)(Code)
Constructs an NIO image buffer of the specified size and type. A direct NIO buffer of the correct type (ByteBuffer or IntBuffer) and size to match the input parameters is allocated.
Parameters:
  width - width of the image
Parameters:
  height - height of the image
Parameters:
  imageType - type of the image.
exception:
  IllegalArgumentException - if width < 1 or height < 1
exception:
  NullPointerException - if imageType is null



NioImageBuffer
public NioImageBuffer(int width, int height, ImageType imageType, Buffer dataBuffer)(Code)
Constructs an NIO image buffer of the specified size and type, using the specified dataBuffer. The the byte order of the specified dataBuffer must match the native byte order of the underlying platform. For best performance, the NIO buffer should be a direct buffer.
Parameters:
  width - width of the image
Parameters:
  height - height of the image
Parameters:
  imageType - type of the image.
Parameters:
  dataBuffer - an NIO buffer of the correct type (ByteBuffer orIntBuffer) to match the specified imageType.This constructor will create a new view ofthe buffer, and will call rewind on that view,such that elements 0 through dataBuffer.limit()-1will be available internally. The number of elements inthe buffer must be exactly width*height*numElementsPerPixel,where numElementsPerPixel is3 for TYPE_3BYTE_BGR and TYPE_3BYTE_RGB,4 for TYPE_4BYTE_ABGR and TYPE_4BYTE_RGBA,and 1 for all other types.
exception:
  IllegalArgumentException - if width < 1 or height < 1
exception:
  NullPointerException - if imageType or dataBuffer is null
exception:
  IllegalArgumentException - if the type of the dataBuffer doesnot match the imageType
exception:
  IllegalArgumentException - if dataBuffer.limit() !=width*height*numElementsPerPixel
exception:
  IllegalArgumentException - if the byte order of the specifieddataBuffer does not match the native byte order of the underlyingplatform.




Method Detail
getDataBuffer
public Buffer getDataBuffer()(Code)
Gets the data buffer to the specified input data buffer. a view of the current data buffer for this NIO image buffer.This view will be rewound such that elements 0through dataBuffer.limit()-1 are available.



getHeight
public int getHeight()(Code)
Gets the height of this data buffer. the width of this data buffer.



getImageType
public ImageType getImageType()(Code)
Gets the image type of this data buffer. the image type of this data buffer.



getWidth
public int getWidth()(Code)
Gets the width of this data buffer. the width of this data buffer.



setDataBuffer
public void setDataBuffer(Buffer dataBuffer)(Code)
Sets the data buffer to the specified input data buffer. The the byte order of the specified dataBuffer must match the native byte order of the underlying platform. For best performance, the NIO buffer should be a direct buffer.
Parameters:
  dataBuffer - an NIO buffer of the correct type (ByteBuffer orIntBuffer) to match the imageType of thisNioImageBuffer. This method will create a new view ofthe buffer, and will call rewind on that view,such that elements 0 through dataBuffer.limit()-1will be available internally. The number of elements inthe buffer must be exactly width*height*numElementsPerPixel,where numElementsPerPixel is3 for TYPE_3BYTE_BGR and TYPE_3BYTE_RGB,4 for TYPE_4BYTE_ABGR and TYPE_4BYTE_RGBA,and 1 for all other types.
exception:
  NullPointerException - if dataBuffer is null
exception:
  IllegalArgumentException - if the type of the dataBuffer doesnot match the imageType
exception:
  IllegalArgumentException - if dataBuffer.limit() !=width*height*numElementsPerPixel
exception:
  IllegalArgumentException - if the byte order of the specifieddataBuffer does not match the native byte order of the underlyingplatform.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.