Java Doc for Fold.java in  » IDE-Netbeans » editor » org » netbeans » api » editor » fold » 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 » IDE Netbeans » editor » org.netbeans.api.editor.fold 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.api.editor.fold.Fold

Fold
final public class Fold (Code)
Fold is a building block of the code folding tree-based hierarchy.
Folds cannot overlap but they can be nested arbitrarily.
It's possible to determine the fold's type, description and whether it is collapsed or expanded and explore the nested (children) folds.
There are various useful utility methods for folds in the FoldUtilities .

There is one root fold at the top of the code folding hierarchy.
The root fold is special uncollapsable fold covering the whole document.
It can be obtained by using FoldHierarchy.getRootFold .
The regular top-level folds are children of the root fold.
author:
   Miloslav Metelka
version:
   1.00




Constructor Summary
 Fold(FoldOperationImpl operation, FoldType type, String description, boolean collapsed, Document doc, int startOffset, int endOffset, int startGuardedLength, int endGuardedLength, Object extraInfo)
    

Method Summary
 voidextractToChildren(int index, int length, Fold fold)
     Remove the given folds and insert them as children of the given fold which will be put to their place.
Parameters:
  index - index at which the starts the area of child folds to wrap.
Parameters:
  length - number of child folds to wrap.
Parameters:
  fold - fold to insert at place of children.
 Fold[]foldsToArray(int index, int count)
    
public  StringgetDescription()
     Get text description that should be displayed when the fold is collapsed instead of the text contained in the fold.
public  intgetEndOffset()
     Get an absolute ending offset of this fold in the associated document.
