Package com.alphacsp.common.swing

Examples of com.alphacsp.common.swing.JTextComponentPrintStream


            return;
        }

        long currentTime = System.currentTimeMillis();
        if ((currentTime - this.lastTabStroke) <= DOUBLE_TAB_STROKE_MS) {
            JTextComponentPrintStream printStream = console.getPrintStream();

            printStream.println();
            for (String candidate : candidates) {
                int lastSlash;
                if (candidate.endsWith("/"))
                    lastSlash = candidate.lastIndexOf('/', candidate.length() - 2);
                else
                    lastSlash = candidate.lastIndexOf('/');
                if (lastSlash >= 0) {
                    if (candidate.length() > lastSlash + 1)
                        candidate = candidate.substring(lastSlash + 1);
                }
                printStream.print(candidate);
                printStream.print("\t");
            }
            printStream.println();
            console.prompt();
            console.setInput(input);
            console.setCaretPositionAtInput(caretPositionAtInput);
            this.lastTabStroke = 0L;
        } else {
View Full Code Here


        this.setEditable(true);
        addKeyListener(new MyKeyListener());
        setFocusTraversalKeysEnabled(false);
        setFont(new Font("Monospaced", Font.PLAIN, 12));
        setLineWrap(true);
        this.printStream = new JTextComponentPrintStream(this, true);
        this.completionHandler = new DefaultCompletionHandler();
        this.inputStream = new JTextComponentInputStream2(this);

        addCaretListener(new CaretListener() {
            public void caretUpdate(CaretEvent e) {
View Full Code Here

TOP

Related Classes of com.alphacsp.common.swing.JTextComponentPrintStream

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.