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

MarkBlock
public class MarkBlock (Code)
Block of text created using two marks. These blocks can be chained. Existing block can be compared to other block (better pair of positions) and there's extensive list of result values of such comparison.
author:
   Miloslav Metelka
version:
   1.00


Field Summary
final public static  intAFTER
     Tested block completely after THIS mark block.
final public static  intBEFORE
     Tested block completely before THIS mark block.
final public static  intCONTINUE
     Single bit value that means that the tested block doesn't overlap with THIS block, but either its start position is equal to end position of THIS block or its end position is equal to the start position of THIS block.
final public static  intCONTINUE_BEGIN
     Tested block completely before THIS mark block but its end position equals to the start position of THIS block.
final public static  intCONTINUE_END
     Tested block completely after THIS mark block but its start position equals to the end position of THIS block.
final public static  intEMPTY
     Single bit value meaning that the tested block has zero size.
final public static  intEXTEND
     Two bit value meaning that the tested block fully includes THIS block. The block must be extended at least by one character, otherwise the 'inside' values will be used.
final public static  intEXTEND_BEGIN
     Start position of the tested block is lower than the start position of THIS block and both end positions are the same.
final public static  intEXTEND_END
     End position of the tested block is greater than the end position of THIS block and both start positions are the same.
final public static  intIGNORE_EMPTY
     This value can be used to clear the two bits saying if the tested or THIS block are empty (The EMPTY and THIS_EMPTY are cleared).
final public static  intINCLUDE
     Tested block fully includes THIS block and extends it by at least one character in both directions.
final public static  intINNER
     Tested block is fully inside THIS block and there is at least one more character left in THIS block after the end of the tested block in both directions.
final public static  intINSIDE
     Two bit value meaning that the tested block is fully inside THIS block.
final public static  intINSIDE_BEGIN
     Tested block completely inside THIS block and its end position is lower than end position of THIS block and start positions are the same.
final public static  intINSIDE_END
     Tested block completely inside THIS block and its start position is greater than THIS block start position and end positions are the same.
final public static  intINVALID
     This value is not used directly in this class but can be used by other classes to report that the comparison of blocks has no sense for some reason.
final public static  intOVERLAP
     Single bit value that means that tested block and THIS block partially or fully overlap.
final public static  intOVERLAP_BEGIN
     Tested block partly covers begining of THIS mark block.
final public static  intOVERLAP_END
     Tested block partly covers end of THIS mark block.
final public static  intSAME
     The blocks have exactly the same start and end positions.
final public static  intTHIS_EMPTY
     Single bit value meaning that THIS block has zero size.
protected  BaseDocumentdoc
    
public  MarkendMark
    
protected  MarkBlocknext
    
protected  MarkBlockprev
    
public  MarkstartMark
    

Constructor Summary
public  MarkBlock(BaseDocument doc, Mark startMark, Mark endMark)
    
public  MarkBlock(BaseDocument doc, int startPos, int endPos)
    
public  MarkBlock(BaseDocument doc, Mark startMark, Mark endMark, int startPos, int endPos)
    

Method Summary
public  MarkBlockaddChain(MarkBlock blk)
    
public  booleancheckReverse()
    
public  intcompare(int startPos, int endPos)
     Compares the position of the given block against current block.
public static  StringdebugRelation(int rel)
    
 voiddestroyMarks()
    
public  booleanextend(int startPos, int endPos, boolean concat)
     Extend this mark block by start and end positions.
public  booleanextend(MarkBlock blk, boolean concat)
     Extend this mark block by some other block. whether the block was extended.
public  intextendEnd(int endPos)
     Possibly move end mark if its position is above the given number.
public  intextendStart(int startPos)
     Possibly move start mark if its position is above the given number.
protected  voidfinalize()
    
public  DocumentgetDocument()
    
public  intgetEndOffset()
    
final public  MarkBlockgetNext()
    
final public  MarkBlockgetPrev()
    
public  intgetStartOffset()
    
public  MarkBlockinsertChain(MarkBlock blk)
    
public  booleanisReverse()
    
