Java Doc for PhotoFrame.java in  » IDE-Netbeans » mobility » example » photoalbum » 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 » IDE Netbeans » mobility » example.photoalbum 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


example.photoalbum.PhotoFrame

PhotoFrame
class PhotoFrame extends Canvas implements Runnable(Code)
This PhotoFrame provides the picture frame and drives the animation of the frames and the picture. It handles the starting and stopping of the Animation and contains the Thread used to do the timing and requests that the Canvas be repainted periodically. It controls the border style and animation speed.


Field Summary
 intframeCount
    
 intframeRate
    

Constructor Summary
 PhotoFrame()
     Create a new PhotoFrame.

Method Summary
 intgetSpeed()
     Get the speed at which animation occurs.
 intgetStyle()
     Get the style being used for borders.
protected  voidhideNotify()
     Notified when the Canvas is no longer visible.
 booleanintersectsClip(Graphics g, int x, int y, int w, int h)
     Return true if the specified rectangle does not intersect the clipping rectangle of the graphics object.
protected  voidkeyPressed(int keyCode)
     Handle key events.
protected  voidkeyRepeated(int keyCode)
     Handle key repeat events as regular key events.
 voidnext()
     Advance to the next image and wrap around if necessary.
protected  voidpaint(Graphics g)
     Paint is called whenever the canvas should be redrawn.
 voidprevious()
     Back up to the previous image.
 voidreset()
     Reset the PhotoFrame so it holds minimal resources.
public  voidrun()
     Runs the animation and makes the repaint requests.
 voidsetImages(Vector images)
     Set the array of images to be displayed.
 voidsetSpeed(int speed)
     Set the animation speed.
 voidsetStyle(int style)
     Set the frame style.
protected  voidshowNotify()
     Notified when Canvas is made visible.

Field Detail
frameCount
int frameCount(Code)
Number of frames since last frame rate report



frameRate
int frameRate(Code)
Last reported frame rate (for re-paint)




Constructor Detail
PhotoFrame
PhotoFrame()(Code)
Create a new PhotoFrame. Create an offscreen mutable image into which the border is drawn. Border style is none (0). Speed is stopped (0) until set.




Method Detail
getSpeed
int getSpeed()(Code)
Get the speed at which animation occurs. the current speed.
See Also:   setSpeed



getStyle
int getStyle()(Code)
Get the style being used for borders. the style.



hideNotify
protected void hideNotify()(Code)
Notified when the Canvas is no longer visible. Signal the running Thread that it should stop.



intersectsClip
boolean intersectsClip(Graphics g, int x, int y, int w, int h)(Code)
Return true if the specified rectangle does not intersect the clipping rectangle of the graphics object. If it returns true then the object must be drawn otherwise it would be clipped completely. The checks are done
Parameters:
  g - the Graphics context to check.
Parameters:
  x - the x value of the upper left corner of the rectangle
Parameters:
  y - the y value of the upper left corner of the rectangle
Parameters:
  w - the width of the rectangle
Parameters:
  h - the height of the rectangle true if the rectangle intersects the clipping region



keyPressed
protected void keyPressed(int keyCode)(Code)
Handle key events. FIRE events toggle between running and stopped. LEFT and RIGHT key events when stopped show the previous or next image.
Parameters:
  keyCode - of the key pressed



keyRepeated
protected void keyRepeated(int keyCode)(Code)
Handle key repeat events as regular key events.
Parameters:
  keyCode - of the key repeated



next
void next()(Code)
Advance to the next image and wrap around if necessary.



paint
protected void paint(Graphics g)(Code)
Paint is called whenever the canvas should be redrawn. It clears the canvas and draws the frame and the current current frame from the animation.
Parameters:
  g - the Graphics context to which to draw



previous
void previous()(Code)
Back up to the previous image. Wrap around to the end if at the beginning.



reset
void reset()(Code)
Reset the PhotoFrame so it holds minimal resources. The animation thread is stopped.



run
public void run()(Code)
Runs the animation and makes the repaint requests. The thread will exit when it is no longer the current Animation thread.



setImages
void setImages(Vector images)(Code)
Set the array of images to be displayed. Update the width and height of the image and draw the border to fit around it in the offscreen image.
Parameters:
  images - a vector of images to be displayed.



setSpeed
void setSpeed(int speed)(Code)
Set the animation speed. Speed:
  1. 0 = stop
  2. 1 = slow
  3. 2 = medium
  4. 3 = fast
  5. 4 = unlimited

Parameters:
  speed - speedo of animation 0-3;



setStyle
void setStyle(int style)(Code)
Set the frame style. Recreate the photo frame image from the current style and location and size

Style:

  1. Style 0: No border is drawn.
  2. Style 1: A simple border is drawn
  3. Style 2: The border is outlined and an image is created to tile within the border.

Parameters:
  style - the style of the border; 0 = none, 1 = simple,2 = fancy.



showNotify
protected void showNotify()(Code)
Notified when Canvas is made visible. If there is more than one image to display create the thread to run the animation timing.



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