Java Doc for FindReplaceMachine.java in  » IDE » DrJava » edu » rice » cs » drjava » model » 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 » DrJava » edu.rice.cs.drjava.model 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   edu.rice.cs.drjava.model.FindReplaceMachine

FindReplaceMachine
public class FindReplaceMachine (Code)
Implementation of logic of find/replace over a document.
version:
   $Id: FindReplaceMachine.java 4255 2007-08-28 19:17:37Z mgricken $



Constructor Summary
public  FindReplaceMachine(SingleDisplayModel model, DocumentIterator docIterator)
     Standard Constructor.

Method Summary
public  voidcleanUp()
    
public  FindResultfindNext()
    
public  intgetCurrentOffset()
     Gets the character offset to which this machine is currently pointing.
public  OpenDefinitionsDocumentgetDocument()
    
public  StringgetFindWord()
    
public  OpenDefinitionsDocumentgetFirstDoc()
    
public  StringgetReplaceWord()
    
public  booleangetSearchAllDocuments()
    
public  booleangetSearchBackwards()
    
public  booleanonMatch()
     Determine if the machine is on an instance of the find word.
public  voidpositionChanged()
    
public  intprocessAll(Lambda<Void, FindResult> findAction)
     Processes all occurences of the find word with the replace word in the current document or in all documents depending the value of the machine register _searchAllDocuments.
public  intreplaceAll()
     Replaces all occurences of the find word with the replace word in the current document of in all documents depending the value of the machine register _searchAllDocuments.
public  booleanreplaceCurrent()
     If we're on a match for the find word, replace it with the replace word.
public  voidsetDocument(OpenDefinitionsDocument doc)
    
public  voidsetFindAnyOccurrence()
    
public  voidsetFindWord(String word)
     Change the word being sought.
public  voidsetFirstDoc(OpenDefinitionsDocument firstDoc)
    
public  voidsetIgnoreCommentsAndStrings(boolean ignoreCommentsAndStrings)
    
public  voidsetLastFindWord()
    
public  voidsetMatchCase(boolean matchCase)
    
public  voidsetMatchWholeWord()
    
public  voidsetPosition(int pos)
    
public  voidsetReplaceWord(String word)
     Change the replacing word.
public  voidsetSearchAllDocuments(boolean searchAllDocuments)
    
public  voidsetSearchBackwards(boolean searchBackwards)
    


Constructor Detail
FindReplaceMachine
public FindReplaceMachine(SingleDisplayModel model, DocumentIterator docIterator)(Code)
Standard Constructor. Creates new machine to perform find/replace operations on a particular document starting from a given position.
Parameters:
  docIterator - an object that allows navigation through open Swing documents (it is DefaultGlobalModel)
exception:
  BadLocationException -




Method Detail
cleanUp
public void cleanUp()(Code)



findNext
public FindResult findNext()(Code)



getCurrentOffset
public int getCurrentOffset()(Code)
Gets the character offset to which this machine is currently pointing.



getDocument
public OpenDefinitionsDocument getDocument()(Code)



getFindWord
public String getFindWord()(Code)



getFirstDoc
public OpenDefinitionsDocument getFirstDoc()(Code)



getReplaceWord
public String getReplaceWord()(Code)



getSearchAllDocuments
public boolean getSearchAllDocuments()(Code)



getSearchBackwards
public boolean getSearchBackwards()(Code)



onMatch
public boolean onMatch()(Code)
Determine if the machine is on an instance of the find word. Only executes in event thread except for initialization. true if the current position is right after an instance of the find word.



positionChanged
public void positionChanged()(Code)
Called when the current position is updated in the document implying _skipText should not be set if the user toggles _searchBackwards



processAll
public int processAll(Lambda<Void, FindResult> findAction)(Code)
Processes all occurences of the find word with the replace word in the current document or in all documents depending the value of the machine register _searchAllDocuments.
Parameters:
  findAction - action to perform on the occurrences; input is the FindResult, output is ignored the number of processed occurrences



replaceAll
public int replaceAll()(Code)
Replaces all occurences of the find word with the replace word in the current document of in all documents depending the value of the machine register _searchAllDocuments. the number of replacements



replaceCurrent
public boolean replaceCurrent()(Code)
If we're on a match for the find word, replace it with the replace word. Only executes in event thread.



setDocument
public void setDocument(OpenDefinitionsDocument doc)(Code)



setFindAnyOccurrence
public void setFindAnyOccurrence()(Code)



setFindWord
public void setFindWord(String word)(Code)
Change the word being sought.
Parameters:
  word - the new word to seek



setFirstDoc
public void setFirstDoc(OpenDefinitionsDocument firstDoc)(Code)



setIgnoreCommentsAndStrings
public void setIgnoreCommentsAndStrings(boolean ignoreCommentsAndStrings)(Code)



setLastFindWord
public void setLastFindWord()(Code)



setMatchCase
public void setMatchCase(boolean matchCase)(Code)



setMatchWholeWord
public void setMatchWholeWord()(Code)



setPosition
public void setPosition(int pos)(Code)



setReplaceWord
public void setReplaceWord(String word)(Code)
Change the replacing word.
Parameters:
  word - the new replacing word



setSearchAllDocuments
public void setSearchAllDocuments(boolean searchAllDocuments)(Code)



setSearchBackwards
public void setSearchBackwards(boolean searchBackwards)(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.