Package javax.swing.plaf.basic

Examples of javax.swing.plaf.basic.BasicTextUI


        }
        return offset;
    }

    void getPositionAboveBelowTest(final JTextComponent c) {
        BasicTextUI ui = (BasicTextUI) c.getUI();
        Document doc = c.getDocument();
        int length = doc.getLength();
        for (int i = 0; i < length; i++) {
            int utilAbove = 0;
            int utilAbove1 = 0;
            int utilBelow = 0;
            int utilBelow1 = 0;
            int utilAboveT = 0;
            int utilAbove1T = 0;
            int utilBelowT = 0;
            int utilBelow1T = 0;
            int appendix = 23;
            Rectangle rect = null;
            try {
                rect = ui.modelToView(c, i);
            } catch (BadLocationException e) {
            }
            assertNotNull(rect);
            try {
                utilBelow = Utilities.getPositionBelow(c, i, rect.x);
View Full Code Here


    public int getNextVisualPositionFrom(final JTextComponent c, final int pos,
            final Position.Bias bias, final int direction, final Position.Bias[] biasRet)
            throws BadLocationException {
        if (c == null)
            return 0;
        BasicTextUI ui = (BasicTextUI)c.getUI();
        View rootView = ui.getRootView(c);
        Rectangle rect = c.getVisibleRect();
        if (rect == null)
            return 0;
        Insets insets = c.getInsets();
        rect.x += insets.left;
View Full Code Here

    public int getNextVisualPositionFrom(final JTextComponent c, final int pos,
            final Position.Bias bias, final int direction, final Position.Bias[] biasRet)
            throws BadLocationException {
        if (c == null)
            return 0;
        BasicTextUI ui = (BasicTextUI)c.getUI();
        View rootView = ui.getRootView(c);
        Rectangle rect = c.getVisibleRect();
        if (rect == null)
            return 0;
        Insets insets = c.getInsets();
        rect.x += insets.left;
View Full Code Here

        }
        return offset;
    }

    void getPositionAboveBelowTest(final JTextComponent c) {
        BasicTextUI ui = (BasicTextUI) c.getUI();
        Document doc = c.getDocument();
        int length = doc.getLength();
        for (int i = 0; i < length; i++) {
            int utilAbove = 0;
            int utilAbove1 = 0;
            int utilBelow = 0;
            int utilBelow1 = 0;
            int utilAboveT = 0;
            int utilAbove1T = 0;
            int utilBelowT = 0;
            int utilBelow1T = 0;
            int appendix = 23;
            Rectangle rect = null;
            try {
                rect = ui.modelToView(c, i);
            } catch (BadLocationException e) {
            }
            assertNotNull(rect);
            try {
                utilBelow = Utilities.getPositionBelow(c, i, rect.x);
View Full Code Here

        int right = paddingRight == null ? 3 : Math.max(3, paddingRight.intValue());

        //if a border is set or a background color is set, then use a special JButton with the BasicButtonUI.
        if (disableOSBorder) {
            //when background color is set, need to use the BasicButtonUI, certainly when using XP l&f
            BasicTextUI ui = new BasicTextAreaUI();
            textArea.setUI(ui);
            scrollpane.setBorder(null);
        }

        textArea.setMargin(new Insets(top, left, bottom, right));
View Full Code Here

        int right = paddingRight == null ? 3 : Math.max(3, paddingRight.intValue());

        //if a border is set or a background color is set, then use a special JButton with the BasicButtonUI.
        if (disableOSBorder) {
            //when background color is set, need to use the BasicButtonUI, certainly when using XP l&f
            BasicTextUI ui = new BasicTextFieldUI();
            field.setUI(ui);
            Border fieldBorder = BorderFactory.createEmptyBorder(top, left, bottom, right);
            field.setBorder(fieldBorder);
        }
        else {
View Full Code Here

TOP

Related Classes of javax.swing.plaf.basic.BasicTextUI

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.