(No Login on Secured Page)
|
|
Show Bid Request
Recursive Find-and-Replace for a Swing based Text Editor
Bid Request Id: 30054
|
|
|
Description:
This lab is based on the Notepad example that comes with the SDK. I added comments and started the lab for you by adding find to the pull-down menu and the tool bar and having find generate a modal dialog box. You will notice that most of the code you can ignore.
This project just involves adding a few basic modifications to a notepad. It doesn't involve adding many methods.
Deliverables: Improve readability of code 1. Move the main() method to the top of the class so it is easier to find. 2. Get rid of magic numbers and magic strings that are marked with // ## 3. Change constants to the form ICON_SUFFIX 4. Improve variable names marked // ## 5. Hide all methods and fields that do not need to be public.
Modify Look and Feel 1. The configuration of the pull-down menus and the tool bar are set by resources/Notepad.properties. In this file you will find many resource definitions. They are retrieved from the file with methods like Class.getResourceString ().
Notepad responds to actions. A common action listener is registered for both the pull-down menu and the tool bar. Most actions related to typing are handled by the action listeners from JTextComponent. NotePad itself has seven separate action listeners of its own that enumerated in NotePad.defaultActions [].
By modify resources/Notepad.properties add find_and_replace: 1. Generate a Find pull-down menu and move find to the new menu. 2. Add a find_and_replace item . 3. Add a find_and_replace icon to the toolbar. 4. Specify tool tips for find and find_and_replace 5. Specify your icons for find and find_and_replace.
Handle the find_and_replace action 1. Create a Replace() inner class based on the find inner class. Use System.out to show you can "get there from here".
Register the listener 1. add the action listener for find_and_replace to the array Notepad.defaultActions. You must give it a label that is the same as the Action property in the resources file. Use find as an example.
2. Click the find button multiple times, the window keeps opening, fix this.
3. Create dialog boxes to implement find and find_and_replace. Start with CustomDialog and implement FindDialog. When you done, extend FindDialog to ReplaceDialog.
Use a format for your dialog boxes from your favorite favorite application. You will need to implement the following buttons for the ReplaceDialog: find next, replace, replace all, cancel
Allow the user to select either a recursive or iterative search and replace. How you do this is up to you.
Display the button hits and modes using System.out
Search 1.Find a word in a document. Indicate the location of the word by moving the cursor to the beginning of the word 2. Prompt user when the end of the page is reached by generating a dialog box.
Search and Replace 1. Find a word in the document. Allow the user to replace word and go to the next, or skip the replace and just go to the next matching word. 2. Iteratively find and replace all the matching words in the document. Report number of replacement either in the status bar or on the console. 3. Recursively find and replace all the matching words in the document. Report number of replacement either in the status bar or on the console. 4. Prompt user when end of page is reached during the search. Either generate a dialog box or a beep with a message on status bar. 5. Allow the user to specify the the search 1. matches case 2. searches up or down 3. matches only whole words
5. Measure the time taken to complete the global search and replace using (using System.currentTimeMillis()). Display the time in the status bar or use System.out.println()) which might be easier.
Platform:
Any operating system.
Must be 100% finished and received by buyer on:
Oct 12, 2002 EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Special Conditions / Other:
This needs to be completed by Saturday October 12th 2002. Fully documented is preferred.
Additional Files:
This bid request includes IMPORTANT additional attached files. Please download and read fully before bidding.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
This bid was accepted by the buyer!
|
$10 (USD)
|
Oct 7, 2002 12:19:15 AM EDT
|
10
(Excellent)
|
|
|
Hey, I like to work on this.
|
|
|
|
|
|
|