Java Doc for JEditBuffer.java in  » Swing-Library » jEdit » org » gjt » sp » jedit » buffer » 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 » jEdit » org.gjt.sp.jedit.buffer 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.gjt.sp.jedit.buffer.JEditBuffer

All known Subclasses:   org.gjt.sp.jedit.Buffer,
JEditBuffer
public class JEditBuffer (Code)
A JEditBuffer represents the contents of an open text file as it is maintained in the computer's memory (as opposed to how it may be stored on a disk).

This class is partially thread-safe, however you must pay attention to two very important guidelines:

  • Changes to a buffer can only be made from the AWT thread.
  • When accessing the buffer from another thread, you must grab a read lock if you plan on performing more than one call, to ensure that the buffer contents are not changed by the AWT thread for the duration of the lock. Only methods whose descriptions specify thread safety can be invoked from other threads.

author:
   Slava Pestov
version:
   $Id: JEditBuffer.java 11001 2007-11-08 09:37:38Z kpouer $
since:
   jEdit 4.3pre3

Inner Class :static class Listener
Inner Class :protected static class PropValue

Field Summary
final public static  StringENCODING
     Character encoding used when loading and saving.
final public static  intHIGH_PRIORITY
    
final public static  StringLINESEP
     Line separator property.
final public static  intNORMAL_PRIORITY
    
protected  Modemode
    
protected  Segmentseg
    
protected  booleantextMode
    
protected  UndoManagerundoMgr
    

Constructor Summary
public  JEditBuffer(Map props)
    
public  JEditBuffer()
    

Method Summary
public  voidaddBufferListener(BufferListener listener, int priority)
     Adds a buffer change listener.
public  voidaddBufferListener(BufferListener listener)
     Adds a buffer change listener.
public  voidbeginCompoundEdit()
     Starts a compound edit.
public  PositioncreatePosition(int offset)
     Creates a floating position.
public  voidendCompoundEdit()
     Ends a compound edit.
protected  voidfireBufferLoaded()
    
protected  voidfireContentInserted(int startLine, int offset, int numLines, int length)
    
protected  voidfireContentRemoved(int startLine, int offset, int numLines, int length)
    
protected  voidfireFoldHandlerChanged()
    
protected  voidfireFoldLevelChanged(int start, int end)
    
protected  voidfirePreContentInserted(int startLine, int offset, int numLines, int length)
    
protected  voidfirePreContentRemoved(int startLine, int offset, int numLines, int length)
    
protected  voidfireTransactionComplete()
    
public  booleangetBooleanProperty(String name)
     Returns the value of a boolean property.
public  BufferListener[]getBufferListeners()
     Returns an array of registered buffer change listeners.
public  StringgetContextSensitiveProperty(int offset, String name)
     Some settings, like comment start and end strings, can vary between different parts of a buffer (HTML text and inline JavaScript, for example).
public  intgetCurrentIndentForLine(int lineIndex, int[] whitespaceChars)
     Returns the line's current leading indent.
public  ObjectgetDefaultProperty(String key)
    
public  int[]getFoldAtLine(int line)
     Returns an array.
public  FoldHandlergetFoldHandler()
     Returns the current buffer's fold handler.
public  intgetFoldLevel(int line)
     Returns the fold level of the specified line.
public  intgetIdealIndentForLine(int lineIndex)
     Returns the ideal leading indent for the specified line.
public  intgetIndentSize()
     Returns the indent size used in this buffer.
public  intgetIntegerProperty(String name, int defaultValue)
     Returns the value of an integer property.
public  KeywordMapgetKeywordMapAtOffset(int offset)
     Returns the syntax highlighting keyword map in effect at the specified offset.
public  intgetLength()
     Returns the number of characters in the buffer.
public  intgetLineCount()
     Returns the number of physical lines in the buffer.
public  intgetLineEndOffset(int line)
     Returns the end offset of the specified line.
public  intgetLineLength(int line)
     Returns the length of the specified line.
public  intgetLineOfOffset(int offset)
     Returns the line containing the specified offset.
public  intgetLineStartOffset(int line)
     Returns the start offset of the specified line.
public  StringgetLineText(int line)
     Returns the text on the specified line.
public  voidgetLineText(int line, Segment segment)
     Returns the specified line in a Segment.

