Package tripleplay.util

Examples of tripleplay.util.TextStyle


    /**
     * Creates a text style instance based on the supplied element's stylings.
     */
    public static TextStyle createTextStyle (Element<?> elem) {
        return new TextStyle(
            Styles.resolveStyle(elem, Style.FONT),
            Styles.resolveStyle(elem, Style.TEXT_EFFECT) != TextEffect.PIXEL_OUTLINE,
            Styles.resolveStyle(elem, Style.COLOR),
            Styles.resolveStyle(elem, Style.TEXT_EFFECT).createEffectRenderer(elem),
            Styles.resolveStyle(elem, Style.UNDERLINE));
View Full Code Here


        @Override public void setElement (Element<?> elem) {
            _elem = elem;
        }

        @Override public void addTextSize (Dimension into, IDimension lsize) {
            TextStyle style = Style.createTextStyle(_elem);
            addTextSize(into, lsize, PlayN.graphics().layoutText(_tmpl, style));
        }
View Full Code Here

            // accommodate our icon
            accommodateIcon(hints, haveText);

            // layout our text, if we have any
            if (haveText) {
                TextStyle style = Style.createTextStyle(TextWidget.this);
                // TODO: should we do something with a y-hint?
                if (hints.width > 0 && wrap) {
                    text = new StyledText.Block(curtext, style, new TextWrap(hints.width),
                                                Style.toAlignment(resolveStyle(Style.HALIGN)));
                } else {
View Full Code Here

TOP

Related Classes of tripleplay.util.TextStyle

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.