Java Doc for DefaultStyledDocument_ElementBuffer_Specs2Test.java in  » Apache-Harmony-Java-SE » javax-package » javax » swing » text » 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 » Apache Harmony Java SE » javax package » javax.swing.text 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.swing.text.DefaultStyledDocument_ElementBuffer_Specs2Test

DefaultStyledDocument_ElementBuffer_Specs2Test
public class DefaultStyledDocument_ElementBuffer_Specs2Test extends TestCase implements DocumentListener(Code)
Tests DefaultStyledDocument class, in particular which ElementSpecs are created during insertString with different parameters.

These tests insert some text into document containing following text "first\nsecond\nthird" plus implied newline character. Thus document has three paragraphs (Branch) with one content (Leaf) under each paragraph. Except for the above, this test-case is similar to DefaultStyledDocument_ElementBuffer_Spec1Test.

The text is inserted into leaf of modifiedIndex at offset insertOffset. By default modifiedIndex = 1 (the second paragraph), and offset is two chars to the right from the start, i.e. the text is inserted after "se".

Tests are classified as follows:

0x
No attributes are set or passed as parameters.
1x
The paragraph contains bold attributes; the text is inserted with null as attrs parameter.
2x
The character attributes set to bold; the text is inserted with null as attrs parameter.
3x
No attributes are set; the text is inserted with italic attributes.
4x
The paragraph contains bold attributes; the text is inserted with italic attributes.
5x
The character attributes set to bold; the text is inserted with italic attributes.

Each test-case region currently contains four tests.





Method Summary
public  voidchangedUpdate(DocumentEvent e)
    
public  voidinsertUpdate(DocumentEvent e)
    
public  voidremoveUpdate(DocumentEvent e)
    
protected  voidsetUp()
    
public  voidtestInsertString01()
     No attributes, text 'one', doc is empty.
public  voidtestInsertString02()
     No attributes, text 'one\n', doc is empty.
public  voidtestInsertString03()
     No attributes, text '\none', doc is empty.
public  voidtestInsertString04()
     No attributes, text 'one\ntwo', doc is empty.
public  voidtestInsertString11()
     Bold attribute on paragraph, text 'one' with no attributes, doc is empty.
public  voidtestInsertString12()
     Bold attribute on paragraph, text 'one\n' with no attributes, doc is empty.
public  voidtestInsertString13()
     Bold attribute on paragraph, text '\none' with no attributes, doc is empty.
public  voidtestInsertString14()
     Bold attribute on paragraph, text 'one\ntwo' with no attributes, doc is empty.
public  voidtestInsertString21()
     Bold attribute on character, text 'one' with no attributes, doc is empty.
public  voidtestInsertString22()
     Bold attribute on character, text 'one\n' with no attributes, doc is empty.
public  voidtestInsertString23()
     Bold attribute on character, text '\none' with no attributes, doc is empty.
public  voidtestInsertString24()
     Bold attribute on character, text 'one\ntwo' with no attributes, doc is empty.
public  voidtestInsertString31()
     No attributes, text 'one' with italic, doc is empty.
public  voidtestInsertString32()
     No attributes, text 'one\n' with italic, doc is empty.
public  voidtestInsertString33()
     No attributes, text '\none' with italic, doc is empty.
public  voidtestInsertString34()
     No attributes, text 'one\ntwo' with italic, doc is empty.
public  voidtestInsertString41()
     Bold attribute on paragraph, text 'one' with italic, doc is empty.
public  voidtestInsertString42()
     Bold attribute on paragraph, text 'one\n' with italic, doc is empty.
public  voidtestInsertString43()
     Bold attribute on paragraph, text '\none' with italic, doc is empty.
public  voidtestInsertString44()
     Bold attribute on paragraph, text 'one\ntwo' with italic, doc is empty.
public  voidtestInsertString51()
     Bold attribute on character, text 'one' with italic, doc is empty.
public  voidtestInsertString52()
     Bold attribute on character, text 'one\n' with italic, doc is empty.
public  voidtestInsertString53()
     Bold attribute on character, text '\none' with italic, doc is empty.
public  voidtestInsertString54()
     Bold attribute on character, text 'one\ntwo' with italic, doc is empty.



Method Detail
changedUpdate
public void changedUpdate(DocumentEvent e)(Code)



insertUpdate
public void insertUpdate(DocumentEvent e)(Code)



removeUpdate
public void removeUpdate(DocumentEvent e)(Code)



setUp
protected void setUp() throws Exception(Code)



testInsertString01
public void testInsertString01() throws Exception(Code)
No attributes, text 'one', doc is empty.



testInsertString02
public void testInsertString02() throws Exception(Code)
No attributes, text 'one\n', doc is empty.



testInsertString03
public void testInsertString03() throws Exception(Code)
No attributes, text '\none', doc is empty.



testInsertString04
public void testInsertString04() throws Exception(Code)
No attributes, text 'one\ntwo', doc is empty.



testInsertString11
public void testInsertString11() throws Exception(Code)
Bold attribute on paragraph, text 'one' with no attributes, doc is empty.



testInsertString12
public void testInsertString12() throws Exception(Code)
Bold attribute on paragraph, text 'one\n' with no attributes, doc is empty.



testInsertString13
public void testInsertString13() throws Exception(Code)
Bold attribute on paragraph, text '\none' with no attributes, doc is empty.



testInsertString14
public void testInsertString14() throws Exception(Code)
Bold attribute on paragraph, text 'one\ntwo' with no attributes, doc is empty.



testInsertString21
public void testInsertString21() throws Exception(Code)
Bold attribute on character, text 'one' with no attributes, doc is empty.



testInsertString22
public void testInsertString22() throws Exception(Code)
Bold attribute on character, text 'one\n' with no attributes, doc is empty.



testInsertString23
public void testInsertString23() throws Exception(Code)
Bold attribute on character, text '\none' with no attributes, doc is empty.



testInsertString24
public void testInsertString24() throws Exception(Code)
Bold attribute on character, text 'one\ntwo' with no attributes, doc is empty.



testInsertString31
public void testInsertString31() throws Exception(Code)
No attributes, text 'one' with italic, doc is empty.



testInsertString32
public void testInsertString32() throws Exception(Code)
No attributes, text 'one\n' with italic, doc is empty.



testInsertString33
public void testInsertString33() throws Exception(Code)
No attributes, text '\none' with italic, doc is empty.



testInsertString34
public void testInsertString34() throws Exception(Code)
No attributes, text 'one\ntwo' with italic, doc is empty.



testInsertString41
public void testInsertString41() throws Exception(Code)
Bold attribute on paragraph, text 'one' with italic, doc is empty.



testInsertString42
public void testInsertString42() throws Exception(Code)
Bold attribute on paragraph, text 'one\n' with italic, doc is empty.



testInsertString43
public void testInsertString43() throws Exception(Code)
Bold attribute on paragraph, text '\none' with italic, doc is empty.



testInsertString44
public void testInsertString44() throws Exception(Code)
Bold attribute on paragraph, text 'one\ntwo' with italic, doc is empty.



testInsertString51
public void testInsertString51() throws Exception(Code)
Bold attribute on character, text 'one' with italic, doc is empty.



testInsertString52
public void testInsertString52() throws Exception(Code)
Bold attribute on character, text 'one\n' with italic, doc is empty.



testInsertString53
public void testInsertString53() throws Exception(Code)
Bold attribute on character, text '\none' with italic, doc is empty.



testInsertString54
public void testInsertString54() throws Exception(Code)
Bold attribute on character, text 'one\ntwo' with italic, doc is empty.



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