Using a Segment is generally more efficient than using a String because it results in less memory allocation and array copying.

This method is thread-safe.

public  ModegetMode()
     Returns this buffer's edit mode.
public  intgetOffsetOfVirtualColumn(int line, int column, int[] totalVirtualWidth)
     Returns the offset of a virtual column number (taking tabs into account) relative to the start of the line in question.
Parameters:
  line - The line number
Parameters:
  column - The virtual column number
Parameters:
  totalVirtualWidth - If this array is non-null, the totalvirtual width will be stored in its first location if this methodreturns -1.
public  PatterngetPatternProperty(String name, int flags)
     Returns the value of a property as a regular expression.
public  intgetPriorNonEmptyLine(int lineIndex)
     Auto indent needs this.
public  ObjectgetProperty(Object name)
     Returns the value of a buffer-local property.

Using this method is generally discouraged, because it returns an Object which must be cast to another type in order to be useful, and this can cause problems if the object is of a different type than what the caller expects.

The following methods should be used instead:

This method is thread-safe.
Parameters:
  name - The property name.
public  ParserRuleSetgetRuleSetAtOffset(int offset)
     Returns the syntax highlighting ruleset at the specified offset.
public  StringgetStringProperty(String name)
     Returns the value of a string property.
public  intgetTabSize()
     Returns the tab size used in this buffer.
public  StringgetText(int start, int length)
     Returns the specified text range.
public  voidgetText(int start, int length, Segment seg)
     Returns the specified text range in a Segment.

Using a Segment is generally more efficient than using a String because it results in less memory allocation and array copying.

This method is thread-safe.

public  TokenMarkergetTokenMarker()
    
public  intgetVirtualWidth(int line, int column)
     Returns the virtual column number (taking tabs into account) of the specified position.
public  booleanindentLine(int lineIndex, boolean canIncreaseIndent, boolean canDecreaseIndent)
    
public  booleanindentLine(int lineIndex, boolean canDecreaseIndent)
     Indents the specified line.
Parameters:
  lineIndex - The line number to indent
Parameters:
  canDecreaseIndent - If true, the indent can be decreased as aresult of this.
public  voidindentLines(int start, int end)
     Indents all specified lines.
public  voidindentLines(int[] lines)
     Indents all specified lines.
public  voidinsert(int offset, String str)
     Inserts a string into the buffer.
public  voidinsert(int offset, Segment seg)
     Inserts a string into the buffer.
public  voidinsertAtColumn(int line, int col, String str)
     Like the JEditBuffer.insert(int,String) method, but inserts the string at the specified virtual column.
public  intinsertIndented(int offset, String text)
     Inserts a string into the buffer, indenting each line of the string to match the indent of the first line.
Parameters:
  offset - The offset
Parameters:
  text - The text The number of characters of indent inserted on each newline.
public  booleaninsideCompoundEdit()
     Returns if a compound edit is currently active.
public  voidinvalidateCachedFoldLevels()
     Invalidates all cached fold level information.
protected  voidinvalidateFoldLevels()
    
public  booleanisDirty()
     Returns whether there have been unsaved changes to this buffer.
public  booleanisEditable()
     Returns true if this file is editable, false otherwise.
public  booleanisElectricKey(char ch)
    
public  booleanisElectricKey(char ch, int line)
    
protected  booleanisFileReadOnly()
    
public  booleanisFoldEnd(int line)
     Returns if the specified line ends a fold.
public  booleanisFoldStart(int line)
     Returns if the specified line begins a fold.
public  booleanisLoading()
    
public  booleanisPerformingIO()
     Returns true if the buffer is currently performing I/O.
public  booleanisReadOnly()
     Returns true if this file is read only, false otherwise.
public  booleanisTransactionInProgress()
     Returns if an undo or compound edit is currently in progress.
public  booleanisUndoInProgress()
     Returns if an undo or redo is currently being performed.
protected  voidloadText(Segment seg, IntegerArray endOffsets)
    
public  voidmarkTokens(int lineIndex, TokenHandler tokenHandler)
     Returns the syntax tokens for the specified line.
protected  voidparseBufferLocalProperties()
    
public  voidpropertiesChanged()
     Reloads settings from the properties.
