Package javax.swing.text.html

Examples of javax.swing.text.html.StyleSheet.addRule()


        return smileMap;
    }

    public static void setCSSRule(HTMLEditorKit htmlKit) {
        StyleSheet css = new StyleSheet();
        css.addRule("body {"
                + "text-align:center;"
                + "}");
        css.addRule("p {"
                + "font-family: Sans, Georgia, serif; "
                + "font-size: 11pt;"
View Full Code Here


    public static void setCSSRule(HTMLEditorKit htmlKit) {
        StyleSheet css = new StyleSheet();
        css.addRule("body {"
                + "text-align:center;"
                + "}");
        css.addRule("p {"
                + "font-family: Sans, Georgia, serif; "
                + "font-size: 11pt;"
                + "text-align:justify;"
                + "}");
        css.addRule("span { "
View Full Code Here

        css.addRule("p {"
                + "font-family: Sans, Georgia, serif; "
                + "font-size: 11pt;"
                + "text-align:justify;"
                + "}");
        css.addRule("span { "
                + "font-size: 8px;"
                + "font-family: Sans; "
                + "color: #808080;"
                + "}");
        css.addRule("#nick {"
View Full Code Here

        css.addRule("span { "
                + "font-size: 8px;"
                + "font-family: Sans; "
                + "color: #808080;"
                + "}");
        css.addRule("#nick {"
                + "font-family: Sans, Georgia, serif; "
                + "font-size: 11pt;"
                + "text-align:justify;"
                + "}");
        css.addRule("#connect { "
View Full Code Here

        css.addRule("#nick {"
                + "font-family: Sans, Georgia, serif; "
                + "font-size: 11pt;"
                + "text-align:justify;"
                + "}");
        css.addRule("#connect { "
                + "display: block;"
                + "-moz-border-radius: 5px;"
                + "border-radius: 5px;"
                + "border-width: 1px;"
                + "border-style: solid;"
View Full Code Here

                + "margin-right: 3;"
                + "margin-left: 3;"
                + "margin-top: 3;"
                + "text-align:center;"
                + "}");
        css.addRule("#disconnect { "
                + "display: block;"
                + "border-width: 1px;"
                + "border-style: solid;"
                + "border-color: #90b1c7;"
                + "padding: 5px;"
View Full Code Here

                + "margin-right: 3;"
                + "margin-left: 3;"
                + "margin-top: 3;"
                + "text-align:center;"
                + "}");
        css.addRule("#warning { "
                + "display: block;"
                + "border-width: 1px;"
                + "border-style: solid;"
                + "border-color: #c2beb1;"
                + "padding: 5px;"
View Full Code Here

                + "margin-right: 3;"
                + "margin-left: 3;"
                + "margin-top: 3;"
                + "text-align:center;"
                + "}");
        css.addRule("#success { "
                + "display: block;"
                + "border-width: 1px;"
                + "border-style: solid;"
                + "border-color: #ffffff;"
                + "padding: 5px;"
View Full Code Here

    Font font = getLabelFont();
    @NonNls String family = font != null ? font.getFamily() : "Tahoma";
    int size = font != null ? font.getSize() : 11;

    final StyleSheet styleSheet = kit.getStyleSheet();
    styleSheet.addRule(String.format("body, div, p { font-family: %s; font-size: %s; } p { margin-top: 0; }", family, size));
    kit.setStyleSheet(styleSheet);

    return kit;
  }
View Full Code Here

    public ApitTreeUI() {
        initComponents();
        HTMLEditorKit hed = new HTMLEditorKit();
        StyleSheet sheet = hed.getStyleSheet();

        sheet.addRule(".php-boundry {font-weight:bold;}");
        sheet.addRule(".php-function-or-constant {color:#0000AA; }");
        sheet.addRule(".php-string {color:#AA0000; }");
        sheet.addRule(".php-constant {color:#AA3333; }");
        sheet.addRule(".php-variable {color:#333300; }");
        sheet.addRule(".php-keyword {color:#006600; }");
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.