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

DocOp
class DocOp implements AbstractDocument.Content(Code)
Document operations. This class enhances basic marks operations by interaction with the data of the document. All mark operations should go through this class. This class implements AbstractDocument.Content interface. BOL means Begin of Line position. EOL means End of Line position.
author:
   Miloslav Metelka
version:
   1.00

Inner Class :class SyntaxUpdateRenderer extends DocMarks.Renderer
Inner Class :class ModifyUndoEdit extends AbstractUndoableEdit

Field Summary
 MarkFactory.SyntaxMarkeolMark
     Mark that is inserted at the end of line (better said after the end of line) where the insertion currently occurs.
 DocMarksmarks
    
 intstatCacheHit
    
 intstatCacheMiss
    

Constructor Summary
 DocOp()
     Construct new document marks operations.

Method Summary
public  StringcacheToString()
    
 voidcheckEOLMark(int pos)
     Check if the EOL syntax mark is at the right place.
public synchronized  PositioncreatePosition(int offset)
    
public synchronized  PositioncreatePosition(int offset, Position.Bias bias)
    
 voiddirectCacheWrite(int pos, char cache, int offset, int len)
     Write directly to the cache-support.
synchronized  intfind(Finder finder, int startPos, int limitPos)
    
synchronized  intgetBOL(int pos)
    
synchronized  intgetBOLFromLine(int line)
    
synchronized  intgetBOLRelLine(int pos, int relLine)
     Advance given position n-lines forward/backward and return BOL.
public  voidgetChars(int where, int len, Segment txt)
    
synchronized  char[]getChars(int pos, int len)
     Retrieve the characters from the document cache.
synchronized  voidgetChars(int pos, char ret, int offset, int len)
     Get the characters into the given buffer.
synchronized  intgetEOL(int pos)
     Get end of line position from position on that line.
synchronized  intgetEOLFromLine(int line)
    
synchronized  intgetEOLNL(int pos)
     Get end of line after the new-line position from position on that line.
synchronized  intgetEOLRelLine(int pos, int relLine)
     Advance given position n-lines forward/backward and return BOL.
 MarkFactory.SyntaxMarkgetLeftSyntaxMark(int pos)
     Get the first syntax mark that is in the left direction from the desired position.
synchronized  intgetLine(int pos)
     Get line from position.
synchronized  intgetLineCount()
    
synchronized  intgetOffsetFromVisCol(int visCol, int startLinePos)
     Get position on line from visual column.
synchronized  MarkgetOffsetMark(int offset, Class markClass)
     Get the first mark of the specified class that lies on the given position.
Parameters:
  offset - position at which the mark is searched
Parameters:
  markClass - the class that the mark must be of.
public  StringgetString(int where, int len)
    
synchronized  intgetVisColFromPos(int pos)
     Get visual column from position.
public  StringinfoToString()
    
 voidinitCacheContent(char initCache, int offset, int cacheLen)
     Initialize the default fragment of the cache by the given data.
 voidinitialReadUpdate()
    
public  UndoableEditinsert(int offset, char[] chars)
    
synchronized  voidinsertEdit(ModifyUndoEdit undoEdit)
    
synchronized  voidinsertMark(Mark mark, int offset)
     Insert new mark at specified position.
 voidinsertMark(Mark mark, int offset, int line)
     Insert mark when knowing even the line offset.
 MarkinsertMark(int pos, boolean insertAfter)
     Insert new mark at specified position.
public  UndoableEditinsertString(int offset, String text)
    
synchronized  voidinsertUpdate(ModifyUndoEdit undoEdit)
     This function is called after document insertion to update marks.
synchronized  voidinvalidateSyntaxMarks()
     Invalidate the state-infos in all the syntax-marks in the whole document.
synchronized  booleanisBOL(int pos)
    
synchronized  booleanisEOL(int pos)
    
public synchronized  intlength()
    
public  StringmarkPlanesToString(Class markClasses, char markChars)
    
synchronized  voidmoveMark(Mark mark, int newPos)
    
 voidprepareSyntax(SyntaxSeg.Slot slot, Syntax syntax, MarkFactory.SyntaxMark leftSyntaxMark, int reqPos, int reqLen, boolean forceLastBuffer, boolean forceNotLastBuffer)
     Prepare syntax scanner so that it's ready to scan from requested position.
Parameters:
  slot - syntax segment slot to be used
Parameters:
  syntax - syntax scanner to be used
Parameters:
  leftSyntaxMark - first syntax mark in the left direction from the reqPos, canbe obtained by getLeftSyntaxMark()