public  voidreadLock()
     The buffer is guaranteed not to change between calls to JEditBuffer.readLock() and JEditBuffer.readUnlock() .
public  voidreadUnlock()
     The buffer is guaranteed not to change between calls to JEditBuffer.readLock() and JEditBuffer.readUnlock() .
public  voidredo(TextArea textArea)
     Redoes the most recently undone edit.
public  voidremove(int offset, int length)
     Removes the specified rang efrom the buffer.
public  voidremoveBufferListener(BufferListener listener)
     Removes a buffer change listener.
public  voidremoveTrailingWhiteSpace(int[] lines)
     Removes trailing whitespace from all lines in the specified list.
public  voidresetCachedProperties()
    
public  voidsetBooleanProperty(String name, boolean value)
     Sets a boolean property.
public  voidsetDefaultProperty(String name, Object value)
    
public  voidsetDirty(boolean d)
     Sets the 'dirty' (changed since last save) flag of this buffer.
protected  voidsetFileReadOnly(boolean readOnly)
    
public  voidsetFoldHandler(FoldHandler foldHandler)
     Sets the buffer's fold handler.
public  voidsetIntegerProperty(String name, int value)
     Sets an integer property.
public  voidsetLoading(boolean loading)
    
public  voidsetMode(String mode)
     Sets this buffer's edit mode.
public  voidsetMode(Mode mode)
     Sets this buffer's edit mode.
public  voidsetPerformingIO(boolean io)
     Returns true if the buffer is currently performing I/O.
public  voidsetProperty(String name, Object value)
     Sets the value of a buffer-local property.
public  voidsetReadOnly(boolean readOnly)
     Sets the read only flag.
public  voidsetStringProperty(String name, String value)
     Sets a string property.
public  voidsetTokenMarker(TokenMarker tokenMarker)
    
public  voidshiftIndentLeft(int[] lines)
     Shifts the indent of each line in the specified list to the left.
public  voidshiftIndentRight(int[] lines)
     Shifts the indent of each line in the specified list to the right.
public  voidundo(TextArea textArea)
     Undoes the most recent edit.
public  voidunsetProperty(String name)
     Clears the value of a buffer-local property.
public  voidwriteLock()
     Attempting to obtain read lock will block between calls to JEditBuffer.writeLock() and JEditBuffer.writeUnlock() .
public  voidwriteUnlock()
     Attempting to obtain read lock will block between calls to JEditBuffer.writeLock() and JEditBuffer.writeUnlock() .

Field Detail
ENCODING
final public static String ENCODING(Code)
Character encoding used when loading and saving.
since:
   jEdit 3.2pre4



HIGH_PRIORITY
final public static int HIGH_PRIORITY(Code)



LINESEP
final public static String LINESEP(Code)
Line separator property.



NORMAL_PRIORITY
final public static int NORMAL_PRIORITY(Code)



mode
protected Mode mode(Code)



seg
protected Segment seg(Code)



textMode
protected boolean textMode(Code)



undoMgr
protected UndoManager undoMgr(Code)




Constructor Detail
JEditBuffer
public JEditBuffer(Map props)(Code)



JEditBuffer
public JEditBuffer()(Code)




Method Detail
addBufferListener
public void addBufferListener(BufferListener listener, int priority)(Code)
Adds a buffer change listener.
Parameters:
  listener - The listener
Parameters:
  priority - Listeners with HIGH_PRIORITY get the event beforelisteners with NORMAL_PRIORITY
since:
   jEdit 4.3pre3



addBufferListener
public void addBufferListener(BufferListener listener)(Code)
Adds a buffer change listener.
Parameters:
  listener - The listener
since:
   jEdit 4.3pre3



beginCompoundEdit
public void beginCompoundEdit()(Code)
Starts a compound edit. All edits from now on until JEditBuffer.endCompoundEdit() are called will be merged into one. This can be used to make a complex operation undoable in one step. Nested calls to JEditBuffer.beginCompoundEdit() behave as expected, requiring the same number of JEditBuffer.endCompoundEdit() calls to end the edit.
See Also:   JEditBuffer.endCompoundEdit()



createPosition
public Position createPosition(int offset)(Code)
Creates a floating position.
Parameters:
  offset - The offset



