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


java.lang.Object
   org.netbeans.editor.ext.FormatSupport
      org.netbeans.editor.ext.ExtFormatSupport

All known Subclasses:   org.netbeans.editor.ext.java.JavaFormatSupport,
ExtFormatSupport
public class ExtFormatSupport extends FormatSupport (Code)
Extended format-support offers comment-token support, token-and-text operations and other support.
author:
   Miloslav Metelka
version:
   1.00



Constructor Summary
public  ExtFormatSupport(FormatWriter formatWriter)
    

Method Summary
public  TokenItemfindAnyToken(TokenItem startToken, TokenItem limitToken, TokenID[] tokenIDArray, TokenContextPath tokenContextPath, boolean backward)
     Search for any of the image tokens from the given array and return if the token matches any item from the array.
public  FormatTokenPositionfindImportant(FormatTokenPosition startPosition, FormatTokenPosition limitPosition, boolean stopOnEOL, boolean backward)
     Get the first position that is not whitespace and that is not comment.
Parameters:
  startPosition - position from which the search starts.
public  TokenItemfindImportantToken(TokenItem startToken, TokenItem limitToken, boolean backward)
     Find the first non-whitespace and non-comment token in the given direction.
public  intfindLineDistance(FormatTokenPosition fromPosition, FormatTokenPosition toPosition)
     Find how many EOLs is between two token-position.
Parameters:
  fromPosition - the position from which to start counting.
public  FormatTokenPositionfindLineEndNonImportant(FormatTokenPosition pos)
     Get the start of the area of line where there is only whitespace or comment till the end of the line.
Parameters:
  pos - any position on the line.
public  FormatTokenPositionfindLineFirstImportant(FormatTokenPosition pos)
     Get the first non-whitespace and non-comment token or null.
public  TokenItemfindMatchingToken(TokenItem startToken, TokenItem limitToken, TokenID matchTokenID, String matchTokenImage, boolean backward)
     This method can be used to find a matching brace token.
public  TokenItemfindMatchingToken(TokenItem startToken, TokenItem limitToken, ImageTokenID matchTokenID, boolean backward)
    
public  TokenItemfindToken(TokenItem startToken, TokenItem limitToken, TokenID tokenID, TokenContextPath tokenContextPath, String tokenImage, boolean backward)
     Find the token either by token-id or token-text or both.
Parameters:
  startToken - token from which to start searching.
public  chargetChar(FormatTokenPosition pos)
     Get the character at the given position.
public  intgetIndex(TokenItem token, TokenID[] tokenIDArray)
     Get the index of the token in the given token-id-and-text array or -1 if the token is not in the array.
public  TokenIteminsertImageToken(TokenItem beforeToken, ImageTokenID tokenID, TokenContextPath tokenContextPath)
     Insert the token that has token-id containing image, so additional text is not necessary.
public  booleanisComment(TokenItem token, int offset)
     Is the given token a comment token? By default it returns false but it can be redefined in descendants.
public  booleanisComment(FormatTokenPosition pos)
    
public  booleanisImportant(TokenItem token, int offset)
     Whether the given position is not a whitespace or comment.
public  booleanisImportant(FormatTokenPosition pos)
    
public  booleanisLineStart(FormatTokenPosition pos)
     Whether the given position is at the begining of the line.
public  booleanisNewLine(FormatTokenPosition pos)
    
public  FormatTokenPositionremoveLineEndWhitespace(FormatTokenPosition pos)
     Remove the ending whitespace from the line.
Parameters:
  pos - position on the line to be checked.


Constructor Detail
ExtFormatSupport
public ExtFormatSupport(FormatWriter formatWriter)(Code)




Method Detail
findAnyToken
public TokenItem findAnyToken(TokenItem startToken, TokenItem limitToken, TokenID[] tokenIDArray, TokenContextPath tokenContextPath, boolean backward)(Code)
Search for any of the image tokens from the given array and return if the token matches any item from the array. The index of the item from the array that matched can be found by calling getIndex() method. It is suitable mainly for the image-token-ids.
Parameters:
  startToken - token from which to start. For backward search this token isexcluded from the search.
Parameters:
  limitToken - the token where the search will be broken reporting thatnothing was found. It can be null to search till the end orbegining of the chain (depending on direction). For forwardsearch this token is not considered to be part of search, butfor backward search it is.
