Package playn.core

Examples of playn.core.Font


        // TODO _textComp.setAutoscrolls(true);

        _textCtrl.setEnabled(_enabled);

        // set font (only if changed, otherwise it makes the caret disappear)
        Font nfont = _element.resolveStyle(Style.FONT);
        if (_font == null || !_font.equals(nfont)) {
            // we need to dispose of the previous font, if we set it
            if (_font != null) _textCtrl.getFont().dispose();
            _textCtrl.setFont(convert().font(_font = nfont));
        }
View Full Code Here


            }});
    }

    /** Re-applies the current Field styles to the text component. */
    public void validateStyles () {
        Font font = _element.resolveStyle(Style.FONT);
        _textComp.setFont(new java.awt.Font(font.name(), awtFontStyle(font.style()),
            FloatMath.round(font.size())));
        Color col = new Color(_element.resolveStyle(Style.COLOR));
        _textComp.setForeground(col);
        _textComp.setCaretColor(col);

        if (isField()) {
View Full Code Here

            getTraits().set_KeyboardType(UIKeyboardType.wrap(UIKeyboardType.Default));
            break;
        }

        // Font
        Font font = _element.resolveStyle(Style.FONT);
        setNativeFont(_handler.getUIFont(font));

        // Automatic capitalization
        boolean enable = _element.resolveStyle(Field.AUTOCAPITALIZATION);
        getTraits().set_AutocapitalizationType(UITextAutocapitalizationType.wrap(
View Full Code Here

TOP

Related Classes of playn.core.Font

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.