endCompoundEdit
public void endCompoundEdit()(Code)
Ends a compound edit. All edits performed since JEditBuffer.beginCompoundEdit() was called can now be undone in one step by calling JEditBuffer.undo(TextArea) .
See Also:   JEditBuffer.beginCompoundEdit()



fireBufferLoaded
protected void fireBufferLoaded()(Code)



fireContentInserted
protected void fireContentInserted(int startLine, int offset, int numLines, int length)(Code)



fireContentRemoved
protected void fireContentRemoved(int startLine, int offset, int numLines, int length)(Code)



fireFoldHandlerChanged
protected void fireFoldHandlerChanged()(Code)



fireFoldLevelChanged
protected void fireFoldLevelChanged(int start, int end)(Code)



firePreContentInserted
protected void firePreContentInserted(int startLine, int offset, int numLines, int length)(Code)



firePreContentRemoved
protected void firePreContentRemoved(int startLine, int offset, int numLines, int length)(Code)



fireTransactionComplete
protected void fireTransactionComplete()(Code)



getBooleanProperty
public boolean getBooleanProperty(String name)(Code)
Returns the value of a boolean property. This method is thread-safe.
Parameters:
  name - The property name
since:
   jEdit 4.0pre1



getBufferListeners
public BufferListener[] getBufferListeners()(Code)
Returns an array of registered buffer change listeners.
since:
   jEdit 4.3pre3



getContextSensitiveProperty
public String getContextSensitiveProperty(int offset, String name)(Code)
Some settings, like comment start and end strings, can vary between different parts of a buffer (HTML text and inline JavaScript, for example).
Parameters:
  offset - The offset
Parameters:
  name - The property name
since:
   jEdit 4.0pre3



getCurrentIndentForLine
public int getCurrentIndentForLine(int lineIndex, int[] whitespaceChars)(Code)
Returns the line's current leading indent.
Parameters:
  lineIndex - The line number
Parameters:
  whitespaceChars - If this is non-null, the number of whitespacecharacters is stored at the 0 index
since:
   jEdit 4.2pre2



getDefaultProperty
public Object getDefaultProperty(String key)(Code)



getFoldAtLine
public int[] getFoldAtLine(int line)(Code)
Returns an array. The first element is the start line, the second element is the end line, of the fold containing the specified line number.
Parameters:
  line - The line number
since:
   jEdit 4.0pre3



getFoldHandler
public FoldHandler getFoldHandler()(Code)
Returns the current buffer's fold handler.
since:
   jEdit 4.2pre1



getFoldLevel
public int getFoldLevel(int line)(Code)
Returns the fold level of the specified line.
Parameters:
  line - A physical line index
since:
   jEdit 3.1pre1



getIdealIndentForLine
public int getIdealIndentForLine(int lineIndex)(Code)
Returns the ideal leading indent for the specified line. This will apply the various auto-indent rules.
Parameters:
  lineIndex - The line number



getIndentSize
public int getIndentSize()(Code)
Returns the indent size used in this buffer. This is equivalent to calling getProperty("indentSize"). This method is thread-safe.
since:
   jEdit 2.7pre1



getIntegerProperty
public int getIntegerProperty(String name, int defaultValue)(Code)
Returns the value of an integer property. This method is thread-safe.
Parameters:
  name - The property name
since:
   jEdit 4.0pre1



getKeywordMapAtOffset
public KeywordMap getKeywordMapAtOffset(int offset)(Code)
Returns the syntax highlighting keyword map in effect at the specified offset. Used by the Complete Word command to complete keywords.
Parameters:
  offset - The offset
since:
   jEdit 4.0pre3



getLength
public int getLength()(Code)
Returns the number of characters in the buffer. This method is thread-safe.



getLineCount
public int getLineCount()(Code)
Returns the number of physical lines in the buffer. This method is thread-safe.
since:
   jEdit 3.1pre1



getLineEndOffset
public int getLineEndOffset(int line)(Code)
Returns the end offset of the specified line. This method is thread-safe.
Parameters:
  line - The line The end offset of the specified lineinvalid.
since:
   jEdit 4.0pre1



getLineLength
public int getLineLength(int line)(Code)
Returns the length of the specified line. This method is thread-safe.
Parameters:
  line - The line
since:
   jEdit 4.0pre1



getLineOfOffset
public int getLineOfOffset(int offset)(Code)
Returns the line containing the specified offset. This method is thread-safe.
Parameters:
  offset - The offset
