Java Doc for DefStyledDoc_Helpers.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.DefStyledDoc_Helpers

DefStyledDoc_Helpers
final public class DefStyledDoc_Helpers extends Assert (Code)
Contains "complex" assert methods as well as logging versions of DefaultStyledDocument and DefaultStyledDocument.ElementBuffer which facilitate testing and debugging.

Inner Class :public static class DefStyledDocWithLogging extends DefaultStyledDocument
Inner Class :public static class ElementBufferWithLogging extends DefaultStyledDocument.ElementBuffer

Field Summary
final public static  AttributeSetbold
    
final public static  AttributeSetitalic
    
public static  booleanlogging
    


Method Summary
public static  voidassertChange(Object object, Element element, int removed, int added)
     Asserts that the expected number of children was removed and/or added to an element.
public static  voidassertChange(ElementChange change, int[] removedOffsets, int[] addedOffsets)
     Asserts that the removed and/or added children have the expected offsets.
public static  voidassertChange(Object change, Element element, int index, int[] removed, int[] added)
     Asserts that ElementChange has expected field values.
public static  voidassertChildren(Element element, int[] offsets)
     Asserts that an element has children with the expected offsets.
public static  voidassertChildren(Element element, int[] offsets, AttributeSet[] attributes)
     Asserts that an element has children with the expected offsets and attributes.
public static  voidassertSpec(ElementSpec spec, short type, short direction, int offset, int length, boolean isNullArray)
     Asserts that an element spec is as expected.
public static  voidassertSpec(ElementSpec spec, short type, short direction, int offset, int length)
     Asserts that an element spec is as expected.
public static  voidassertSpec(ElementSpec expected, ElementSpec actual)
     Compares two ElementSpec objects.
public static  voidassertSpecs(ElementSpec[] expected, ElementSpec[] actual)
     Compares two arrays of ElementSpec objects.
public static  VectorgetEdits(DefaultDocumentEvent event)
     Returns the list of edits stored in DefaultDocumentEvent object.
Parameters:
  event - the event from which to extract the field.
public static  voidprintChange(ElementChange change)
     Dumps the changes stored in change.
public static  voidprintChanges(List edits)
     Prints all the changes to elements performed.
public static  voidprintElementSpecs(ElementSpec[] spec)
     Prints the specs contained in an array.
public static  voidprintElements(Element[] elems)
     Prints elements contained in an array.

Field Detail
bold
final public static AttributeSet bold(Code)



italic
final public static AttributeSet italic(Code)



logging
public static boolean logging(Code)





Method Detail
assertChange
public static void assertChange(Object object, Element element, int removed, int added)(Code)
Asserts that the expected number of children was removed and/or added to an element.
Parameters:
  object - ElementChange implementation which storesthe information.
Parameters:
  element - the element modified.
Parameters:
  removed - the number of children removed.
Parameters:
  added - the number of children added



assertChange
public static void assertChange(ElementChange change, int[] removedOffsets, int[] addedOffsets)(Code)
Asserts that the removed and/or added children have the expected offsets.
Parameters:
  change - the changes performed to an element.
Parameters:
  removedOffsets - the offsets of children removed in the form{start1, end1, start2, end2, ...}.
Parameters:
  addedOffsets - the offsets of children added in the same form asremovedOffsets.



assertChange
public static void assertChange(Object change, Element element, int index, int[] removed, int[] added)(Code)
Asserts that ElementChange has expected field values.
Parameters:
  change - the change
Parameters:
  element - element where the change occurred
Parameters:
  index - index where the change occurred
Parameters:
  removed - offsets of the elements removed
Parameters:
  added - offsets of the elements added



assertChildren
public static void assertChildren(Element element, int[] offsets)(Code)
Asserts that an element has children with the expected offsets.
Parameters:
  element - the element where to check children.
Parameters:
  offsets - the expected offsets in the form{start1, end1, start2, end2, ...}.



assertChildren
public static void assertChildren(Element element, int[] offsets, AttributeSet[] attributes)(Code)
Asserts that an element has children with the expected offsets and attributes.
Parameters:
  element - the element where to check children.
Parameters:
  offsets - the expected offsets.
Parameters:
  attributes - the expected attributes; null if noattributes expected.



assertSpec
public static void assertSpec(ElementSpec spec, short type, short direction, int offset, int length, boolean isNullArray)(Code)
Asserts that an element spec is as expected.
Parameters:
  spec - the spec to check.
Parameters:
  type - the type of the spec.
Parameters:
  direction - the direction of the spec.
Parameters:
  offset - the offset of the spec.
Parameters:
  length - the length of the spec.



assertSpec
public static void assertSpec(ElementSpec spec, short type, short direction, int offset, int length)(Code)
Asserts that an element spec is as expected.
Parameters:
  spec - the spec to check.
Parameters:
  type - the type of the spec.
Parameters:
  direction - the direction of the spec.
Parameters:
  offset - the offset of the spec.
Parameters:
  length - the length of the spec.



assertSpec
public static void assertSpec(ElementSpec expected, ElementSpec actual)(Code)
Compares two ElementSpec objects.
Parameters:
  expected - the expected spec.
Parameters:
  actual - the actual spec.



assertSpecs
public static void assertSpecs(ElementSpec[] expected, ElementSpec[] actual)(Code)
Compares two arrays of ElementSpec objects.
Parameters:
  expected - array with expected specs.
Parameters:
  actual - array with the actual specs.



getEdits
public static Vector getEdits(DefaultDocumentEvent event)(Code)
Returns the list of edits stored in DefaultDocumentEvent object.
Parameters:
  event - the event from which to extract the field. returns the edits fromjavax.swing.undo.CompoundEdit, or nullif something goes wrong.



printChange
public static void printChange(ElementChange change)(Code)
Dumps the changes stored in change.
Parameters:
  change - the change to print removed and added children from.



printChanges
public static void printChanges(List edits)(Code)
Prints all the changes to elements performed.
Parameters:
  edits - the list extracted from a DefaultDocumentEvetobject.



printElementSpecs
public static void printElementSpecs(ElementSpec[] spec)(Code)
Prints the specs contained in an array.
Parameters:
  spec - the array containing specs of interest.



printElements
public static void printElements(Element[] elems)(Code)
Prints elements contained in an array.
Parameters:
  elems - the array containing elements of interest.



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