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


java.lang.Object
   java.awt.GraphicsConfiguration

All known Subclasses:   java.awt.QtGraphicsConfiguration,  java.awt.MWGraphicsConfiguration,  sun.awt.qt.QtGraphicsConfiguration,  sun.awt.gtk.GdkGraphicsConfiguration,  sun.awt.pocketpc.PPCGraphicsConfiguration,  java.awt.X11GraphicsConfig,
GraphicsConfiguration
abstract public class GraphicsConfiguration (Code)
The GraphicsConfiguration class describes the characteristics of a graphics destination such as a printer or monitor. There can be many GraphicsConfiguration objects associated with a single graphics device, representing different drawing modes or capabilities. The corresponding native structure will vary from platform to platform. For example, on X11 windowing systems, each visual is a different GraphicsConfiguration. On win32, GraphicsConfigurations represent PixelFormats available in the current resolution and color depth.

In a virtual device multi-screen environment in which the desktop area could span multiple physical screen devices, the bounds of the GraphicsConfiguration objects are relative to the virtual coordinate system. When setting the location of a component, use GraphicsConfiguration.getBounds() getBounds to get the bounds of the desired GraphicsConfiguration and offset the location with the coordinates of the GraphicsConfiguration, as the following code sample illustrates:

 Frame f = new Frame(GraphicsConfiguration gc);
 Rectangle bounds = gc.getBounds();
 f.setLocation(10 + bounds.x, 10 + bounds.y);
 
To determine if your environment is a virtual device environment, call getBounds on all of the GraphicsConfiguration objects in your system. If any of the origins of the returned bounds are not (0, 0), your environment is a virtual device environment.

You can also use getBounds to determine the bounds of the virtual device. Call getBounds on all of the GraphicsConfiguration objects in your system. Then, calculate the union of all of the bounds returned from the calls to getBounds. The union is the bounds of the virtual device. The following code sample calculates the bounds of the virtual device.

 Rectangle virtualBounds = new Rectangle();
 GraphicsEnvironment ge = GraphicsEnvironment.
 getLocalGraphicsEnvironment();
 GraphicsDevice[] gs =
 ge.getScreenDevices();
 for (int j = 0; j < gs.length; j++) { 
 GraphicsDevice gd = gs[j];
 GraphicsConfiguration[] gc =
 gd.getConfigurations();
 for (int i=0; i < gc.length; i++) {
 virtualBounds =
 virtualBounds.union(gc[i].getBounds());
 }
 }
 

See Also:   Window
See Also:   Frame
See Also:   GraphicsEnvironment
See Also:   GraphicsDevice



Constructor Summary
protected  GraphicsConfiguration()
     This is an abstract class that cannot be instantiated directly.

Method Summary
abstract public  BufferedImagecreateCompatibleImage(int width, int height)
     Returns a BufferedImage with a data layout and color model compatible with this GraphicsConfiguration.
abstract public  VolatileImagecreateCompatibleVolatileImage(int width, int height)
     Returns a VolatileImage with a data layout and color model compatible with this GraphicsConfiguration.
public  VolatileImagecreateCompatibleVolatileImage(int width, int height, ImageCapabilities caps)
     Returns a VolatileImage with a data layout and color model compatible with this GraphicsConfiguration, using the specified image capabilities.
abstract public  RectanglegetBounds()
     Returns the bounds of the GraphicsConfiguration in the device coordinates.
abstract public  ColorModelgetColorModel()
     Returns the ColorModel associated with this GraphicsConfiguration.
abstract public  GraphicsDevicegetDevice()
     Returns the GraphicsDevice associated with this GraphicsConfiguration.
public  ImageCapabilitiesgetImageCapabilities()
    


Constructor Detail
GraphicsConfiguration
protected GraphicsConfiguration()(Code)
This is an abstract class that cannot be instantiated directly. Instances must be obtained from a suitable factory or query method.
See Also:   GraphicsDevice.getConfigurations
See Also:   GraphicsDevice.getDefaultConfiguration
See Also:   GraphicsDevice.getBestConfiguration
See Also:   Graphics2D.getDeviceConfiguration




Method Detail
createCompatibleImage
abstract public BufferedImage createCompatibleImage(int width, int height)(Code)
Returns a BufferedImage with a data layout and color model compatible with this GraphicsConfiguration. This method has nothing to do with memory-mapping a device. The returned BufferedImage has a layout and color model that is closest to this native device configuration and can therefore be optimally blitted to this device.
Parameters:
  width - the width of the returned BufferedImage
Parameters:
  height - the height of the returned BufferedImage a BufferedImage whose data layout and colormodel is compatible with this GraphicsConfiguration.



createCompatibleVolatileImage
abstract public VolatileImage createCompatibleVolatileImage(int width, int height)(Code)
Returns a VolatileImage with a data layout and color model compatible with this GraphicsConfiguration. The returned VolatileImage may have data that is stored optimally for the underlying graphics device and may therefore benefit from platform-specific rendering acceleration.
Parameters:
  width - the width of the returned VolatileImage
Parameters:
  height - the height of the returned VolatileImage a VolatileImage whose data layout and colormodel is compatible with this GraphicsConfiguration.
See Also:   Component.createVolatileImage(intint)



createCompatibleVolatileImage
public VolatileImage createCompatibleVolatileImage(int width, int height, ImageCapabilities caps) throws AWTException(Code)
Returns a VolatileImage with a data layout and color model compatible with this GraphicsConfiguration, using the specified image capabilities. The returned VolatileImage has a layout and color model that is closest to this native device configuration and can therefore be optimally blitted to this device. a VolatileImage whose data layout and color model is compatible with this GraphicsConfiguration.
Parameters:
  width - the width of the returned VolatileImage
Parameters:
  height - the height of the returned VolatileImage
Parameters:
  caps - the image capabilities
exception:
  AWTException - if the supplied image capabilities could not be met by this graphics configuration
since:
   1.4



getBounds
abstract public Rectangle getBounds()(Code)
Returns the bounds of the GraphicsConfiguration in the device coordinates. In a multi-screen environment with a virtual device, the bounds can have negative X or Y origins. the bounds of the area covered by thisGraphicsConfiguration.
since:
   1.3



getColorModel
abstract public ColorModel getColorModel()(Code)
Returns the ColorModel associated with this GraphicsConfiguration. a ColorModel object that is associated withthis GraphicsConfiguration.



getDevice
abstract public GraphicsDevice getDevice()(Code)
Returns the GraphicsDevice associated with this GraphicsConfiguration. a GraphicsDevice object that is associated with this GraphicsConfiguration.



getImageCapabilities
public ImageCapabilities getImageCapabilities()(Code)



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.