The ending offset is expected to track possible changes in the underlying document (i.e.
 ObjectgetExtraInfo()
    
public  FoldgetFold(int index)
     Get child fold of this fold at the given index.
public  intgetFoldCount()
     Get total count of child folds contained in this fold.
public  intgetFoldIndex(Fold child)
     Get index of the given child fold in this fold.
The method has constant-time performance.
Parameters:
  child - non-null child fold of this fold but in generalit can be any non-null fold (see return value).
public  FoldHierarchygetHierarchy()
     Get the code folding hierarchy for which this fold was created.
 FoldOperationImplgetOperation()
    
public  FoldgetParent()
     Get parent fold of this fold.
 intgetRawIndex()
     Get the raw index of this fold in the parent.
public  intgetStartOffset()
     Get an absolute starting offset of this fold in the associated document.
The starting offset is expected to track possible changes in the underlying document (i.e.
public  FoldTypegetType()
     Get type of this fold.
 voidinsertUpdate(DocumentEvent evt)
    
public  booleanisCollapsed()
     Return whether this fold is collapsed or expanded.
 booleanisEndDamaged()
     Return true if the ending guarded area is damaged by a document modification.
 booleanisExpandNecessary()
    
 booleanisRootFold()
     Check whether this fold is currently a part of the hierarchy.
The fold may be temporarily removed from the hierarchy because it became blocked by another fold.
 booleanisStartDamaged()
     Return true if the starting guarded area is damaged by a document modification.
 voidremoveUpdate(DocumentEvent evt)
    
 FoldreplaceByChildren(int index)
     Remove the fold at the given index and put its children at its place.
 voidsetCollapsed(boolean collapsed)
    
 voidsetDescription(String description)
    
 voidsetEndOffset(Document doc, int endOffset)
    
 voidsetParent(Fold parent)
    
 voidsetRawIndex(int rawIndex)
     Set the raw index of this fold in the parent.
 voidsetStartOffset(Document doc, int startOffset)
    
public  StringtoString()
    
 voidupdateRawIndex(int rawIndexDelta)
     Update the raw index of this fold in the parent by a given delta.


Constructor Detail
Fold
Fold(FoldOperationImpl operation, FoldType type, String description, boolean collapsed, Document doc, int startOffset, int endOffset, int startGuardedLength, int endGuardedLength, Object extraInfo) throws BadLocationException(Code)




Method Detail
extractToChildren
void extractToChildren(int index, int length, Fold fold)(Code)
Remove the given folds and insert them as children of the given fold which will be put to their place.
Parameters:
  index - index at which the starts the area of child folds to wrap.
Parameters:
  length - number of child folds to wrap.
Parameters:
  fold - fold to insert at place of children. The removed childrenbecome children of the fold.



foldsToArray
Fold[] foldsToArray(int index, int count)(Code)



getDescription
public String getDescription()(Code)
Get text description that should be displayed when the fold is collapsed instead of the text contained in the fold.
If there is no specific description the "..." is returned. non-null description of the fold.



getEndOffset
public int getEndOffset()(Code)
Get an absolute ending offset of this fold in the associated document.
The ending offset is expected to track possible changes in the underlying document (i.e. it's maintained in javax.swing.text.Position -like form). >=getStartOffset()offset of the first character in the document that is not partof this fold.



getExtraInfo
Object getExtraInfo()(Code)



getFold
public Fold getFold(int index)(Code)
Get child fold of this fold at the given index.
Parameters:
  index - >=0 && <Fold.getFoldCount()index of child of this fold.



getFoldCount
public int getFoldCount()(Code)
Get total count of child folds contained in this fold. count of child folds contained in this fold.Zero means there are no children folds under this fold.



getFoldIndex
public int getFoldIndex(Fold child)(Code)
Get index of the given child fold in this fold.
The method has constant-time performance.
Parameters:
  child - non-null child fold of this fold but in generalit can be any non-null fold (see return value). >=0 index of the child fold in this foldor -1 if the given child fold is not a child of this fold.



getHierarchy
public FoldHierarchy getHierarchy()(Code)
Get the code folding hierarchy for which this fold was created. non-null code folding hierarchy for which this fold was constructed.



getOperation
FoldOperationImpl getOperation()(Code)



getParent
public Fold getParent()(Code)
Get parent fold of this fold. parent fold of this fold or null if this is root fold or if thisfold was removed from the code folding hierarchy.
FoldUtilities.isRootFold(Fold) can be used to checkwhether this is root fold.



getRawIndex
int getRawIndex()(Code)
Get the raw index of this fold in the parent.
The SPI clients should never call this method.



getStartOffset
public int getStartOffset()(Code)
Get an absolute starting offset of this fold in the associated document.
The starting offset is expected to track possible changes in the underlying document (i.e. it's maintained in javax.swing.text.Position -like form). >=0 absolute starting offset of this fold in the document.



getType
public FoldType getType()(Code)
Get type of this fold. non-null type identification of this fold.



insertUpdate
void insertUpdate(DocumentEvent evt)(Code)



isCollapsed
public boolean isCollapsed()(Code)
Return whether this fold is collapsed or expanded.
To collapse fold FoldHierarchy.collapse(Fold) can be used. true if this fold is collapsed or false if it's expanded.



isEndDamaged
boolean isEndDamaged()(Code)
Return true if the ending guarded area is damaged by a document modification.



isExpandNecessary
boolean isExpandNecessary()(Code)



isRootFold
boolean isRootFold()(Code)
Check whether this fold is currently a part of the hierarchy.
The fold may be temporarily removed from the hierarchy because it became blocked by another fold. Once the blocking fold gets removed the original fold becomes a part of the hierarchy again. true if the fold is actively a part of the hierarchy.



isStartDamaged
boolean isStartDamaged()(Code)
Return true if the starting guarded area is damaged by a document modification.



removeUpdate
void removeUpdate(DocumentEvent evt)(Code)



replaceByChildren
Fold replaceByChildren(int index)(Code)
Remove the fold at the given index and put its children at its place.
Parameters:
  index - index at which the child should be removed the removed child at the index.



setCollapsed
void setCollapsed(boolean collapsed)(Code)



setDescription
void setDescription(String description)(Code)



setEndOffset
void setEndOffset(Document doc, int endOffset) throws BadLocationException(Code)



setParent
void setParent(Fold parent)(Code)



setRawIndex
void setRawIndex(int rawIndex)(Code)
Set the raw index of this fold in the parent.
The SPI clients should never call this method.



setStartOffset
void setStartOffset(Document doc, int startOffset) throws BadLocationException(Code)



toString
public String toString()(Code)



updateRawIndex
void updateRawIndex(int rawIndexDelta)(Code)
Update the raw index of this fold in the parent by a given delta.
The SPI clients should never call this method.



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.