since:
   jEdit 4.0pre1



getLineStartOffset
public int getLineStartOffset(int line)(Code)
Returns the start offset of the specified line. This method is thread-safe.
Parameters:
  line - The line The start offset of the specified line
since:
   jEdit 4.0pre1



getLineText
public String getLineText(int line)(Code)
Returns the text on the specified line. This method is thread-safe.
Parameters:
  line - The line The text, or null if the line is invalid
since:
   jEdit 4.0pre1



getLineText
public void getLineText(int line, Segment segment)(Code)
Returns the specified line in a Segment.

Using a Segment is generally more efficient than using a String because it results in less memory allocation and array copying.

This method is thread-safe.
Parameters:
  line - The line
since:
   jEdit 4.0pre1




getMode
public Mode getMode()(Code)
Returns this buffer's edit mode. This method is thread-safe.



getOffsetOfVirtualColumn
public int getOffsetOfVirtualColumn(int line, int column, int[] totalVirtualWidth)(Code)
Returns the offset of a virtual column number (taking tabs into account) relative to the start of the line in question.
Parameters:
  line - The line number
Parameters:
  column - The virtual column number
Parameters:
  totalVirtualWidth - If this array is non-null, the totalvirtual width will be stored in its first location if this methodreturns -1. -1 if the column is out of bounds
since:
   jEdit 4.1pre1



getPatternProperty
public Pattern getPatternProperty(String name, int flags)(Code)
Returns the value of a property as a regular expression. This method is thread-safe.
Parameters:
  name - The property name
Parameters:
  flags - Regular expression compilation flags
since:
   jEdit 4.3pre5



getPriorNonEmptyLine
public int getPriorNonEmptyLine(int lineIndex)(Code)
Auto indent needs this.



getProperty
public Object getProperty(Object name)(Code)
Returns the value of a buffer-local property.

Using this method is generally discouraged, because it returns an Object which must be cast to another type in order to be useful, and this can cause problems if the object is of a different type than what the caller expects.

The following methods should be used instead:

This method is thread-safe.
Parameters:
  name - The property name. For backwards compatibility, thisis an Object, not a String.



getRuleSetAtOffset
public ParserRuleSet getRuleSetAtOffset(int offset)(Code)
Returns the syntax highlighting ruleset at the specified offset.
since:
   jEdit 4.1pre1



getStringProperty
public String getStringProperty(String name)(Code)
Returns the value of a string property. This method is thread-safe.
Parameters:
  name - The property name
since:
   jEdit 4.0pre1



getTabSize
public int getTabSize()(Code)
Returns the tab size used in this buffer. This is equivalent to calling getProperty("tabSize"). This method is thread-safe.



getText
public String getText(int start, int length)(Code)
Returns the specified text range. This method is thread-safe.
Parameters:
  start - The start offset
Parameters:
  length - The number of characters to get



getText
public void getText(int start, int length, Segment seg)(Code)
Returns the specified text range in a Segment.

Using a Segment is generally more efficient than using a String because it results in less memory allocation and array copying.

This method is thread-safe.
Parameters:
  start - The start offset
Parameters:
  length - The number of characters to get
Parameters:
  seg - The segment to copy the text to




getTokenMarker
public TokenMarker getTokenMarker()(Code)



getVirtualWidth
public int getVirtualWidth(int line, int column)(Code)
Returns the virtual column number (taking tabs into account) of the specified position.
Parameters:
  line - The line number
Parameters:
  column - The column number
since:
   jEdit 4.1pre1



indentLine
public boolean indentLine(int lineIndex, boolean canIncreaseIndent, boolean canDecreaseIndent)(Code)
JEditBuffer.indentLine(int,boolean)



indentLine
public boolean indentLine(int lineIndex, boolean canDecreaseIndent)(Code)
Indents the specified line.
Parameters:
  lineIndex - The line number to indent
Parameters:
  canDecreaseIndent - If true, the indent can be decreased as aresult of this. Set this to false for Tab key. true If indentation took place, false otherwise.
since:
   jEdit 4.2pre2



indentLines
public void indentLines(int start, int end)(Code)
Indents all specified lines.
Parameters:
  start - The first line to indent
Parameters:
  end - The last line to indent
