Examples of IArticleDisplayConfig


Examples of com.salas.bb.views.feeds.html.IArticleDisplayConfig

     * @param aTitle    article title.
     * @param aText     article text.
     */
    private void initGUI(URL aImageURL, String aTitle, String aText)
    {
        IArticleDisplayConfig articleConfig = config.getArticleViewConfig();

        lbTitle = new JLabel(aTitle);
        lbTitle.setToolTipText(aTitle);

        tfText = new JEditorPane();
        tfText.setEditorKit(new CustomHTMLEditorKit());
        tfText.setText(StringUtils.excerpt(aText, EXCERPT_SENTENCES, EXCERPT_MIN_CHARS, EXCERPT_MAX_CHARS));
        tfText.setEditable(false);
        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");
        setLayout(layout);
View Full Code Here

Examples of com.salas.bb.views.feeds.html.IArticleDisplayConfig

    /**
     * Updates foreground colors.
     */
    private void updateForegrounds()
    {
        IArticleDisplayConfig cnf = config.getArticleViewConfig();
        lbTitle.setForeground(cnf.getTitleFGColor(selected));
    }
View Full Code Here

Examples of com.salas.bb.views.feeds.html.IArticleDisplayConfig

        Color color = config.getItemBGColor(selected);
        setBackground(color);
        lbImage.setBackground(color);

        // Font colors
        IArticleDisplayConfig cnf = config.getArticleViewConfig();
        lbTitle.setBackground(cnf.getTitleBGColor(selected));
        tfText.setBackground(cnf.getTextBGColor(selected));
    }
View Full Code Here

Examples of com.salas.bb.views.feeds.html.IArticleDisplayConfig

    /**
     * Updates fonts.
     */
    private void updateFonts()
    {
        IArticleDisplayConfig cnf = config.getArticleViewConfig();

        // Title font
        Font font = cnf.getTitleFont(article.isRead());
        lbTitle.setFont(font);

        // Text area
        font = cnf.getTextFont();
        HTMLDocument doc = (HTMLDocument)tfText.getDocument();
        UifUtilities.setFontAttributes(doc, TEXT_STYLE_NAME, font);
        UifUtilities.installTextStyle(tfText, TEXT_STYLE_NAME);

        doLayout();
View Full Code Here

Examples of com.salas.bb.views.feeds.html.IArticleDisplayConfig

     *
     * @return display.
     */
    protected IArticleDisplay createNewArticleDisplay(IArticle aArticle)
    {
        IArticleDisplayConfig articleConfig = htmlConfig.getArticleViewConfig();
        return new TwitterArticleDisplay(aArticle, articleConfig);
    }
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.