Parameters:
  reqPos - position to which the syntax should be prepared
Parameters:
  reqLen - length that will be scanned by the caller after the syntax isprepared.
 voidprepareSyntax(SyntaxSeg.Slot slot, Syntax syntax, MarkFactory.SyntaxMark leftSyntaxMark, int reqPos, int reqLen, boolean forceLastBuffer)
    
public  UndoableEditremove(int offset, int len)
    
synchronized  voidremoveEdit(ModifyUndoEdit undoEdit)
    
synchronized  voidremoveUpdate(ModifyUndoEdit undoEdit)
     This function is called after document removal to update marks.
synchronized  voidrenderMarks(DocMarks.Renderer r)
    
 voidsetDocument(BaseDocument doc)
    
public  StringtoString()
    

Field Detail
eolMark
MarkFactory.SyntaxMark eolMark(Code)
Mark that is inserted at the end of line (better said after the end of line) where the insertion currently occurs. The mark is possibly moved and/or updated before the insertion/removal occurs. Then after the insertion/removal is done mark syntax state is checked again. If it's the same as before it's not necessary to paint the next line after insertion. If it's not the same the painting must continue till the syntax mark with matching state.



marks
DocMarks marks(Code)
Document marks handling



statCacheHit
int statCacheHit(Code)
Statistics



statCacheMiss
int statCacheMiss(Code)




Constructor Detail
DocOp
DocOp()(Code)
Construct new document marks operations. Since this class uses both cache and marks both these classes must be already created in document.




Method Detail
cacheToString
public String cacheToString()(Code)
Dump the line cache



checkEOLMark
void checkEOLMark(int pos)(Code)
Check if the EOL syntax mark is at the right place. If not, move it to the end of current line and update it with the right syntax information. It uses instance of syntax used in document.



createPosition
public synchronized Position createPosition(int offset) throws BadLocationException(Code)



createPosition
public synchronized Position createPosition(int offset, Position.Bias bias) throws BadLocationException(Code)



directCacheWrite
void directCacheWrite(int pos, char cache, int offset, int len) throws BadLocationException(Code)
Write directly to the cache-support. This method is used solely by Analyzer when document is read.



find
synchronized int find(Finder finder, int startPos, int limitPos) throws BadLocationException(Code)



getBOL
synchronized int getBOL(int pos) throws BadLocationException(Code)
Get begin of line from position on that line
Parameters:
  position - where the search begins position of begin of the same line



getBOLFromLine
synchronized int getBOLFromLine(int line)(Code)
Get the begining position of specified line
Parameters:
  line - line offset for which the BOL should be determined position of the begining of line or -1 if line is invalid



getBOLRelLine
synchronized int getBOLRelLine(int pos, int relLine) throws BadLocationException(Code)
Advance given position n-lines forward/backward and return BOL.



getChars
public void getChars(int where, int len, Segment txt) throws BadLocationException(Code)



getChars
synchronized char[] getChars(int pos, int len) throws BadLocationException(Code)
Retrieve the characters from the document cache.



getChars
synchronized void getChars(int pos, char ret, int offset, int len) throws BadLocationException(Code)
Get the characters into the given buffer. The buffer must contain enough space for the requested data.



getEOL
synchronized int getEOL(int pos) throws BadLocationException(Code)
Get end of line position from position on that line.



getEOLFromLine
synchronized int getEOLFromLine(int line)(Code)
Get end of line position from specified line



getEOLNL
synchronized int getEOLNL(int pos) throws BadLocationException(Code)
Get end of line after the new-line position from position on that line. This is in fact the begining of the next line except the last line.



getEOLRelLine
synchronized int getEOLRelLine(int pos, int relLine) throws BadLocationException(Code)
Advance given position n-lines forward/backward and return BOL.



getLeftSyntaxMark
MarkFactory.SyntaxMark getLeftSyntaxMark(int pos)(Code)
Get the first syntax mark that is in the left direction from the desired position.



getLine
synchronized int getLine(int pos) throws BadLocationException(Code)
Get line from position. This is used for example when removal from document is made to find right line number for marks update.



getLineCount
synchronized int getLineCount()(Code)



getOffsetFromVisCol
synchronized int getOffsetFromVisCol(int visCol, int startLinePos) throws BadLocationException(Code)
Get position on line from visual column. This method can be used only for superfixed font i.e. all characters of all font styles have the same width.
Parameters:
  visCol - visual column
Parameters:
  startLinePos - position of line start position on line for particular x-coord



