Package java.awt.im

Examples of java.awt.im.InputMethodRequests


     * @return input method requests of composition window if
     * client is passive,
     * otherwise input method requests of client
     */
    private InputMethodRequests getIMRequests() {
        InputMethodRequests imRequests = null;
   
        if (client != null) {
            imRequests = client.getInputMethodRequests();
            if (imRequests == null) {               
                imRequests = getCompositionWindow().getInputMethodRequests();
View Full Code Here


    public int getInsertPositionOffset() {
        return getIMRequests().getInsertPositionOffset();
    }

    public TextHitInfo getLocationOffset(int x, int y) {
        InputMethodRequests imr = getStyleIMRequests();
        if (imr != null) {
            return imr.getLocationOffset(x, y);
        }
        return null;
    }
View Full Code Here

                    // and send it to passive client or just
                    // redirect this event to active client
                    if (client == null) {
                        return;
                    }
                    InputMethodRequests imr = client.getInputMethodRequests();
                    if (imr != null) {
                        if (IMManager.belowTheSpot()) {
                            // position window below the spot:
                            TextHitInfo offset = TextHitInfo.leading(0);
                            Rectangle textLoc = imr.getTextLocation(offset);
                            setLocationBelow(textLoc);                          
                        } else {
                            client.dispatchEvent(ime);
                            return;
                        }
View Full Code Here

     * @return input method requests of composition window if
     * client is passive,
     * otherwise input method requests of client
     */
    private InputMethodRequests getIMRequests() {
        InputMethodRequests imRequests = null;
   
        if (client != null) {
            imRequests = client.getInputMethodRequests();
            if (imRequests == null) {               
                imRequests = getCompositionWindow().getInputMethodRequests();
View Full Code Here

    public int getInsertPositionOffset() {
        return getIMRequests().getInsertPositionOffset();
    }

    public TextHitInfo getLocationOffset(int x, int y) {
        InputMethodRequests imr = getStyleIMRequests();
        if (imr != null) {
            return imr.getLocationOffset(x, y);
        }
        return null;
    }
View Full Code Here

     * @return input method requests of composition window if
     * client is passive,
     * otherwise input method requests of client
     */
    private InputMethodRequests getIMRequests() {
        InputMethodRequests imRequests = null;
   
        if (client != null) {
            imRequests = client.getInputMethodRequests();
            if (imRequests == null) {               
                imRequests = getCompositionWindow().getInputMethodRequests();
View Full Code Here

    public int getInsertPositionOffset() {
        return getIMRequests().getInsertPositionOffset();
    }

    public TextHitInfo getLocationOffset(int x, int y) {
        InputMethodRequests imr = getStyleIMRequests();
        if (imr != null) {
            return imr.getLocationOffset(x, y);
        }
        return null;
    }
View Full Code Here

                    // and send it to passive client or just
                    // redirect this event to active client
                    if (client == null) {
                        return;
                    }
                    InputMethodRequests imr = client.getInputMethodRequests();
                    if (imr != null) {
                        if (IMManager.belowTheSpot()) {
                            // position window below the spot:
                            TextHitInfo offset = TextHitInfo.leading(0);
                            Rectangle textLoc = imr.getTextLocation(offset);
                            setLocationBelow(textLoc);                          
                        } else {
                            client.dispatchEvent(ime);
                            return;
                        }
View Full Code Here

            return;
        }
        long time = System.currentTimeMillis();
        dispatchingCommittedText = true;
        try {
            InputMethodRequests req = client.getInputMethodRequests();
            if (req != null) {
                // active client -> send text as InputMethodEvent
                int beginIndex = text.getBeginIndex();
                AttributedCharacterIterator toBeCommitted =
                    (new AttributedString(text, beginIndex, beginIndex + committedCharacterCount)).getIterator();
View Full Code Here

     * Positions the composition window near (usually below) the
     * insertion point in the client component if the client
     * component is an active client (below-the-spot input).
     */
    void updateWindowLocation() {
        InputMethodRequests req = handler.getClientInputMethodRequests();
        if (req == null) {
            // not an active client
            return;
        }

        Point windowLocation = new Point();

        Rectangle caretRect = req.getTextLocation(null);
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension windowSize = compositionWindow.getSize();
        final int SPACING = 2;

        if (caretRect.x + windowSize.width > screenSize.width) {
View Full Code Here

TOP

Related Classes of java.awt.im.InputMethodRequests

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.