public  MarkBlockremoveChain()
    
public  voidreverse()
    
final public  voidsetNext(MarkBlock b)
    
public  voidsetNextChain(MarkBlock b)
     Set the next block of this one in the chain.
final public  voidsetPrev(MarkBlock b)
    
public  voidsetPrevChain(MarkBlock b)
    
public  intshrink(int startPos, int endPos)
     Shrink this mark block by the block specified.
public  StringtoString()
    
public  StringtoStringChain()
    

Field Detail
AFTER
final public static int AFTER(Code)
Tested block completely after THIS mark block.



BEFORE
final public static int BEFORE(Code)
Tested block completely before THIS mark block.



CONTINUE
final public static int CONTINUE(Code)
Single bit value that means that the tested block doesn't overlap with THIS block, but either its start position is equal to end position of THIS block or its end position is equal to the start position of THIS block. Simply they together make one continuous block. The values for which this bit is set are: CONTINUE_BEGIN, CONTINUE_END.



CONTINUE_BEGIN
final public static int CONTINUE_BEGIN(Code)
Tested block completely before THIS mark block but its end position equals to the start position of THIS block. They together make one continuous block. The value is BEFORE | CONTINUE.



CONTINUE_END
final public static int CONTINUE_END(Code)
Tested block completely after THIS mark block but its start position equals to the end position of THIS block. They together make one continuous block. The value is AFTER | CONTINUE.



EMPTY
final public static int EMPTY(Code)
Single bit value meaning that the tested block has zero size.



EXTEND
final public static int EXTEND(Code)
Two bit value meaning that the tested block fully includes THIS block. The block must be extended at least by one character, otherwise the 'inside' values will be used. It is included in the following values: EXTEND_BEGIN, INCLUDE, EXTEND_END. The value includes OVERLAP.



EXTEND_BEGIN
final public static int EXTEND_BEGIN(Code)
Start position of the tested block is lower than the start position of THIS block and both end positions are the same. The value is OVERLAP_BEGIN | EXTEND.



EXTEND_END
final public static int EXTEND_END(Code)
End position of the tested block is greater than the end position of THIS block and both start positions are the same. The value is OVERLAP_END | EXTEND.



IGNORE_EMPTY
final public static int IGNORE_EMPTY(Code)
This value can be used to clear the two bits saying if the tested or THIS block are empty (The EMPTY and THIS_EMPTY are cleared). To do that, use value ANDed by IGNORE_EMPTY expression.



INCLUDE
final public static int INCLUDE(Code)
Tested block fully includes THIS block and extends it by at least one character in both directions. The value is EXTEND_BEGIN | EXTEND_END.



INNER
final public static int INNER(Code)
Tested block is fully inside THIS block and there is at least one more character left in THIS block after the end of the tested block in both directions. The value includes INSIDE.



INSIDE
final public static int INSIDE(Code)
Two bit value meaning that the tested block is fully inside THIS block. It is included in the following values: INSIDE_BEGIN, SAME, INSIDE_END. The value includes OVERLAP.



INSIDE_BEGIN
final public static int INSIDE_BEGIN(Code)
Tested block completely inside THIS block and its end position is lower than end position of THIS block and start positions are the same. The value includes INSIDE.



INSIDE_END
final public static int INSIDE_END(Code)
Tested block completely inside THIS block and its start position is greater than THIS block start position and end positions are the same. The value includes INSIDE.



INVALID
final public static int INVALID(Code)
This value is not used directly in this class but can be used by other classes to report that the comparison of blocks has no sense for some reason.



OVERLAP
final public static int OVERLAP(Code)
Single bit value that means that tested block and THIS block partially or fully overlap. If this bit is not set then the blocks don't overlap at all. The values for which this bit is set are: OVERLAP_BEGIN, OVERLAP_END, EXTEND_BEGIN, EXTEND_END, INCLUDE, INSIDE_BEGIN, INSIDE_END, SAME, INNER. The values for which this bit is not set are: BEFORE, AFTER, CONTINUE_BEGIN, CONTINUE_END.