since:
   jEdit 3.1pre3



indentLines
public void indentLines(int[] lines)(Code)
Indents all specified lines.
Parameters:
  lines - The line numbers
since:
   jEdit 3.2pre1



insert
public void insert(int offset, String str)(Code)
Inserts a string into the buffer.
Parameters:
  offset - The offset
Parameters:
  str - The string
since:
   jEdit 4.0pre1



insert
public void insert(int offset, Segment seg)(Code)
Inserts a string into the buffer.
Parameters:
  offset - The offset
Parameters:
  seg - The segment
since:
   jEdit 4.0pre1



insertAtColumn
public void insertAtColumn(int line, int col, String str)(Code)
Like the JEditBuffer.insert(int,String) method, but inserts the string at the specified virtual column. Inserts spaces as appropriate if the line is shorter than the column.
Parameters:
  line - The line number
Parameters:
  col - The virtual column number
Parameters:
  str - The string



insertIndented
public int insertIndented(int offset, String text)(Code)
Inserts a string into the buffer, indenting each line of the string to match the indent of the first line.
Parameters:
  offset - The offset
Parameters:
  text - The text The number of characters of indent inserted on each newline. This is used by the abbreviations code.
since:
   jEdit 4.2pre14



insideCompoundEdit
public boolean insideCompoundEdit()(Code)
Returns if a compound edit is currently active.
since:
   jEdit 3.1pre1



invalidateCachedFoldLevels
public void invalidateCachedFoldLevels()(Code)
Invalidates all cached fold level information.
since:
   jEdit 4.1pre11



invalidateFoldLevels
protected void invalidateFoldLevels()(Code)



isDirty
public boolean isDirty()(Code)
Returns whether there have been unsaved changes to this buffer. This method is thread-safe.



isEditable
public boolean isEditable()(Code)
Returns true if this file is editable, false otherwise. A file may become uneditable if it is read only, or if I/O is in progress. This method is thread-safe.
since:
   jEdit 2.7pre1



isElectricKey
public boolean isElectricKey(char ch)(Code)
Should inserting this character trigger a re-indent of the current line?
since:
   jEdit 4.3pre2



isElectricKey
public boolean isElectricKey(char ch, int line)(Code)
Should inserting this character trigger a re-indent of the current line?
since:
   jEdit 4.3pre9



isFileReadOnly
protected boolean isFileReadOnly()(Code)



isFoldEnd
public boolean isFoldEnd(int line)(Code)
Returns if the specified line ends a fold.
since:
   jEdit 4.2pre5



isFoldStart
public boolean isFoldStart(int line)(Code)
Returns if the specified line begins a fold.
since:
   jEdit 3.1pre1



isLoading
public boolean isLoading()(Code)



isPerformingIO
public boolean isPerformingIO()(Code)
Returns true if the buffer is currently performing I/O. This method is thread-safe.
since:
   jEdit 2.7pre1



isReadOnly
public boolean isReadOnly()(Code)
Returns true if this file is read only, false otherwise. This method is thread-safe.



isTransactionInProgress
public boolean isTransactionInProgress()(Code)
Returns if an undo or compound edit is currently in progress. If this method returns true, then eventually a org.gjt.sp.jedit.buffer.BufferListener.transactionComplete(JEditBuffer) buffer event will get fired.
since:
   jEdit 4.0pre6



isUndoInProgress
public boolean isUndoInProgress()(Code)
Returns if an undo or redo is currently being performed.
since:
   jEdit 4.3pre3



loadText
protected void loadText(Segment seg, IntegerArray endOffsets)(Code)



markTokens
public void markTokens(int lineIndex, TokenHandler tokenHandler)(Code)
Returns the syntax tokens for the specified line.
Parameters:
  lineIndex - The line number
Parameters:
  tokenHandler - The token handler that will receive the syntaxtokens
since:
   jEdit 4.1pre1



parseBufferLocalProperties
protected void parseBufferLocalProperties()(Code)



propertiesChanged
public void propertiesChanged()(Code)
Reloads settings from the properties. This should be called after the syntax or folding buffer-local properties are changed.



readLock
public void readLock()(Code)
The buffer is guaranteed not to change between calls to JEditBuffer.readLock() and JEditBuffer.readUnlock() .



