Package pivot.wtk

Examples of pivot.wtk.TextInput$TextInputListenerList


    private class ScrollSelectionCallback implements Runnable {
        private int x = 0;

        public void run() {
            TextInput textInput = (TextInput)getComponent();
            TextNode textNode = textInput.getTextNode();

            int selectionStart = textInput.getSelectionStart();
            int selectionLength = textInput.getSelectionLength();

            if (x < 0) {
                // Add the previous character to the selection
                if (selectionStart > 0) {
                    selectionStart--;
                    selectionLength++;
                }
            } else {
                // Add the next character to the selection
                if (selectionStart + selectionLength < textNode.getCharacterCount()) {
                    selectionLength++;
                }
            }

            textInput.setSelection(selectionStart, selectionLength);
        }
View Full Code Here

TOP

Related Classes of pivot.wtk.TextInput$TextInputListenerList

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.