2362N/A * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * The InputMethodContext class provides methods that input methods 0N/A * can use to communicate with their client components. 0N/A * It is a subclass of InputContext, which provides methods for use by 0N/A * @author JavaSoft International 0N/A // Creation of the context's composition area handler is 0N/A // delayed until we really need a composition area. 0N/A // check whether we should use below-the-spot input 0N/A // get property from command line 0N/A * Constructs an InputMethodContext. 0N/A // implements java.awt.im.spi.InputMethodContext.dispatchInputMethodEvent 0N/A // We need to record the client component as the source so 0N/A // that we have correct information if we later have to break up this 0N/A // event into key events. 0N/A * Dispatches committed text to a client component. 0N/A * Called by composition window. 0N/A * @param client The component that the text should get dispatched to. 0N/A * @param text The iterator providing access to the committed 0N/A * (and possible composed) text. 0N/A * @param committedCharacterCount The number of committed characters in the text. 0N/A // note that the client is not always the current client component - 0N/A // some host input method adapters may dispatch input method events 0N/A // through the Java event queue, and we may have switched clients while 0N/A // the event was in the queue. 0N/A // active client -> send text as InputMethodEvent 0N/A // passive client -> send text as KeyEvents 0N/A // some host input method adapters may dispatch input method events 0N/A // through the Java event queue. If the component that the event is 0N/A // intended for isn't an active client, or if we're using below-the-spot 0N/A // input, we need to dispatch this event 0N/A // to the input window. Note that that component is not necessarily the 0N/A // current client component, since we may have switched clients while 0N/A // the event was in the queue. 0N/A // make sure we don't dispatch our own key events back to the input method 0N/A * Gets this context's composition area handler, creating it if necessary. 0N/A * If requested, it grabs the composition area for use by this context. 0N/A * The composition area's text is not updated. 0N/A * Grabs the composition area for use by this context. 0N/A * If doUpdate is true, updates the composition area with previously sent 0N/A // if this context hasn't seen a need for a composition area yet, 0N/A // just close it without creating the machinery 0N/A * Releases and closes the composition area if it is currently owned by 0N/A * this context's composition area handler. 0N/A * Calls CompositionAreaHandler.isCompositionAreaVisible() to see 0N/A * whether the composition area is visible or not. 0N/A * Notice that this method is always called on the AWT event dispatch 0N/A * Calls CompositionAreaHandler.setCompositionAreaVisible to 0N/A * show or hide the composition area. 0N/A * As isCompositionAreaVisible method, it is always called 0N/A * on AWT event dispatch thread. 0N/A * Calls the current client component's implementation of getTextLocation. 0N/A * Calls the current client component's implementation of getLocationOffset. 0N/A * Calls the current client component's implementation of getInsertPositionOffset. 0N/A * Calls the current client component's implementation of getCommittedText. 0N/A * Calls the current client component's implementation of getCommittedTextLength. 0N/A * Calls the current client component's implementation of cancelLatestCommittedText. 0N/A * Calls the current client component's implementation of getSelectedText. 0N/A // implements java.awt.im.spi.InputMethodContext.createInputMethodWindow 0N/A // implements java.awt.im.spi.InputMethodContext.createInputMethodJFrame 0N/A * @see java.awt.im.spi.InputMethodContext#enableClientWindowNotification 0N/A * Disables or enables decorations for the composition window.