Package javax.swing.text

Examples of javax.swing.text.JTextComponent.modelToView()


                                Rectangle rc;
                                JTextComponent tc =
                                    (JTextComponent)view.getContainer();
                                if (tc != null) {
                                    try {
                                        rc = tc.modelToView(view
                                                            .getStartOffset());
                                    } catch (BadLocationException e) {
                                        return;
                                    }
                                    tc.repaint(rc.x, rc.y,
View Full Code Here


                                Rectangle rc;
                                JTextComponent tc =
                                    (JTextComponent)view.getContainer();
                                if (tc != null) {
                                    try {
                                        rc = tc.modelToView(view
                                                            .getStartOffset());
                                    } catch (BadLocationException e) {
                                        return;
                                    }
                                    tc.repaint(rc.x, rc.y,
View Full Code Here

                                Rectangle rc;
                                JTextComponent tc =
                                    (JTextComponent)view.getContainer();
                                if (tc != null) {
                                    try {
                                        rc = tc.modelToView(view
                                                            .getStartOffset());
                                    } catch (BadLocationException e) {
                                        return;
                                    }
                                    tc.repaint(rc.x, rc.y,
View Full Code Here

                                Rectangle rc;
                                JTextComponent tc =
                                    (JTextComponent)view.getContainer();
                                if (tc != null) {
                                    try {
                                        rc = tc.modelToView(view
                                                            .getStartOffset());
                                    } catch (BadLocationException e) {
                                        return;
                                    }
                                    tc.repaint(rc.x, rc.y,
View Full Code Here

        // i18n
        JTextComponent editor = EditorRegistry.lastFocusedComponent();
        // show popup
        if (editor != null && !goToItems.isEmpty()) {
            try {
                Rectangle rectangle = editor.modelToView(offset);
                final Point point = new Point(rectangle.x, rectangle.y + rectangle.height);
                SwingUtilities.convertPointToScreen(point, editor);
                SwingUtilities.invokeLater(new Runnable() {
                    @Override
                    public void run() {
View Full Code Here

        JTextComponent editor = EditorRegistry.lastFocusedComponent();
        if (editor == null) {
            return false;
        }
        try {
            Rectangle rectangle = editor.modelToView(editor.getCaretPosition());
            final Point point = new Point(rectangle.x, rectangle.y + rectangle.height);
            SwingUtilities.convertPointToScreen(point, editor);
            SwingUtilities.invokeLater(new Runnable() {
                @Override
                public void run() {
View Full Code Here

        JTextComponent editor = EditorRegistry.lastFocusedComponent();
        if (editor == null) {
            return false;
        }
        try {
            Rectangle rectangle = editor.modelToView(editor.getCaretPosition());
            final Point point = new Point(rectangle.x, rectangle.y + rectangle.height);
            SwingUtilities.convertPointToScreen(point, editor);
            SwingUtilities.invokeLater(new Runnable() {
                @Override
                public void run() {
View Full Code Here

            return;
        }

        // show popup
        try {
            Rectangle rectangle = editor.modelToView(editor.getCaretPosition());
            final Point point = new Point(rectangle.x, rectangle.y + rectangle.height);
            SwingUtilities.convertPointToScreen(point, editor);
            SwingUtilities.invokeLater(new Runnable() {
                @Override
                public void run() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.