Parameters:
  tokenIDArray - array of the token-ids for which to search.
Parameters:
  tokenContextPath - context path that the found token must have. It can be null.
Parameters:
  backward - true for searching in backward direction or false to serach inforward direction.



findImportant
public FormatTokenPosition findImportant(FormatTokenPosition startPosition, FormatTokenPosition limitPosition, boolean stopOnEOL, boolean backward)(Code)
Get the first position that is not whitespace and that is not comment.
Parameters:
  startPosition - position from which the search starts. For the backward searchthe character right at startPosition is not considered as partof the search.
Parameters:
  limitPosition - position where the search will be broken reporting thatnothing was found. It can be null to search till the end orbegining of the chain (depending on direction).
Parameters:
  stopOnEOL - whether stop and return EOL token or continue search if EOLtoken is found.
Parameters:
  backward - whether search in backward direction. first non-whitespace token or EOL or null if all the tokens tillthe begining of the chain are whitespaces.



findImportantToken
public TokenItem findImportantToken(TokenItem startToken, TokenItem limitToken, boolean backward)(Code)
Find the first non-whitespace and non-comment token in the given direction. This is similair to findImportant() but it operates over the tokens.
Parameters:
  startToken - token from which to start searching. For backward search thistoken is excluded from the search.
Parameters:
  limitToken - the token where the search will be broken reporting thatnothing was found. It can be null to search till the end orbegining of the chain (depending on direction). For forwardsearch this token is not considered to be part of search, butfor backward search it is.
Parameters:
  backward - true for searching in backward direction or false to serach inforward direction. return the matching token or null if nothing was found



findLineDistance
public int findLineDistance(FormatTokenPosition fromPosition, FormatTokenPosition toPosition)(Code)
Find how many EOLs is between two token-position.
Parameters:
  fromPosition - the position from which to start counting. If it's EOL, it'scounted.
Parameters:
  toPosition - the ending position. If it points at EOL, it's ignored fromthe total count. It is necessary for the second position tofollow the first one.



findLineEndNonImportant
public FormatTokenPosition findLineEndNonImportant(FormatTokenPosition pos)(Code)
Get the start of the area of line where there is only whitespace or comment till the end of the line.
Parameters:
  pos - any position on the line. Return null if there's no such area.



findLineFirstImportant
public FormatTokenPosition findLineFirstImportant(FormatTokenPosition pos)(Code)
Get the first non-whitespace and non-comment token or null.
Parameters:
  pos - any position on the line.



findMatchingToken
public TokenItem findMatchingToken(TokenItem startToken, TokenItem limitToken, TokenID matchTokenID, String matchTokenImage, boolean backward)(Code)
This method can be used to find a matching brace token. Both the token-id and token-text are used for comparison of the starting token.
Parameters:
  startToken - token from which to start. It cannot be null. For backwardsearch this token is ignored and the previous one is used.
Parameters:
  limitToken - the token where the search will be broken reporting thatnothing was found. It can be null to search till the end orbegining of the chain (depending on direction). For forwardsearch this token is not considered to be part of search, butfor backward search it is.
Parameters:
  matchTokenID - matching token-id for the start token.
Parameters:
  matchTokenImage - matching token-text for the start token.
Parameters:
  backward - true for searching in backward direction or false to serach inforward direction.



findMatchingToken
public TokenItem findMatchingToken(TokenItem startToken, TokenItem limitToken, ImageTokenID matchTokenID, boolean backward)(Code)



findToken
public TokenItem findToken(TokenItem startToken, TokenItem limitToken, TokenID tokenID, TokenContextPath tokenContextPath, String tokenImage, boolean backward)(Code)
Find the token either by token-id or token-text or both.
Parameters:
  startToken - token from which to start searching. For backward search thistoken is excluded from the search.
Parameters:
  limitToken - the token where the search will be broken reporting thatnothing was found. It can be null to search till the end orbegining of the chain (depending on direction). For forwardsearch this token is not considered to be part of search, butfor backward search it is.
Parameters:
  tokenID - token-id to be searched. If null the token-id of the tokensinspected will be ignored.
Parameters:
  tokenImage - text of the token to find. If null the text of the tokensinspected will be ignored.
Parameters:
  backward - true for searching in backward direction or false to serach inforward direction. return the matching token or null if nothing was found