readUnlock
public void readUnlock()(Code)
The buffer is guaranteed not to change between calls to JEditBuffer.readLock() and JEditBuffer.readUnlock() .



redo
public void redo(TextArea textArea)(Code)
Redoes the most recently undone edit.
since:
   jEdit 2.7pre2



remove
public void remove(int offset, int length)(Code)
Removes the specified rang efrom the buffer.
Parameters:
  offset - The start offset
Parameters:
  length - The number of characters to remove



removeBufferListener
public void removeBufferListener(BufferListener listener)(Code)
Removes a buffer change listener.
Parameters:
  listener - The listener
since:
   jEdit 4.3pre3



removeTrailingWhiteSpace
public void removeTrailingWhiteSpace(int[] lines)(Code)
Removes trailing whitespace from all lines in the specified list.
Parameters:
  lines - The line numbers
since:
   jEdit 3.2pre1



resetCachedProperties
public void resetCachedProperties()(Code)



setBooleanProperty
public void setBooleanProperty(String name, boolean value)(Code)
Sets a boolean property.
Parameters:
  name - The property name
Parameters:
  value - The value
since:
   jEdit 4.0pre1



setDefaultProperty
public void setDefaultProperty(String name, Object value)(Code)



setDirty
public void setDirty(boolean d)(Code)
Sets the 'dirty' (changed since last save) flag of this buffer.



setFileReadOnly
protected void setFileReadOnly(boolean readOnly)(Code)



setFoldHandler
public void setFoldHandler(FoldHandler foldHandler)(Code)
Sets the buffer's fold handler.
since:
   jEdit 4.2pre2



setIntegerProperty
public void setIntegerProperty(String name, int value)(Code)
Sets an integer property.
Parameters:
  name - The property name
Parameters:
  value - The value
since:
   jEdit 4.0pre1



setLoading
public void setLoading(boolean loading)(Code)



setMode
public void setMode(String mode)(Code)
Sets this buffer's edit mode. Note that calling this before a buffer is loaded will have no effect; in that case, set the "mode" property to the name of the mode. A bit inelegant, I know...
Parameters:
  mode - The mode name
since:
   jEdit 4.2pre1



setMode
public void setMode(Mode mode)(Code)
Sets this buffer's edit mode. Note that calling this before a buffer is loaded will have no effect; in that case, set the "mode" property to the name of the mode. A bit inelegant, I know...
Parameters:
  mode - The mode



setPerformingIO
public void setPerformingIO(boolean io)(Code)
Returns true if the buffer is currently performing I/O. This method is thread-safe.
since:
   jEdit 2.7pre1



setProperty
public void setProperty(String name, Object value)(Code)
Sets the value of a buffer-local property.
Parameters:
  name - The property name
Parameters:
  value - The property value
since:
   jEdit 4.0pre1



setReadOnly
public void setReadOnly(boolean readOnly)(Code)
Sets the read only flag.
Parameters:
  readOnly - The read only flag



setStringProperty
public void setStringProperty(String name, String value)(Code)
Sets a string property.
Parameters:
  name - The property name
Parameters:
  value - The value
since:
   jEdit 4.0pre1



setTokenMarker
public void setTokenMarker(TokenMarker tokenMarker)(Code)



shiftIndentLeft
public void shiftIndentLeft(int[] lines)(Code)
Shifts the indent of each line in the specified list to the left.
Parameters:
  lines - The line numbers
since:
   jEdit 3.2pre1



shiftIndentRight
public void shiftIndentRight(int[] lines)(Code)
Shifts the indent of each line in the specified list to the right.
Parameters:
  lines - The line numbers
since:
   jEdit 3.2pre1



undo
public void undo(TextArea textArea)(Code)
Undoes the most recent edit.
since:
   jEdit 4.0pre1



unsetProperty
public void unsetProperty(String name)(Code)
Clears the value of a buffer-local property.
Parameters:
  name - The property name
since:
   jEdit 4.0pre1



writeLock
public void writeLock()(Code)
Attempting to obtain read lock will block between calls to JEditBuffer.writeLock() and JEditBuffer.writeUnlock() .



writeUnlock
public void writeUnlock()(Code)
Attempting to obtain read lock will block between calls to JEditBuffer.writeLock() and JEditBuffer.writeUnlock() .



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.