Package com.ibm.icu.dev.demo.translit
Class Demo
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
com.ibm.icu.dev.demo.translit.Demo
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
A frame that allows the user to experiment with keyboard
transliteration. This class has a main() method so it can be run
as an application. The frame contains an editable text component
and uses keyboard transliteration to process keyboard events.
Copyright (c) IBM Corporation 1999. All rights reserved.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
(package private) static class
(package private) class
(package private) class
(package private) class
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.Type
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static BreakIterator
(package private) static final int
(package private) static final int
(package private) static final int
(package private) static final int
(package private) InfoDialog
(package private) MenuItem
(package private) MenuItem
(package private) static final boolean
(package private) String
(package private) int
(package private) Transliterator
(package private) InfoDialog
(package private) static Transliterator
(package private) static Transliterator
(package private) static String
(package private) InfoDialog
(package private) Map
(package private) Menu
(package private) Set
(package private) static final int
(package private) static final String
(package private) static final byte
(package private) CheckboxMenuItem
(package private) static Transliterator
(package private) static final int
(package private) TextField
(package private) InfoDialog
(package private) static Transliterator
(package private) static final String
private static final long
For serialization(package private) static final String
(package private) MenuItem
(package private) static final int
(package private) TransliteratingTextComponent
(package private) static Transliterator
(package private) static final byte
(package private) static final byte
(package private) Transliterator
(package private) boolean
(package private) CheckboxMenuItem
(package private) Menu
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) Set
add
(Set s, Enumeration enumeration) (package private) void
addHistory
(Transliterator trans) (package private) static void
addSentenceToTable
(PrintWriter out, String sentence, byte titleSetting, boolean addName, boolean testRoundTrip, boolean first, Transliterator tl, Transliterator lt) (package private) static UnicodeSet
closeUnicodeSet
(UnicodeSet source, int options) (package private) static void
genTestFile
(File sourceFile, Transliterator translit, String variant) (package private) static int
getFirstLetterType
(String line, int start, int end) private void
Decode a menu item that looks like. private void
private void
static void
(package private) static void
printBreaks
(int num, String testSource, BreakIterator brkItr) (package private) static void
printIteration
(int num, String testSource, CharacterIterator ci) (package private) static void
printNames
(UnicodeSet s, String targetFile) (package private) static void
(package private) void
setTransliterator
(String name, String id) (package private) static String
showDifference
(String as, String bs) (package private) static void
showSets
(PrintWriter out, Transliterator translit, Transliterator inverse, UnicodeSet sourceSuper, UnicodeSet targetSuper, int options) (package private) static String
titlecaseFirstWord
(String line) (package private) static String
toPattern
(UnicodeSet source, UnicodeSet superset) Methods inherited from class java.awt.Frame
addNotify, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setBackground, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor serialization- See Also:
-
DEBUG
static final boolean DEBUG- See Also:
-
START_TEXT
- See Also:
-
translit
Transliterator translit -
fontName
String fontName -
fontSize
int fontSize -
text
-
translitMenu
Menu translitMenu -
translitItem
CheckboxMenuItem translitItem -
noTranslitItem
CheckboxMenuItem noTranslitItem -
NO_TRANSLITERATOR
- See Also:
-
RULE_FILE
static final int RULE_FILE- See Also:
-
TEST_FILE
static final int TEST_FILE- See Also:
-
transliterateTyping
boolean transliterateTyping -
fromHex
Transliterator fromHex -
helpDialog
InfoDialog helpDialog -
hexDialog
InfoDialog hexDialog -
compoundDialog
InfoDialog compoundDialog -
rulesDialog
InfoDialog rulesDialog -
ruleId
TextField ruleId -
convertSelectionItem
MenuItem convertSelectionItem -
swapSelectionItem
MenuItem swapSelectionItem -
convertTypingItem
MenuItem convertTypingItem -
historyMenu
Menu historyMenu -
historyMap
Map historyMap -
historySet
Set historySet -
title
-
hexAndNameRules
-
hexAndName
-
NONE
static final byte NONE- See Also:
-
TITLEWORD
static final byte TITLEWORD- See Also:
-
TITLELINE
static final byte TITLELINE- See Also:
-
CLOSE_CASE
static final int CLOSE_CASE- See Also:
-
CLOSE_FLATTEN
static final int CLOSE_FLATTEN- See Also:
-
CLOSE_CANONICAL
static final int CLOSE_CANONICAL- See Also:
-
CLOSE_COMPATIBILITY
static final int CLOSE_COMPATIBILITY- See Also:
-
bi
-
LETTER_MASK
static final int LETTER_MASK- See Also:
-
hex
-
saveRules
- See Also:
-
saveAscii
-
restoreAscii
-
-
Constructor Details
-
Demo
public Demo(int width, int height)
-
-
Method Details
-
main
-
initMenus
private void initMenus() -
printBreaks
-
printIteration
-
printSources
static void printSources() -
genTestFile
-
addSentenceToTable
static void addSentenceToTable(PrintWriter out, String sentence, byte titleSetting, boolean addName, boolean testRoundTrip, boolean first, Transliterator tl, Transliterator lt) -
showDifference
-
showSets
static void showSets(PrintWriter out, Transliterator translit, Transliterator inverse, UnicodeSet sourceSuper, UnicodeSet targetSuper, int options) -
closeUnicodeSet
-
toPattern
-
titlecaseFirstWord
-
getFirstLetterType
-
printNames
-
setTransliterator
-
addHistory
-
add
-
handleBatchTransliterate
Decode a menu item that looks like. -
handleClose
private void handleClose()
-