getChar
public char getChar(FormatTokenPosition pos)(Code)
Get the character at the given position. The caller must care about not to pass the end-of-chain position to this method.



getIndex
public int getIndex(TokenItem token, TokenID[] tokenIDArray)(Code)
Get the index of the token in the given token-id-and-text array or -1 if the token is not in the array.



insertImageToken
public TokenItem insertImageToken(TokenItem beforeToken, ImageTokenID tokenID, TokenContextPath tokenContextPath)(Code)
Insert the token that has token-id containing image, so additional text is not necessary.



isComment
public boolean isComment(TokenItem token, int offset)(Code)
Is the given token a comment token? By default it returns false but it can be redefined in descendants.



isComment
public boolean isComment(FormatTokenPosition pos)(Code)



isImportant
public boolean isImportant(TokenItem token, int offset)(Code)
Whether the given position is not a whitespace or comment.



isImportant
public boolean isImportant(FormatTokenPosition pos)(Code)



isLineStart
public boolean isLineStart(FormatTokenPosition pos)(Code)
Whether the given position is at the begining of the line.



isNewLine
public boolean isNewLine(FormatTokenPosition pos)(Code)



removeLineEndWhitespace
public FormatTokenPosition removeLineEndWhitespace(FormatTokenPosition pos)(Code)
Remove the ending whitespace from the line.
Parameters:
  pos - position on the line to be checked. position of the EOL on the line or end of chain position



