Java Doc for VisualTestCase.java in  » IDE-Netbeans » api » framework » 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 » api » framework 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


framework.VisualTestCase

All known Subclasses:   apichanges.ConnectionWidgetCollisionsCollectorTest,  apichanges.AnimatorListenerTest,  apichanges.WidgetPaintBorderTest,  bugs.FlowLayout105400Test,  bugs.FlowLayoutWeightOverflow108052Test,  apichanges.LabelOrientationTest,  apichanges.OffscreenRenderingTest,  bugs.LayerWidget103528Test,  basic.BasicTest,  apichanges.AnchorNotificationTest,
VisualTestCase
public class VisualTestCase extends NbTestCase (Code)
Visual test case allows to create visual test - usually by creating a snapshot of a scene rendered into an image. Then the image can been "cleaned" by a specific colors at particular regions. Then the image can be tested if colors that remains there.
author:
   David Kaspar



Constructor Summary
public  VisualTestCase(String testName)
     Creates a new visual test case.

Method Summary
public  voidassertCleaness(boolean isClean, BufferedImage snapshot, BufferedImage clean)
     Asserts cleaness and optionally saves snapshots.
public  voidassertScene(Scene scene, Color clearColor, Shape... clearShapes)
     Asserts a scene by taking its snapshots, cleaning specified regions with clear color and asserting that the clear color remains in the snapshot.
public  BufferedImageclearRegions(BufferedImage image, Color clearColor, Shape... clearShapes)
     Creates a new image which is a copy of a specified image and contains "clean" regions.
public  voidsaveImage(BufferedImage image, String imageID)
     Saves an image into the working directory of the test.
public  JFrameshowFrame(Scene scene)
     Shows a frame for a scene and wait until it shown on a screen.
public  JFrameshowFrame(Scene scene, int width, int height)
     Shows a frame of for a scene and wait until it shown on a screen.
public  BufferedImagetakeOneTimeSnapshot(Scene scene)
     Takes a one-time snapshot.
public  BufferedImagetakeOneTimeSnapshot(Scene scene, int width, int height)
     Takes a one-time snapshot.
public  BufferedImagetakeSnapshot(Scene scene)
     Takes a snapshot of a scene.
public  BufferedImagetakeSnapshot(Scene scene, int width, int height)
     Takes a snapshot of a scene.
public  booleantestCleaness(BufferedImage image, Color... colors)
     Checks whether an image contains only specified colors.


Constructor Detail
VisualTestCase
public VisualTestCase(String testName)(Code)
Creates a new visual test case.
Parameters:
  testName - the test name




Method Detail
assertCleaness
public void assertCleaness(boolean isClean, BufferedImage snapshot, BufferedImage clean)(Code)
Asserts cleaness and optionally saves snapshots.
Parameters:
  isClean - if true, nothing happens; if false, the assertion fails
Parameters:
  snapshot - the snapshot image
Parameters:
  clean - the clean snapshot image



assertScene
public void assertScene(Scene scene, Color clearColor, Shape... clearShapes)(Code)
Asserts a scene by taking its snapshots, cleaning specified regions with clear color and asserting that the clear color remains in the snapshot.
Parameters:
  scene - the scene
Parameters:
  clearColor - the clear color
Parameters:
  clearShapes - the clear regions



clearRegions
public BufferedImage clearRegions(BufferedImage image, Color clearColor, Shape... clearShapes)(Code)
Creates a new image which is a copy of a specified image and contains "clean" regions.
Parameters:
  image - the image to be copied
Parameters:
  clearColor - the color by which the regions are cleaned.
Parameters:
  clearShapes - the clean regions the clean image



saveImage
public void saveImage(BufferedImage image, String imageID)(Code)
Saves an image into the working directory of the test.
Parameters:
  image - the image to save
Parameters:
  imageID - the image id used as an image file name



showFrame
public JFrame showFrame(Scene scene)(Code)
Shows a frame for a scene and wait until it shown on a screen. View size is [400,300].
Parameters:
  scene - the scene the frame; null if the frame is not shown in 10 seconds



showFrame
public JFrame showFrame(Scene scene, int width, int height)(Code)
Shows a frame of for a scene and wait until it shown on a screen.
Parameters:
  scene - the scene
Parameters:
  width - the view width
Parameters:
  height - the view height the frame; null if the frame is not shown in 10 seconds



takeOneTimeSnapshot
public BufferedImage takeOneTimeSnapshot(Scene scene)(Code)
Takes a one-time snapshot. Similar to takeSnapshot method but it automatically creates and disposes a frame for it.
Parameters:
  scene - the scene the snapshot



takeOneTimeSnapshot
public BufferedImage takeOneTimeSnapshot(Scene scene, int width, int height)(Code)
Takes a one-time snapshot. Similar to takeSnapshot method but it automatically creates and disposes a frame for it.
Parameters:
  scene - the scene
Parameters:
  width - the scene width
Parameters:
  height - the scene height the snapshot



takeSnapshot
public BufferedImage takeSnapshot(Scene scene)(Code)
Takes a snapshot of a scene. This method assumes that the scene view is already shown on the screen and therefore the scene is initialized correctly.
Parameters:
  scene - the scene the snapshot



takeSnapshot
public BufferedImage takeSnapshot(Scene scene, int width, int height)(Code)
Takes a snapshot of a scene. This method assumes that the scene view is already shown on the screen and therefore the scene is initialized correctly.
Parameters:
  scene - the scene
Parameters:
  width - the snapshot width
Parameters:
  height - the snapshot height the snapshot



testCleaness
public boolean testCleaness(BufferedImage image, Color... colors)(Code)
Checks whether an image contains only specified colors.
Parameters:
  image - the image
Parameters:
  colors - the colors true if the image contains specified colors only; false otherwise



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