Java Doc for WingImage.java in  » Web-Framework » wingS » com » javujavu » javux » wings » 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 » Web Framework » wingS » com.javujavu.javux.wings 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.javujavu.javux.wings.WingImage

WingImage
public class WingImage (Code)
This class extends functionality of java.awt.Image. WingImage contains java.awt.Image object as source image and following parameters describing how the image is rendered.
  • source rectangle - describing used area of source image,
  • optional stretch insets - describing stretch margin,
  • optional tile mode - telling if the image is stretched or tiled,
  • optional alpha - making the image transparent as a whole

This is one of the core WingS classes required by all the components

This class is thread safe.


Field Summary
final public static  intNO_TILE
    
final public static  intTILE_E
    
final public static  intTILE_N
    
final public static  intTILE_NE
    
final public static  intTILE_NW
    
final public static  intTILE_S
    
final public static  intTILE_SE
    
final public static  intTILE_SW
    
final public static  intTILE_W
    
protected  intalpha
    
protected  Imageimage
    
protected  Rectanglesrc
    
protected  Insetsstretch
    
protected  ImagestretchBuffer
    
protected  inttile
    

Constructor Summary
public  WingImage(WingImage image, int part, int width, int height)
    
public  WingImage(WingImage image)
    
public  WingImage(WingImage image, int x, int y, int width, int height)
    
public  WingImage(Image image)
    
public  WingImage(Image image, int x, int y, int width, int height)
    

Method Summary
public  booleandrawImage(Graphics g, int x, int y, ImageObserver o)
     Draws the image.
Parameters:
  g - destination graphics
Parameters:
  x - the x coordinate.
Parameters:
  y - the y coordinate.
Parameters:
  o - object to be notified as more of the image is available.
public  booleandrawImage(Graphics g, int x, int y, int w, int h, ImageObserver o)
     Draws the image scaling if necessary using its stretch margin and tile mode.
Parameters:
  g - destination graphics
Parameters:
  x - the x coordinate.
Parameters:
  y - the y coordinate.
Parameters:
  w - the width of the rectangle.
Parameters:
  h - the height of the rectangle.
Parameters:
  o - object to be notified as more of the image is available.
public  booleandrawSmoothImage(Graphics g, int x, int y, int w, int h, ImageObserver o)
    
public  intgetAlpha()
    
public  intgetHeight()
    
public  ImagegetImage()
    
public  RectanglegetSourceRect()
    
public  InsetsgetStretch()
    
public  intgetTile()
    
public  intgetWidth()
    
public static  ImageloadImage(String filePath)
    
public static  ImageloadImage(URL location)
    
public static  ImageloadImage(String file, Class ref)
    
public static  ImageloadImage(byte[] data)
    
public static  ImageloadImage(Image img)
    
public  voidsetAlpha(int alpha)
    
public  voidsetStretch(Insets stretch)
    
public  voidsetTile(int tile)
    

Field Detail
NO_TILE
final public static int NO_TILE(Code)
no tile, the image is stretched along X and Y axis



TILE_E
final public static int TILE_E(Code)
the image is stretched along Y axis and tiled along X axis starting from the east border



TILE_N
final public static int TILE_N(Code)
the image is stretched along X axis and tiled along Y axis starting from the north border



TILE_NE
final public static int TILE_NE(Code)
the image is tiled along X and Y axis starting from the northeast corner



TILE_NW
final public static int TILE_NW(Code)
the image is tiled along X and Y axis starting from the northwest corner



TILE_S
final public static int TILE_S(Code)
the image is stretched along X axis and tiled along Y axis starting from the south border



TILE_SE
final public static int TILE_SE(Code)
the image is tiled along X and Y axis starting from the southeast corner



TILE_SW
final public static int TILE_SW(Code)
the image is tiled along X and Y axis starting from the south-west corner



TILE_W
final public static int TILE_W(Code)
the image is stretched along Y axis and tiled along X axis starting from the west border