Methods inherited from org.netbeans.editor.ext.FormatSupport
public boolean canInsertToken(TokenItem beforeToken)(Code)(Java Doc)
public boolean canModifyWhitespace(TokenItem inToken)(Code)(Java Doc)
public boolean canRemoveToken(TokenItem token)(Code)(Java Doc)
public boolean canReplaceToken(TokenItem token)(Code)(Java Doc)
public String chainToString(TokenItem token)(Code)(Java Doc)
public String chainToString(TokenItem token, int maxDocumentTokens)(Code)(Java Doc)
public FormatTokenPosition changeLineIndent(FormatTokenPosition pos, int indent)(Code)(Java Doc)
public boolean expandTabs()(Code)(Java Doc)
public TokenItem findFirstToken(TokenItem token)(Code)(Java Doc)
public FormatTokenPosition findLineEnd(FormatTokenPosition pos)(Code)(Java Doc)
public FormatTokenPosition findLineEndWhitespace(FormatTokenPosition pos)(Code)(Java Doc)
public FormatTokenPosition findLineFirstNonWhitespace(FormatTokenPosition pos)(Code)(Java Doc)
public FormatTokenPosition findLineStart(FormatTokenPosition pos)(Code)(Java Doc)
public FormatTokenPosition findNextEOL(FormatTokenPosition pos)(Code)(Java Doc)
public TokenItem findNonEmptyToken(TokenItem token, boolean backward)(Code)(Java Doc)
public FormatTokenPosition findNonWhitespace(FormatTokenPosition startPosition, FormatTokenPosition limitPosition, boolean stopOnEOL, boolean backward)(Code)(Java Doc)
public FormatTokenPosition findPreviousEOL(FormatTokenPosition pos)(Code)(Java Doc)
public FormatTokenPosition getFormatStartPosition()(Code)(Java Doc)
public FormatWriter getFormatWriter()(Code)(Java Doc)
public int getIndentShift()(Code)(Java Doc)
public String getIndentString(int indent)(Code)(Java Doc)
public FormatTokenPosition getLastPosition()(Code)(Java Doc)
public TokenItem getLastToken()(Code)(Java Doc)
public int getLineIndent(FormatTokenPosition pos, boolean zeroForWSLine)(Code)(Java Doc)
public FormatTokenPosition getNextPosition(TokenItem token, int offset, Position.Bias bias)(Code)(Java Doc)
public FormatTokenPosition getNextPosition(FormatTokenPosition pos)(Code)(Java Doc)
public FormatTokenPosition getNextPosition(FormatTokenPosition pos, Position.Bias bias)(Code)(Java Doc)
public FormatTokenPosition getNextPosition(TokenItem token, int offset)(Code)(Java Doc)
public FormatTokenPosition getPosition(TokenItem token, int offset)(Code)(Java Doc)
public FormatTokenPosition getPosition(TokenItem token, int offset, Position.Bias bias)(Code)(Java Doc)
public FormatTokenPosition getPreviousPosition(TokenItem token, int offset, Position.Bias bias)(Code)(Java Doc)
public FormatTokenPosition getPreviousPosition(FormatTokenPosition pos)(Code)(Java Doc)
public FormatTokenPosition getPreviousPosition(FormatTokenPosition pos, Position.Bias bias)(Code)(Java Doc)
public FormatTokenPosition getPreviousPosition(TokenItem token, int offset)(Code)(Java Doc)
public TokenItem getPreviousToken(TokenItem token)(Code)(Java Doc)
public boolean getSettingBoolean(String settingName, Boolean defaultValue)(Code)(Java Doc)
public boolean getSettingBoolean(String settingName, boolean defaultValue)(Code)(Java Doc)
public int getSettingInteger(String settingName, Integer defaultValue)(Code)(Java Doc)
public int getSettingInteger(String settingName, int defaultValue)(Code)(Java Doc)
public Object getSettingValue(String settingName)(Code)(Java Doc)
public Object getSettingValue(String settingName, Object defaultValue)(Code)(Java Doc)
public int getShiftWidth()(Code)(Java Doc)
public int getSpacesPerTab()(Code)(Java Doc)
public int getTabSize()(Code)(Java Doc)
public FormatTokenPosition getTextStartPosition()(Code)(Java Doc)
public TokenContextPath getValidWhitespaceTokenContextPath()(Code)(Java Doc)
public TokenID getValidWhitespaceTokenID()(Code)(Java Doc)
public int getVisualColumnOffset(FormatTokenPosition pos)(Code)(Java Doc)
public TokenContextPath getWhitespaceTokenContextPath()(Code)(Java Doc)
public TokenID getWhitespaceTokenID()(Code)(Java Doc)
public void insertSpaces(TokenItem beforeToken, int spaceCount)(Code)(Java Doc)
public void insertString(TokenItem token, int offset, String text)(Code)(Java Doc)
public void insertString(FormatTokenPosition pos, String text)(Code)(Java Doc)
public TokenItem insertToken(TokenItem beforeToken, TokenID tokenID, TokenContextPath tokenContextPath, String tokenImage)(Code)(Java Doc)
public boolean isAfter(TokenItem testedToken, TokenItem afterToken)(Code)(Java Doc)
public boolean isAfter(FormatTokenPosition testedPosition, FormatTokenPosition afterPosition)(Code)(Java Doc)
public boolean isChainStartPosition(FormatTokenPosition pos)(Code)(Java Doc)
final public boolean isIndentOnly()(Code)(Java Doc)
public boolean isLineEmpty(FormatTokenPosition pos)(Code)(Java Doc)
public boolean isLineWhite(FormatTokenPosition pos)(Code)(Java Doc)
public boolean isRestartFormat()(Code)(Java Doc)
public boolean isWhitespace(TokenItem token, int offset)(Code)(Java Doc)
public boolean isWhitespace(FormatTokenPosition pos)(Code)(Java Doc)
public void remove(TokenItem token, int offset, int length)(Code)(Java Doc)
public void remove(FormatTokenPosition pos, int length)(Code)(Java Doc)
public void removeToken(TokenItem token)(Code)(Java Doc)
public void removeTokenChain(TokenItem startToken, TokenItem endToken)(Code)(Java Doc)
public void replaceToken(TokenItem originalToken, TokenID tokenID, TokenContextPath tokenContextPath, String tokenImage)(Code)(Java Doc)
public void setIndentShift(int indentShift)(Code)(Java Doc)
public void setRestartFormat(boolean restartFormat)(Code)(Java Doc)
public TokenItem splitEnd(TokenItem token, int endLength, TokenID newTokenID, TokenContextPath newTokenContextPath)(Code)(Java Doc)
public TokenItem splitStart(TokenItem token, int startLength, TokenID newTokenID, TokenContextPath newTokenContextPath)(Code)(Java Doc)
public boolean tokenEquals(TokenItem compareToken, TokenID withTokenID)(Code)(Java Doc)
public boolean tokenEquals(TokenItem compareToken, TokenID withTokenID, TokenContextPath withTokenContextPath)(Code)(Java Doc)
public boolean tokenEquals(TokenItem compareToken, TokenID withTokenID, TokenContextPath withTokenContextPath, String withTokenImage)(Code)(Java Doc)

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.