getOffsetMark
synchronized Mark getOffsetMark(int offset, Class markClass)(Code)
Get the first mark of the specified class that lies on the given position.
Parameters:
  offset - position at which the mark is searched
Parameters:
  markClass - the class that the mark must be of. It can be also an instanceof a descendant of this class (Class.isInstance isused). mark that matches the condition or null.



getString
public String getString(int where, int len) throws BadLocationException(Code)



getVisColFromPos
synchronized int getVisColFromPos(int pos) throws BadLocationException(Code)
Get visual column from position. This method can be used only for superfixed font i.e. all characters of all font styles have the same width.
Parameters:
  pos - position for which the visual column should be returned thefunction itself computes the begining of the line first



infoToString
public String infoToString()(Code)



initCacheContent
void initCacheContent(char initCache, int offset, int cacheLen)(Code)
Initialize the default fragment of the cache by the given data. This method is used solely by Analyzer when document is read.



initialReadUpdate
void initialReadUpdate()(Code)



insert
public UndoableEdit insert(int offset, char[] chars) throws BadLocationException(Code)



insertEdit
synchronized void insertEdit(ModifyUndoEdit undoEdit) throws BadLocationException(Code)



insertMark
synchronized void insertMark(Mark mark, int offset) throws BadLocationException, InvalidMarkException(Code)
Insert new mark at specified position. This function finds the appropriate line number.



insertMark
void insertMark(Mark mark, int offset, int line) throws BadLocationException, InvalidMarkException(Code)
Insert mark when knowing even the line offset. This method is used solely by Analyzer when document is read.



insertMark
Mark insertMark(int pos, boolean insertAfter) throws BadLocationException(Code)
Insert new mark at specified position. The function finds appropriate line number.



insertString
public UndoableEdit insertString(int offset, String text) throws BadLocationException(Code)



insertUpdate
synchronized void insertUpdate(ModifyUndoEdit undoEdit)(Code)
This function is called after document insertion to update marks. Event parameter contains inserted chars and also how many lines was inserted.



invalidateSyntaxMarks
synchronized void invalidateSyntaxMarks()(Code)
Invalidate the state-infos in all the syntax-marks in the whole document.



isBOL
synchronized boolean isBOL(int pos) throws BadLocationException(Code)
Is the position at the begining of the line?



isEOL
synchronized boolean isEOL(int pos) throws BadLocationException(Code)
Is the position at the end of the line?



length
public synchronized int length()(Code)



markPlanesToString
public String markPlanesToString(Class markClasses, char markChars)(Code)



moveMark
synchronized void moveMark(Mark mark, int newPos) throws BadLocationException, InvalidMarkException(Code)
Moves the mark to different position



prepareSyntax
void prepareSyntax(SyntaxSeg.Slot slot, Syntax syntax, MarkFactory.SyntaxMark leftSyntaxMark, int reqPos, int reqLen, boolean forceLastBuffer, boolean forceNotLastBuffer) throws BadLocationException(Code)
Prepare syntax scanner so that it's ready to scan from requested position.
Parameters:
  slot - syntax segment slot to be used
Parameters:
  syntax - syntax scanner to be used
Parameters:
  leftSyntaxMark - first syntax mark in the left direction from the reqPos, canbe obtained by getLeftSyntaxMark()
Parameters:
  reqPos - position to which the syntax should be prepared
Parameters:
  reqLen - length that will be scanned by the caller after the syntax isprepared. The prepareSyntax() automatically preloads this areainto the syntax segment slot.
Parameters:
  forceLastBuffer - force the syntax to think that the scanned area is the last inthe document. This is useful for forcing the syntax to processall the characters in the given area.
Parameters:
  forceNotLastBuffer - force the syntax to think that the scanned area is NOT thelast buffer in the document. This is useful when the syntaxwill continue scanning on another buffer.



prepareSyntax
void prepareSyntax(SyntaxSeg.Slot slot, Syntax syntax, MarkFactory.SyntaxMark leftSyntaxMark, int reqPos, int reqLen, boolean forceLastBuffer) throws BadLocationException(Code)



remove
public UndoableEdit remove(int offset, int len) throws BadLocationException(Code)



removeEdit
synchronized void removeEdit(ModifyUndoEdit undoEdit) throws BadLocationException(Code)



removeUpdate
synchronized void removeUpdate(ModifyUndoEdit undoEdit)(Code)
This function is called after document removal to update marks. Event parameter contains removed chars and also how many lines was removed.



renderMarks
synchronized void renderMarks(DocMarks.Renderer r)(Code)



setDocument
void setDocument(BaseDocument doc)(Code)



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.