Class Demo

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

    public class Demo
    extends java.awt.Frame
    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:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static class  Demo.DummyFactory  
      (package private) static class  Demo.FileListener  
      (package private) class  Demo.FontActionListener  
      (package private) class  Demo.SizeActionListener  
      (package private) class  Demo.TransliterationListener  
      • Nested classes/interfaces inherited from class java.awt.Frame

        java.awt.Frame.AccessibleAWTFrame
      • Nested classes/interfaces inherited from class java.awt.Window

        java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Constructor Summary

      Constructors 
      Constructor Description
      Demo​(int width, int height)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) java.util.Set add​(java.util.Set s, java.util.Enumeration enumeration)  
      (package private) void addHistory​(Transliterator trans)  
      (package private) static void addSentenceToTable​(java.io.PrintWriter out, java.lang.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​(java.io.File sourceFile, Transliterator translit, java.lang.String variant)  
      (package private) static int getFirstLetterType​(java.lang.String line, int start, int end)  
      private void handleBatchTransliterate​(Transliterator trans)
      Decode a menu item that looks like .
      private void handleClose()  
      private void initMenus()  
      static void main​(java.lang.String[] args)  
      (package private) static void printBreaks​(int num, java.lang.String testSource, BreakIterator brkItr)  
      (package private) static void printIteration​(int num, java.lang.String testSource, java.text.CharacterIterator ci)  
      (package private) static void printNames​(UnicodeSet s, java.lang.String targetFile)  
      (package private) static void printSources()  
      (package private) void setTransliterator​(java.lang.String name, java.lang.String id)  
      (package private) static java.lang.String showDifference​(java.lang.String as, java.lang.String bs)  
      (package private) static void showSets​(java.io.PrintWriter out, Transliterator translit, Transliterator inverse, UnicodeSet sourceSuper, UnicodeSet targetSuper, int options)  
      (package private) static java.lang.String titlecaseFirstWord​(java.lang.String line)  
      (package private) static java.lang.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
    • Constructor Detail

      • Demo

        public Demo​(int width,
                    int height)
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
      • initMenus

        private void initMenus()
      • printBreaks

        static void printBreaks​(int num,
                                java.lang.String testSource,
                                BreakIterator brkItr)
      • printIteration

        static void printIteration​(int num,
                                   java.lang.String testSource,
                                   java.text.CharacterIterator ci)
      • printSources

        static void printSources()
      • genTestFile

        static void genTestFile​(java.io.File sourceFile,
                                Transliterator translit,
                                java.lang.String variant)
      • addSentenceToTable

        static void addSentenceToTable​(java.io.PrintWriter out,
                                       java.lang.String sentence,
                                       byte titleSetting,
                                       boolean addName,
                                       boolean testRoundTrip,
                                       boolean first,
                                       Transliterator tl,
                                       Transliterator lt)
      • showDifference

        static java.lang.String showDifference​(java.lang.String as,
                                               java.lang.String bs)
      • titlecaseFirstWord

        static java.lang.String titlecaseFirstWord​(java.lang.String line)
      • getFirstLetterType

        static int getFirstLetterType​(java.lang.String line,
                                      int start,
                                      int end)
      • printNames

        static void printNames​(UnicodeSet s,
                               java.lang.String targetFile)
      • setTransliterator

        void setTransliterator​(java.lang.String name,
                               java.lang.String id)
      • add

        java.util.Set add​(java.util.Set s,
                          java.util.Enumeration enumeration)
      • handleBatchTransliterate

        private void handleBatchTransliterate​(Transliterator trans)
        Decode a menu item that looks like .
      • handleClose

        private void handleClose()