alpha
protected int alpha(Code)



image
protected Image image(Code)



src
protected Rectangle src(Code)



stretch
protected Insets stretch(Code)



stretchBuffer
protected Image stretchBuffer(Code)



tile
protected int tile(Code)




Constructor Detail
WingImage
public WingImage(WingImage image, int part, int width, int height)(Code)
Creates a new WingImage calculating source rectangle in the following way:
area of the source image is threat as a grid with the specified cell size, the source rectangle is an area covering specified cell of the grid counting from the top left corner
All other properties are derived from the source image
Parameters:
  image - source image
Parameters:
  part - grid cell number
Parameters:
  width - grid cell width
Parameters:
  height - grid cell height



WingImage
public WingImage(WingImage image)(Code)
Creates a new WingImage using the whole area of the source image
All other properties are derived from the source image
Parameters:
  image - source image



WingImage
public WingImage(WingImage image, int x, int y, int width, int height)(Code)
Creates a new WingImage using specified area of the source image
All other properties are derived from the source image
Parameters:
  image - source image
Parameters:
  x - x coordinate
Parameters:
  y - y coordinate
Parameters:
  width - width
Parameters:
  height - height



WingImage
public WingImage(Image image)(Code)
Creates a new WingImage using the whole area of the source image

Parameters:
  image - source image



WingImage
public WingImage(Image image, int x, int y, int width, int height)(Code)
Creates a new WingImage using specified area of the source image

Parameters:
  image - source image
Parameters:
  x - x coordinate
Parameters:
  y - y coordinate
Parameters:
  width - width
Parameters:
  height - height




Method Detail
drawImage
public boolean drawImage(Graphics g, int x, int y, ImageObserver o)(Code)
Draws the image.
Parameters:
  g - destination graphics
Parameters:
  x - the x coordinate.
Parameters:
  y - the y coordinate.
Parameters:
  o - object to be notified as more of the image is available. false if the image pixels are still changing;true otherwise.



drawImage
public boolean drawImage(Graphics g, int x, int y, int w, int h, ImageObserver o)(Code)
Draws the image scaling if necessary using its stretch margin and tile mode.
Parameters:
  g - destination graphics
Parameters:
  x - the x coordinate.
Parameters:
  y - the y coordinate.
Parameters:
  w - the width of the rectangle.
Parameters:
  h - the height of the rectangle.
Parameters:
  o - object to be notified as more of the image is available. false if the image pixels are still changing;true otherwise.



drawSmoothImage
public boolean drawSmoothImage(Graphics g, int x, int y, int w, int h, ImageObserver o)(Code)



getAlpha
public int getAlpha()(Code)
Returns value of the alpha property alpha value



getHeight
public int getHeight()(Code)
Returns height of the source rectangle height of the source rectangle



getImage
public Image getImage()(Code)
Returns source image source image



getSourceRect
public Rectangle getSourceRect()(Code)
Returns the source rectangle used source rectangle



getStretch
public Insets getStretch()(Code)
Returns the stretch margin the stretch margin



getTile
public int getTile()(Code)
Returns the tile mode the tile mode



getWidth
public int getWidth()(Code)
Returns width of the source rectangle width of the source rectangle



loadImage
public static Image loadImage(String filePath)(Code)



loadImage
public static Image loadImage(URL location)(Code)



loadImage
public static Image loadImage(String file, Class ref)(Code)



loadImage
public static Image loadImage(byte[] data)(Code)



loadImage
public static Image loadImage(Image img)(Code)



setAlpha
public void setAlpha(int alpha)(Code)
Sets the alpha property
Parameters:
  alpha - a new alpha value in the range 0-255



setStretch
public void setStretch(Insets stretch)(Code)
Sets the stretch margin
Parameters:
  stretch - new stretch margin



setTile
public void setTile(int tile)(Code)
Sets the tile mode
Parameters:
  tile - new tile mode



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.