Java Doc for DirectColorModel.java in  » 6.0-JDK-Modules » j2me » java » awt » image » 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 » j2me » java.awt.image 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.awt.image.ColorModel
      java.awt.image.DirectColorModel

DirectColorModel
public class DirectColorModel extends ColorModel (Code)
A ColorModel class that specifies a translation from pixel values to alpha, red, green, and blue color components for pixels which have the color components embedded directly in the bits of the pixel itself. This color model is similar to an X11 TrueColor visual.

Many of the methods in this class are final. This is because the underlying native graphics code makes assumptions about the layout and operation of this class and those assumptions are reflected in the implementations of the methods here that are marked final. You can subclass this class for other reaons, but you cannot override or modify the behaviour of those methods.
See Also:   ColorModel
version:
   1.24 08/21/02
author:
   Jim Graham




Constructor Summary
public  DirectColorModel(int bits, int rmask, int gmask, int bmask)
     Constructs a DirectColorModel from the given masks specifying which bits in the pixel contain the red, green and blue color components.
public  DirectColorModel(int bits, int rmask, int gmask, int bmask, int amask)
     Constructs a DirectColorModel from the given masks specifying which bits in the pixel contain the alhpa, red, green and blue color components.
public  DirectColorModel(ColorSpace space, int bits, int rmask, int gmask, int bmask, int amask, boolean isAlphaPremultiplied, int transferType)
     Constructs a DirectColorModel from the specified parameters.

Method Summary
final public  intgetAlpha(int pixel)
     Return the alpha transparency value for the specified pixel in the range 0-255.
final public  intgetAlphaMask()
     Returns the mask indicating which bits in a pixel contain the alpha transparency component.
final public  intgetBlue(int pixel)
     Returns the blue color compoment for the specified pixel in the range 0-255.
final public  intgetBlueMask()
     Returns the mask indicating which bits in a pixel contain the blue color component.
final public  intgetGreen(int pixel)
     Returns the green color compoment for the specified pixel in the range 0-255.
final public  intgetGreenMask()
     Returns the mask indicating which bits in a pixel contain the green color component.
final public  intgetRGB(int pixel)
     Returns the color of the pixel in the default RGB color model.
final public  intgetRed(int pixel)
     Returns the red color compoment for the specified pixel in the range 0-255.
final public  intgetRedMask()
     Returns the mask indicating which bits in a pixel contain the red color component.


Constructor Detail
DirectColorModel
public DirectColorModel(int bits, int rmask, int gmask, int bmask)(Code)
Constructs a DirectColorModel from the given masks specifying which bits in the pixel contain the red, green and blue color components. Pixels described by this color model will all have alpha components of 255 (fully opaque). All of the bits in each mask must be contiguous and fit in the specified number of least significant bits of the integer.



DirectColorModel
public DirectColorModel(int bits, int rmask, int gmask, int bmask, int amask)(Code)
Constructs a DirectColorModel from the given masks specifying which bits in the pixel contain the alhpa, red, green and blue color components. All of the bits in each mask must be contiguous and fit in the specified number of least significant bits of the integer.



DirectColorModel
public DirectColorModel(ColorSpace space, int bits, int rmask, int gmask, int bmask, int amask, boolean isAlphaPremultiplied, int transferType)(Code)
Constructs a DirectColorModel from the specified parameters. Color components are in the specified ColorSpace, which must be of type ColorSpace.TYPE_RGB. The masks specify which bits in an int pixel representation contain the red, green and blue color samples and the alpha sample, if present. If amask is 0, pixel values do not contain alpha information and all pixels are treated as opaque, which means that alpha = 1.0. All of the bits in each mask must be contiguous and fit in the specified number of least significant bits of an int pixel representation. If there is alpha, the boolean isAlphaPremultiplied specifies how to interpret color and alpha samples in pixel values. If the boolean is true, color samples are assumed to have been multiplied by the alpha sample. The transparency value is Transparency.OPAQUE, if no alpha is present, or Transparency.TRANSLUCENT otherwise. The transfer type is the type of primitive array used to represent pixel values and must be one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.
Parameters:
  space - the specified ColorSpace
Parameters:
  bits - the number of bits in the pixel values; for example,the sum of the number of bits in the masks.
Parameters:
  rmask - specifies a mask indicating which bits in aninteger pixel contain the red component
Parameters:
  gmask - specifies a mask indicating which bits in aninteger pixel contain the green component
Parameters:
  bmask - specifies a mask indicating which bits in aninteger pixel contain the blue component
Parameters:
  amask - specifies a mask indicating which bits in aninteger pixel contain the alpha component
Parameters:
  isAlphaPremultiplied - true if color samples arepremultiplied by the alpha sample; false otherwise
Parameters:
  transferType - the type of array used to represent pixel values




Method Detail
getAlpha
final public int getAlpha(int pixel)(Code)
Return the alpha transparency value for the specified pixel in the range 0-255.



getAlphaMask
final public int getAlphaMask()(Code)
Returns the mask indicating which bits in a pixel contain the alpha transparency component.



getBlue
final public int getBlue(int pixel)(Code)
Returns the blue color compoment for the specified pixel in the range 0-255.



getBlueMask
final public int getBlueMask()(Code)
Returns the mask indicating which bits in a pixel contain the blue color component.



getGreen
final public int getGreen(int pixel)(Code)
Returns the green color compoment for the specified pixel in the range 0-255.



getGreenMask
final public int getGreenMask()(Code)
Returns the mask indicating which bits in a pixel contain the green color component.



getRGB
final public int getRGB(int pixel)(Code)
Returns the color of the pixel in the default RGB color model.
See Also:   ColorModel.getRGBdefault



getRed
final public int getRed(int pixel)(Code)
Returns the red color compoment for the specified pixel in the range 0-255.



getRedMask
final public int getRedMask()(Code)
Returns the mask indicating which bits in a pixel contain the red color component.



Fields inherited from java.awt.image.ColorModel
ColorSpace colorSpace(Code)(Java Doc)
boolean isAlphaPremultiplied(Code)(Java Doc)
int nBits(Code)(Java Doc)
int numColorComponents(Code)(Java Doc)
int numComponents(Code)(Java Doc)
protected int pixel_bits(Code)(Java Doc)
boolean supportsAlpha(Code)(Java Doc)
int transparency(Code)(Java Doc)

Methods inherited from java.awt.image.ColorModel
public boolean equals(Object obj)(Code)(Java Doc)
public void finalize()(Code)(Java Doc)
abstract public int getAlpha(int pixel)(Code)(Java Doc)
abstract public int getBlue(int pixel)(Code)(Java Doc)
final public ColorSpace getColorSpace()(Code)(Java Doc)
public int getComponentSize(int componentIdx)(Code)(Java Doc)
public int[] getComponentSize()(Code)(Java Doc)
final static int getDefaultTransferType(int pixel_bits)(Code)(Java Doc)
abstract public int getGreen(int pixel)(Code)(Java Doc)
public int getNumColorComponents()(Code)(Java Doc)
public int getNumComponents()(Code)(Java Doc)
public int getPixelSize()(Code)(Java Doc)
public int getRGB(int pixel)(Code)(Java Doc)
public static ColorModel getRGBdefault()(Code)(Java Doc)
abstract public int getRed(int pixel)(Code)(Java Doc)
final public int getTransferType()(Code)(Java Doc)
public int getTransparency()(Code)(Java Doc)
final public boolean hasAlpha()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public boolean isAlphaPremultiplied()(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
public boolean equals(Object obj)(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.