001: /*
002: *******************************************************************************
003: * Copyright (C) 2002-2004, International Business Machines Corporation and *
004: * others. All Rights Reserved. *
005: *******************************************************************************/
006: package com.ibm.richtext.uiimpl.resources;
007:
008: import java.util.ListResourceBundle;
009: import java.awt.event.KeyEvent;
010:
011: public final class FrameResources extends ListResourceBundle {
012:
013: static final String COPYRIGHT = "(C) Copyright IBM Corp. 1998-1999 - All Rights Reserved";
014: /*
015: * These Strings are keys to other String resources.
016: */
017: // Menu names
018: public static final String EDIT = "Edit";
019: public static final String SIZE = "Size";
020: public static final String FONT = "Font";
021: public static final String STYLE = "Style";
022: public static final String FLUSH = "Flush";
023: public static final String KEYMAP = "Keymap";
024: public static final String ABOUT_MENU = "About";
025: public static final String BIDI = "Bidi";
026:
027: // Buttons
028: public static final String OK = "OK";
029: public static final String CANCEL = "Cancel";
030:
031: // Colors
032: public static final String BLACK = "Black";
033: public static final String WHITE = "White";
034: public static final String GREEN = "Green";
035: public static final String BLUE = "Blue";
036: public static final String CYAN = "Cyan";
037: public static final String GRAY = "Gray";
038: public static final String DARK_GRAY = "Dark Gray";
039: public static final String LIGHT_GRAY = "Light Gray";
040: public static final String MAGENTA = "Magenta";
041: public static final String ORANGE = "Orange";
042: public static final String PINK = "Pink";
043: public static final String RED = "Red";
044: public static final String YELLOW = "Yellow";
045: public static final String NONE = "None";
046:
047: // Dialog titles and messages
048: public static final String SET_SIZE_TITLE = "Set Font Size";
049: public static final String SET_SIZE_LABEL = "Font Size:";
050:
051: public static final String SET_SUPERSCRIPT_TITLE = "Set Superscript";
052: public static final String SET_SUPERSCRIPT_LABEL = "Superscript:";
053: public static final String SET_SUBSCRIPT_TITLE = "Set Subscript";
054: public static final String SET_SUBSCRIPT_LABEL = "Subscript:";
055: public static final String SET_FOREGROUND_TITLE = "Set Foreground";
056: public static final String SET_FOREGROUND_LABEL = "Foreground:";
057: public static final String SET_BACKGROUND_TITLE = "Set Background";
058: public static final String SET_BACKGROUND_LABEL = "Background:";
059: public static final String SET_FONT_TITLE = "Set Font";
060: public static final String SET_FONT_LABEL = "Font:";
061:
062: public static final String ABOUT_TITLE = "About the RichEdit Control";
063:
064: // This is the only String which is not its own value:
065: public static final String ABOUT_TEXT = "About text";
066: private static final String ACTUAL_ABOUT_TEXT = "Copyright (C) IBM Corp. 1996-2002 All rights reserved.\n\n"
067: + "John Raley\n"
068: + "Stephen F. Booth\n"
069: + "Doug Felt\n"
070: + "John Fitzpatrick\n" + "Rich Gillam";
071: /*
072: * The following Strings are keys to MenuData resources. They
073: * also double as the default menu label text.
074: */
075: // Edit menu
076: public static final String UNDO = "Undo";
077: public static final String REDO = "Redo";
078: public static final String CUT = "Cut";
079: public static final String COPY = "Copy";
080: public static final String PASTE = "Paste";
081: public static final String CLEAR = "Clear";
082: public static final String SELECT_ALL = "Select All";
083:
084: // Flush menu
085: public static final String LEADING = "Leading";
086: public static final String TRAILING = "Trailing";
087: public static final String CENTER = "Center";
088: public static final String JUSTIFIED = "Justified";
089:
090: // About menu
091: public static final String ABOUT_ITEM = "About...";
092:
093: // Keymap menu
094: public static final String DEFAULT = "Default";
095: public static final String ARABIC = "Arabic";
096: public static final String HEBREW = "Hebrew";
097: public static final String ISRAEL_NIKUD = "Israel Nikud";
098: public static final String THAI_KETMANEE = "Thai Ketmanee";
099:
100: // Style menu
101: public static final String PLAIN = "Plain";
102: public static final String BOLD = "Bold";
103: public static final String ITALIC = "Italic";
104: public static final String UNDERLINE = "Underline";
105: public static final String STRIKETHROUGH = "Strikethrough";
106: public static final String SUPERSCRIPT = "Superscript";
107: public static final String SUBSCRIPT = "Subscript";
108: public static final String SUPERSCRIPT_DIALOG = "Superscript...";
109: public static final String SUBSCRIPT_DIALOG = "Subscript...";
110: public static final String FORECOLOR_DIALOG = "Forecolor...";
111: public static final String BACKCOLOR_DIALOG = "Backcolor...";
112: public static final String FONT_DIALOG = "Font...";
113:
114: // Size menu
115: public static final String OTHER_DIALOG = "Other...";
116:
117: // Bidi menu
118: public static final String DEFAULT_DIRECTION = "Default Paragraph Direction";
119: public static final String LTR_DIRECTION = "Left-to-right Paragraph Direction";
120: public static final String RTL_DIRECTION = "Right-to-left Paragraph Direction";
121:
122: private static Object[] makeMenuData(String name,
123: char shortCutChar, int shortCutKey) {
124:
125: return new Object[] { name,
126: new MenuData(name, shortCutChar, shortCutKey) };
127: }
128:
129: private static Object[] makeMenuData(String name) {
130:
131: return new Object[] { name, new MenuData(name) };
132: }
133:
134: private static Object[] duplicate(Object obj) {
135:
136: return new Object[] { obj, obj };
137: }
138:
139: protected Object[][] getContents() {
140:
141: return new Object[][] {
142: makeMenuData(UNDO, 'z', KeyEvent.VK_Z),
143: makeMenuData(REDO, 'r', KeyEvent.VK_R),
144: makeMenuData(CUT, 'x', KeyEvent.VK_X),
145: makeMenuData(COPY, 'c', KeyEvent.VK_C),
146: makeMenuData(PASTE, 'v', KeyEvent.VK_V),
147: makeMenuData(CLEAR),
148: makeMenuData(SELECT_ALL),
149: makeMenuData(LEADING),
150: makeMenuData(CENTER),
151: makeMenuData(TRAILING),
152: makeMenuData(JUSTIFIED),
153: makeMenuData(ABOUT_ITEM),
154: makeMenuData(DEFAULT),
155: makeMenuData(HEBREW),
156: makeMenuData(ARABIC),
157: makeMenuData(ISRAEL_NIKUD),
158: makeMenuData(THAI_KETMANEE),
159: makeMenuData(PLAIN),
160: makeMenuData(BOLD, 'b', KeyEvent.VK_B),
161: makeMenuData(ITALIC, 'i', KeyEvent.VK_I), // why doesn't this work in Swing?
162: // this is a Tab in AWT!!!
163: makeMenuData(UNDERLINE, 'u', KeyEvent.VK_U),
164: makeMenuData(STRIKETHROUGH), makeMenuData(SUPERSCRIPT),
165: makeMenuData(SUBSCRIPT),
166: makeMenuData(SUPERSCRIPT_DIALOG),
167: makeMenuData(SUBSCRIPT_DIALOG),
168: makeMenuData(FORECOLOR_DIALOG),
169: makeMenuData(BACKCOLOR_DIALOG),
170: makeMenuData(FONT_DIALOG), makeMenuData(OTHER_DIALOG),
171: makeMenuData(DEFAULT_DIRECTION),
172: makeMenuData(LTR_DIRECTION),
173: makeMenuData(RTL_DIRECTION), duplicate(OK),
174: duplicate(CANCEL), duplicate(BLACK), duplicate(WHITE),
175: duplicate(GREEN), duplicate(BLUE), duplicate(CYAN),
176: duplicate(GRAY), duplicate(DARK_GRAY),
177: duplicate(LIGHT_GRAY), duplicate(MAGENTA),
178: duplicate(ORANGE), duplicate(PINK), duplicate(RED),
179: duplicate(YELLOW), duplicate(NONE),
180: duplicate(SET_SIZE_TITLE), duplicate(SET_SIZE_LABEL),
181: duplicate(SET_SUPERSCRIPT_TITLE),
182: duplicate(SET_SUPERSCRIPT_LABEL),
183: duplicate(SET_SUBSCRIPT_TITLE),
184: duplicate(SET_SUBSCRIPT_LABEL),
185: duplicate(SET_FOREGROUND_TITLE),
186: duplicate(SET_FOREGROUND_LABEL),
187: duplicate(SET_BACKGROUND_TITLE),
188: duplicate(SET_BACKGROUND_LABEL),
189: duplicate(SET_FONT_TITLE), duplicate(SET_FONT_LABEL),
190: duplicate(EDIT), duplicate(SIZE), duplicate(FONT),
191: duplicate(STYLE), duplicate(FLUSH), duplicate(KEYMAP),
192: duplicate(BIDI), duplicate(ABOUT_MENU),
193: duplicate(ABOUT_TITLE),
194: { ABOUT_TEXT, ACTUAL_ABOUT_TEXT } };
195: }
196: }
|