Package javax.swing.text.html

Examples of javax.swing.text.html.HTMLDocument.addStyle()


            welcomeTextView.setFocusable(false);
            welcomeTextView.setEditable(false);

            // Set font
            HTMLDocument doc = (HTMLDocument)welcomeTextView.getDocument();
            final Style style = doc.addStyle("normal", null);
            doc.setCharacterAttributes(0, doc.getLength(), style, false);

            welcomeText = welcomeTextView;
        } catch (IOException e)
        {
View Full Code Here


        HTMLDocument doc = (HTMLDocument)taDescription.getDocument();
        Style def = doc.getStyle("default");
        Font font = UIManager.getFont("TextArea.font");
        if (SystemUtils.IS_OS_MAC) font = UifUtilities.applyFontBias(font, -2);
        UifUtilities.setFontAttributes(doc.addStyle(TEXT_STYLE, def), font);

        builder = new BBFormBuilder("0:grow");
        builder.appendUnrelatedComponentsGapRow(2);
        builder.appendRow("p");
View Full Code Here

        tfText.setToolTipText("<html>" + aText);

        HTMLDocument doc = (HTMLDocument)tfText.getDocument();
        doc.setBase(article.getLink());
        Style def = doc.getStyle("default");
        doc.addStyle(TEXT_STYLE_NAME, def);
        UifUtilities.setFontAttributes(doc, TEXT_STYLE_NAME, articleConfig.getTextFont());

        setViewMode(config.getViewMode());

        layout = new FormLayout("5px, center:pref, 5px", "5px, pref, 5px, pref, 5px, pref, 5px");
View Full Code Here

        // Create new style for article and init it with default style settings
        HTMLDocument doc = (HTMLDocument)tpText.getDocument();
        doc.setBase(article.getLink());
        Style def = doc.getStyle("default");
        doc.addStyle(TEXT_STYLE_NAME, def);
        UifUtilities.setFontAttributes(doc, TEXT_STYLE_NAME, config.getTextFont());

        // Set base URL to resolve relative links
        final IFeed feed = article.getFeed();
        if (feed instanceof NetworkFeed)
View Full Code Here

    {
        // Create new style for article and init it with default style settings
        HTMLDocument doc = (HTMLDocument)tfText.getDocument();
        doc.setBase(article.getLink());
        Style def = doc.getStyle("default");
        doc.addStyle(TEXT_STYLE_NAME, def);
        UifUtilities.setFontAttributes(doc, TEXT_STYLE_NAME, config.getTitleFont(article.isRead()));

        doc = (HTMLDocument)tfFullText.getDocument();
        doc.setBase(article.getLink());
        def = doc.getStyle("default");
View Full Code Here

        UifUtilities.setFontAttributes(doc, TEXT_STYLE_NAME, config.getTitleFont(article.isRead()));

        doc = (HTMLDocument)tfFullText.getDocument();
        doc.setBase(article.getLink());
        def = doc.getStyle("default");
        doc.addStyle(TEXT_STYLE_NAME, def);
        UifUtilities.setFontAttributes(doc, TEXT_STYLE_NAME, config.getTextFont());
    }

    private void setText()
    {
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.