OVERLAP_BEGIN
final public static int OVERLAP_BEGIN(Code)
Tested block partly covers begining of THIS mark block. The value includes OVERLAP.



OVERLAP_END
final public static int OVERLAP_END(Code)
Tested block partly covers end of THIS mark block. The value includes OVERLAP.



SAME
final public static int SAME(Code)
The blocks have exactly the same start and end positions. They simply cover exactly the same area. The value is INSIDE_BEGIN | INSIDE_END.



THIS_EMPTY
final public static int THIS_EMPTY(Code)
Single bit value meaning that THIS block has zero size.



doc
protected BaseDocument doc(Code)



endMark
public Mark endMark(Code)



next
protected MarkBlock next(Code)
Next block in the chain



prev
protected MarkBlock prev(Code)
Previous block in the chain



startMark
public Mark startMark(Code)




Constructor Detail
MarkBlock
public MarkBlock(BaseDocument doc, Mark startMark, Mark endMark)(Code)



MarkBlock
public MarkBlock(BaseDocument doc, int startPos, int endPos) throws BadLocationException(Code)
Construct block with given marks



MarkBlock
public MarkBlock(BaseDocument doc, Mark startMark, Mark endMark, int startPos, int endPos) throws BadLocationException(Code)
Construct block from positions on some document




Method Detail
addChain
public MarkBlock addChain(MarkBlock blk)(Code)
Add block after this one added block



checkReverse
public boolean checkReverse()(Code)



compare
public int compare(int startPos, int endPos)(Code)
Compares the position of the given block against current block.
Parameters:
  startPos - starting position of the compared block
Parameters:
  endPos - ending position of the compared block or it is the same asstartPos when testing just for insert relation of compared block against this guarded block



debugRelation
public static String debugRelation(int rel)(Code)



destroyMarks
void destroyMarks()(Code)
Remove the marks if they were not removed yet



extend
public boolean extend(int startPos, int endPos, boolean concat) throws BadLocationException(Code)
Extend this mark block by start and end positions. First test whether the given block intersects with this mark block. If not nothing is done. whether this mark block has been extended



extend
public boolean extend(MarkBlock blk, boolean concat)(Code)
Extend this mark block by some other block. whether the block was extended. If it was, the caller isresponsible for possibly removing blk from the chain



extendEnd
public int extendEnd(int endPos) throws BadLocationException(Code)
Possibly move end mark if its position is above the given number. new position



extendStart
public int extendStart(int startPos) throws BadLocationException(Code)
Possibly move start mark if its position is above the given number. new position



finalize
protected void finalize() throws Throwable(Code)
Destroy the marks if necessary



getDocument
public Document getDocument()(Code)



getEndOffset
public int getEndOffset()(Code)



getNext
final public MarkBlock getNext()(Code)



getPrev
final public MarkBlock getPrev()(Code)



getStartOffset
public int getStartOffset()(Code)



insertChain
public MarkBlock insertChain(MarkBlock blk)(Code)
Insert block before this one inserted block



isReverse
public boolean isReverse()(Code)



removeChain
public MarkBlock removeChain()(Code)
Remove this block from the chain next chain member or null for end of chain



reverse
public void reverse()(Code)



setNext
final public void setNext(MarkBlock b)(Code)



setNextChain
public void setNextChain(MarkBlock b)(Code)
Set the next block of this one in the chain.



setPrev
final public void setPrev(MarkBlock b)(Code)



setPrevChain
public void setPrevChain(MarkBlock b)(Code)
Set the previous block of this one in the chain



shrink
public int shrink(int startPos, int endPos) throws BadLocationException(Code)
Shrink this mark block by the block specified. startMark is moved to the endPos if OVERLAP_BEGIN or INSIDE_BEGIN is returned from compare(). endMark is moved to the startPos if OVERLAP_END or INSIDE_END is returned from compare(). If other status is returned or either block is empty, then no action is taken. It's up to caller to handle these situations. relation of tested block to mark block



toString
public String toString()(Code)
Debugs this mark block



toStringChain
public String toStringChain()(Code)
Debug possibly whole chain of marks



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.