Unzip the archive. The archive should create a single directory named richedit.
The directory should contain the following:
Make sure the doc/ directory contains javadoc for the com.ibm.richtext.awtui,
com.ibm.richtext.swingui, com.ibm.richtext.textpanel, com.ibm.richtext.print,
com.ibm.textpanel, com.ibm.richtext.styledtext, and com.ibm.textlayout.attributes
packages.
To run the test, add control.jar to your classpath as follows:
>set CLASSPATH=<install dir>\richedit\control.jar;%CLASSPATH%
Run the test as follows:
>java com.ibm.richtext.tests.ITestTextPanel
Press the "Exercise" button. This will generate random operations
in the control for a minute or so. Make sure no exceptions appear
on the console. After the operations have stopped, make sure you
can type in the control and select with the mouse. Repeat this test
by pressing "Exercise" one more time.
Click the mouse inside the document area and type the sentence "The quick brown fox jumps over the lazy dog." Double-click the word "jumps". Click on the style menu. The Plain item should be the only checked item in the menu. Select Underline from the style menu. The word "jumps" should now be underlined. Click the style menu again. Now Underline should be the only checked item. Click outside of the style menu to close it.
Hold down the shift key and click on the 'c' in "quick". The selection should now be "quick brown fox jumps". Click the style menu. No items should be checked. Select Strikethrough. The selection should appear with a strikethrough. Click the style menu and make sure Strikethrough is the only checked item. Close the style menu. Click the Size menu and select 48. Make sure the selected text gets larger.
Click after the 's' in "jumps". Press the backspace key five times to delete the word, then immediately retype it. "jumps" should appear with the same style as before (with underline and strikethrough).
Click the Flush menu and select Center. Make sure the lines are now centered.
Click the Edit menu and select Select All. All of the text should be selected. Look at the Size and Style menus: no items should be selected. In the Flush menu, only Center should be selected.
Choose Cut from the Edit menu. All of the text should be removed. Choose Undo from the Edit menu. The text should reappear, and be entirely selected. Press the left arrow key. The cursor should appear before the first character. Select Paste from the Edit menu. The sentence should now appear twice in the document, with the same styles. Select Undo, then Redo from the Edit menu. The document should now have two sentences.
Select some text in the edit demo. Choose Copy from the Edit menu.
Open another text editing application (such as Notepad), create a new document,
and choose Paste from that application's Edit menu. The selected
text should appear in the document (without styles). In the other
application, type a few words (different from the text in the edit demo).
Select the new text (in the other application), and choose Copy from the
application's Edit menu. In the edit demo, choose Paste from the
Edit menu. The new text should appear in the document.
Type a few characters into the document. Click the close box. You should see the same dialog box as before. Press cancel. Select Undo from the Edit menu. Click the close box. The edit demo should exit.
Restart the edit demo. Choose Open from the File menu. Find the file you saved and select it. The text should appear in the edit demo, and the frame title should be the file name.
[Optional] Select Print from the File menu. Check the printer
output - the line breaks will not necessarily match those on screen, but
the styles and character sizes should match.
Restart the edit demo. Choose "Font..." from the Style menu and set the font to "Lucida Sans" (not "Lucida Sans Unicode"). Type "Hello world." in the document. Select Hebrew from the Keymap menu. Move the caret immediately after "Hello" and type "<space>sloM". The Hebrew characters Shin, Lamed, Vav and Final Mem (Unicode \u05e9, \u05dc, \u05d5, \u05dd) should appear in right-to-left order between the two English words.
Move the mouse to the left of the 'e' in "Hello". Press the mouse button and drag to the left of the Hebrew Shin. (Shin is the rightmost Hebrew character; it resembles a W.) The selected characters should be 'ello' and the Shin.
Click on the Bidi menu. "Default Paragraph Direction" should be checked. Click on "Right-to-left Paragraph Direction". The text should move to the right of the edit demo window, and "Hello" should appear to the right of the Hebrew word, which should be to the right of "world". The same characters should be selected. Select "Left-to-right Paragraph Direction" from the Bidi menu. The text should appear as before.
Click to the right of the sentence and press Enter to start a new paragraph. Select Arabic from the Keymap menu. Type la. You should see a lam-alef ligature (Unicode \ufefb). Type "<space>klamArby". Make sure the characters change shape to connect to adjacent characters.
IBM JDK Only - you must start the VM with '-Duser.language=th' for correct word-wrap: Press <enter>. Select "Thai Ketmanee" from the Keymap menu. Type fh<space>fuh. The tone mark which is over the first set of Thai characters should appear smaller, and raised, over the second set of Thai characters. Press the left arrow key, then press <delete>. The entire second set of Thai characters should be deleted. Press <enter> and type "]k[wdj". Move the cursor to the beginning of this paragraph and press <space> until part of the Thai wraps to the next line. Note that there should be a break in the middle of the Thai sequence - it is incorrect for the entire Thai sequence to wrap as a single word.