Java Doc for ImageCanvas.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » javax » media » jai » widget » 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 Advanced Imaging » javax.media.jai.widget 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.awt.Canvas
   javax.media.jai.widget.ImageCanvas

ImageCanvas
public class ImageCanvas extends Canvas (Code)
A simple output widget for a RenderedImage. ImageCanvas subclasses java.awt.Canvas, and can be used in any context that calls for a Canvas. It monitors resize and update events and automatically requests tiles from its source on demand. Any displayed area outside the image is displayed in grey.

There is currently no policy regarding what sorts of widgets, if any, will be part of JAI.

Due to the limitations of BufferedImage, only TYPE_BYTE of band 1, 2, 3, 4, and TYPE_USHORT of band 1, 2, 3 images can be displayed using this widget.

This class has been deprecated. The source code has been moved to the samples/widget directory. These widgets are no longer supported.


Inner Class :public interface PaintListener

Field Summary
protected  intcanvasHeight
     The height of the canvas.
protected  intcanvasWidth
     The width of the canvas.
protected  ColorModelcolorModel
     The image's ColorModel or one we supply.
protected  booleandrawBorder
    
protected  RenderedImageim
     The source RenderedImage.
protected  intimHeight
    
protected  intimWidth
    
protected  intmaxTileX
     The image's max X tile.
protected  intmaxTileY
     The image's max Y tile.
protected  intminTileX
     The image's min X tile.
protected  intminTileY
     The image's min Y tile.
protected  intoriginX
     The pixel to display in the upper left corner or the canvas.
protected  intoriginY
     The pixel to display in the upper left corner or the canvas.
protected  intpadX
    
protected  intpadY
    
protected  SampleModelsampleModel
     The image's SampleModel.
protected  inttileGridXOffset
     The image's tile grid X offset.
protected  inttileGridYOffset
     The image's tile grid Y offset.
protected  inttileHeight
     The image's tile height.
protected  inttileWidth
     The image's tile width.

Constructor Summary
public  ImageCanvas(RenderedImage im, boolean drawBorder)
     Constructs an ImageCanvas to display a RenderedImage.
public  ImageCanvas(RenderedImage im)
     Constructs an ImageCanvas to display a RenderedImage.

Method Summary
public  voidaddNotify()
    
public  voidaddPaintListener(PaintListener pl)
     Adds the specified PaintListener to the canvas.
public  DimensiongetMaximumSize()
    
public  DimensiongetMinimumSize()
    
public  DimensiongetPreferredSize()
    
public  intgetXOrigin()
    
public  intgetXPad()
    
public  intgetYOrigin()
    
public  intgetYPad()
    
public synchronized  voidpaint(Graphics g)
     Paint the image onto a Graphics object.
public  voidremovePaintListener(PaintListener pl)
     Removes the specified PaintListener from the canvas.
public synchronized  voidset(RenderedImage im)
     Changes the source image to a new RenderedImage.
public  voidsetBounds(int x, int y, int width, int height)
     Records a new size.
public  voidsetOrigin(int x, int y)
    
public  voidupdate(Graphics g)
     There is no need to erase prior to drawing, so we override the default update method to simply call paint().

Field Detail
canvasHeight
protected int canvasHeight(Code)
The height of the canvas.



canvasWidth
protected int canvasWidth(Code)
The width of the canvas.



colorModel
protected ColorModel colorModel(Code)
The image's ColorModel or one we supply.



drawBorder
protected boolean drawBorder(Code)



im
protected RenderedImage im(Code)
The source RenderedImage.



imHeight
protected int imHeight(Code)



imWidth
protected int imWidth(Code)



maxTileX
protected int maxTileX(Code)
The image's max X tile.



maxTileY
protected int maxTileY(Code)
The image's max Y tile.



minTileX
protected int minTileX(Code)
The image's min X tile.



minTileY
protected int minTileY(Code)
The image's min Y tile.



originX
protected int originX(Code)
The pixel to display in the upper left corner or the canvas.



originY
protected int originY(Code)
The pixel to display in the upper left corner or the canvas.



padX
protected int padX(Code)
used to center image in it's container



padY
protected int padY(Code)



sampleModel
protected SampleModel sampleModel(Code)
The image's SampleModel.



tileGridXOffset
protected int tileGridXOffset(Code)
The image's tile grid X offset.



tileGridYOffset
protected int tileGridYOffset(Code)
The image's tile grid Y offset.



tileHeight
protected int tileHeight(Code)
The image's tile height.



tileWidth
protected int tileWidth(Code)
The image's tile width.




Constructor Detail
ImageCanvas
public ImageCanvas(RenderedImage im, boolean drawBorder)(Code)
Constructs an ImageCanvas to display a RenderedImage.
Parameters:
  im - a RenderedImage to be displayed.
Parameters:
  drawBorder - true if a raised border is desired.



ImageCanvas
public ImageCanvas(RenderedImage im)(Code)
Constructs an ImageCanvas to display a RenderedImage.
Parameters:
  im - a RenderedImage to be displayed.




Method Detail
addNotify
public void addNotify()(Code)



addPaintListener
public void addPaintListener(PaintListener pl)(Code)
Adds the specified PaintListener to the canvas.
since:
   JAI 1.1



getMaximumSize
public Dimension getMaximumSize()(Code)



getMinimumSize
public Dimension getMinimumSize()(Code)



getPreferredSize
public Dimension getPreferredSize()(Code)



getXOrigin
public int getXOrigin()(Code)



getXPad
public int getXPad()(Code)



getYOrigin
public int getYOrigin()(Code)



getYPad
public int getYPad()(Code)



paint
public synchronized void paint(Graphics g)(Code)
Paint the image onto a Graphics object. The painting is performed tile-by-tile, and includes a grey region covering the unused portion of image tiles as well as the general background.



removePaintListener
public void removePaintListener(PaintListener pl)(Code)
Removes the specified PaintListener from the canvas.
since:
   JAI 1.1



set
public synchronized void set(RenderedImage im)(Code)
Changes the source image to a new RenderedImage.



setBounds
public void setBounds(int x, int y, int width, int height)(Code)
Records a new size. Called by the AWT.



setOrigin
public void setOrigin(int x, int y)(Code)
Changes the pixel to set Origin at x,y



update
public void update(Graphics g)(Code)
There is no need to erase prior to drawing, so we override the default update method to simply call paint().



Methods inherited from java.awt.Canvas
public void addNotify()(Code)(Java Doc)
public void createBufferStrategy(int numBuffers)(Code)(Java Doc)
public void createBufferStrategy(int numBuffers, BufferCapabilities caps) throws AWTException(Code)(Java Doc)
public AccessibleContext getAccessibleContext()(Code)(Java Doc)
public BufferStrategy getBufferStrategy()(Code)(Java Doc)
public void paint(Graphics g)(Code)(Java Doc)
public void update(Graphics g)(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.