Java Doc for DocCache.java in  » Swing-Library » abeille-forms-designer » org » netbeans » editor » 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 » Swing Library » abeille forms designer » org.netbeans.editor 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.editor.DocCache

DocCache
class DocCache (Code)
Document cache The cache is used to perform insert/remove/read/find operations over the document. The document data are partly stored in cache fragments and partly in cache support. Cache can contain several non-overlapping fragments. At all times there is one fragment called default fragment. It's used for all operations of callers that don't pass valid fragment information to the insert/remove and other methods.
author:
   Miloslav Metelka
version:
   1.00


Field Summary
public  intstatBackOverlapCnt
    
public  intstatFragSetEmpty
    
public  intstatFragSwitchCnt
    
public  intstatInsert
    
public  intstatOverlapCnt
    
public  intstatRead
    
public  intstatReadFragCnt
    
public  intstatRemove
    
public  intstatWriteFragCnt
    

Constructor Summary
public  DocCache(DocCacheSupport support, int len, boolean directMode)
     Create the new cache with the specified size of default fragment.

Method Summary
public synchronized  FragmentaddFragment(int fragLen)
    
public synchronized  intfind(Finder finder, int startPos, int endPos, Fragment frag)
     Find something in the cache using specified Finder.
public synchronized  voidflush()
    
final public synchronized  intgetDocLength()
     Get the total length of the document.
 voidinitCacheContent(char initCache, int offset, int cacheLen)
     Set initial content of the cache.
public synchronized  voidinsert(int pos, char text, Fragment frag)
     Insert the array of chars at some position.
public synchronized  voidinsertString(int pos, String text, Fragment frag)
     Insert the string at some position.
public synchronized  voidread(int pos, char ret, int offset, int len, Fragment frag)
     Read the data from the cache.
final public  char[]read(int pos, int len, Fragment frag)
     Read the data from the cache and return reults as char array.
public synchronized  voidremove(int pos, int len, Fragment frag)
     Remove the specified count of chars from the specified position.
final  voidthrowPosException(int pos)
    
public  StringtoString()
    

Field Detail
statBackOverlapCnt
public int statBackOverlapCnt(Code)



statFragSetEmpty
public int statFragSetEmpty(Code)



statFragSwitchCnt
public int statFragSwitchCnt(Code)



statInsert
public int statInsert(Code)



statOverlapCnt
public int statOverlapCnt(Code)



statRead
public int statRead(Code)



statReadFragCnt
public int statReadFragCnt(Code)



statRemove
public int statRemove(Code)



statWriteFragCnt
public int statWriteFragCnt(Code)




Constructor Detail
DocCache
public DocCache(DocCacheSupport support, int len, boolean directMode)(Code)
Create the new cache with the specified size of default fragment.
Parameters:
  support - CacheSupport to use for the document
Parameters:
  len - Length of the default fragment
Parameters:
  directMode - whether all operations should be routed to support




Method Detail
addFragment
public synchronized Fragment addFragment(int fragLen)(Code)



find
public synchronized int find(Finder finder, int startPos, int endPos, Fragment frag) throws BadLocationException(Code)
Find something in the cache using specified Finder. It covers both forward and backward searches. To do backward search, specify endPos < startPos. The following position intervals are searched: forward search: Parameters:
  finder - finder that will be used for searching
Parameters:
  startPos - position from which search starts. For backward search thisvalue is greater or equal than endPos.
Parameters:
  endPos - limit position of search area For backward search this valueis lower than startPos.
Parameters:
  frag - dedicated fragment (can be null) position where the found string begins or -1 if the text was notfound



flush
public synchronized void flush()(Code)
Flush the whole cache to support



getDocLength
final public synchronized int getDocLength()(Code)
Get the total length of the document.



initCacheContent
void initCacheContent(char initCache, int offset, int cacheLen)(Code)
Set initial content of the cache. This function may be called only once, after construction, before the data in cache are read or manipulated. Otherwise the cache content will be damaged. The reason for using this function is that content that's read from reader and that should be put into support can be also put directly into cache which saves whole support read.
Parameters:
  initCache - initial cache data
Parameters:
  offset - first valid offset in initial cache
Parameters:
  cacheLen - length of data initial cache



insert
public synchronized void insert(int pos, char text, Fragment frag) throws BadLocationException(Code)
Insert the array of chars at some position. It can be done in one or more cycles.
Parameters:
  pos - from which position
Parameters:
  text - text to insert
Parameters:
  frag - dedicated fragment (can be null)



insertString
public synchronized void insertString(int pos, String text, Fragment frag) throws BadLocationException(Code)
Insert the string at some position. It can be done in one or more cycles.
Parameters:
  pos - from which position
Parameters:
  text - text to insert
Parameters:
  frag - dedicated fragment (can be null)



read
public synchronized void read(int pos, char ret, int offset, int len, Fragment frag) throws BadLocationException(Code)
Read the data from the cache. Output array must be provided.
Parameters:
  pos - position from which read starts
Parameters:
  ret - char array where the data should be put. There must be enoughspace in array to hold len requested characters
Parameters:
  offset - offset in return array where data will be written
Parameters:
  len - len to read
Parameters:
  frag - dedicated fragment (can be null)



read
final public char[] read(int pos, int len, Fragment frag) throws BadLocationException(Code)
Read the data from the cache and return reults as char array.
Parameters:
  pos - position from which read starts
Parameters:
  len - len to read
Parameters:
  frag - dedicated fragment (can be null) char array with data from document



remove
public synchronized void remove(int pos, int len, Fragment frag) throws BadLocationException(Code)
Remove the specified count of chars from the specified position.
Parameters:
  pos - position from which remove the text
Parameters:
  len - length of the data to be removed
Parameters:
  frag - dedicated fragment (can be null)



throwPosException
final void throwPosException(int pos) throws BadLocationException(Code)
Throw position exception



toString
public String toString()(Code)



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.