Package javax.swing.text.html

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


        JosmHTMLEditorKit kit = new JosmHTMLEditorKit();
        final Font f = UIManager.getFont("Label.font");
        final StyleSheet ss = new StyleSheet();
        ss.addRule((allBold ? "html" : "strong, b") + " {" + getFontRule(f) + "}");
        ss.addRule("a {text-decoration: underline; color: blue}");
        ss.addRule("h1 {" + getFontRule(GuiHelper.getTitleFont()) + "}");
        ss.addRule("ol {margin-left: 1cm; margin-top: 0.1cm; margin-bottom: 0.2cm; list-style-type: decimal}");
        ss.addRule("ul {margin-left: 1cm; margin-top: 0.1cm; margin-bottom: 0.2cm; list-style-type: disc}");
        kit.setStyleSheet(ss);
        pane.setEditorKit(kit);
    }
View Full Code Here


        final Font f = UIManager.getFont("Label.font");
        final StyleSheet ss = new StyleSheet();
        ss.addRule((allBold ? "html" : "strong, b") + " {" + getFontRule(f) + "}");
        ss.addRule("a {text-decoration: underline; color: blue}");
        ss.addRule("h1 {" + getFontRule(GuiHelper.getTitleFont()) + "}");
        ss.addRule("ol {margin-left: 1cm; margin-top: 0.1cm; margin-bottom: 0.2cm; list-style-type: decimal}");
        ss.addRule("ul {margin-left: 1cm; margin-top: 0.1cm; margin-bottom: 0.2cm; list-style-type: disc}");
        kit.setStyleSheet(ss);
        pane.setEditorKit(kit);
    }
View Full Code Here

        final StyleSheet ss = new StyleSheet();
        ss.addRule((allBold ? "html" : "strong, b") + " {" + getFontRule(f) + "}");
        ss.addRule("a {text-decoration: underline; color: blue}");
        ss.addRule("h1 {" + getFontRule(GuiHelper.getTitleFont()) + "}");
        ss.addRule("ol {margin-left: 1cm; margin-top: 0.1cm; margin-bottom: 0.2cm; list-style-type: decimal}");
        ss.addRule("ul {margin-left: 1cm; margin-top: 0.1cm; margin-bottom: 0.2cm; list-style-type: disc}");
        kit.setStyleSheet(ss);
        pane.setEditorKit(kit);
    }

    /**
 
View Full Code Here

                f.getSize(),
                "bold",
                f.isItalic() ? "italic" : "normal"
        );
        rule = "strong {" + rule + "}";
        ss.addRule(rule);
        ss.addRule("a {text-decoration: underline; color: blue}");
        ss.addRule("ul {margin-left: 1cm; list-style-type: disc}");
        JosmHTMLEditorKit kit = new JosmHTMLEditorKit();
        kit.setStyleSheet(ss);
        jepMessage.setEditorKit(kit);
View Full Code Here

                "bold",
                f.isItalic() ? "italic" : "normal"
        );
        rule = "strong {" + rule + "}";
        ss.addRule(rule);
        ss.addRule("a {text-decoration: underline; color: blue}");
        ss.addRule("ul {margin-left: 1cm; list-style-type: disc}");
        JosmHTMLEditorKit kit = new JosmHTMLEditorKit();
        kit.setStyleSheet(ss);
        jepMessage.setEditorKit(kit);
View Full Code Here

                f.isItalic() ? "italic" : "normal"
        );
        rule = "strong {" + rule + "}";
        ss.addRule(rule);
        ss.addRule("a {text-decoration: underline; color: blue}");
        ss.addRule("ul {margin-left: 1cm; list-style-type: disc}");
        JosmHTMLEditorKit kit = new JosmHTMLEditorKit();
        kit.setStyleSheet(ss);
        jepMessage.setEditorKit(kit);

        add(jepMessage, BorderLayout.CENTER);
View Full Code Here

    JFrame otherFrame = new JBidFrame(frameName);
    JPanel insidePanel = new JPanel(new BorderLayout());
    JScrollPane jsp = new JScrollPane(jep);
    StyleSheet sheet = hek.getStyleSheet();
    sheet.addRule(".smaller { font-size: 85%; }");
    sheet.addRule(".banner { font-size: 110%; }");
    sheet.addRule("body { font-family: Verdana, Geneva, Tahoma, sans-serif; }");
    sheet.addRule("ul li { margin-bottom: 4px; }");
    sheet.addRule(".changelog { color: #333333; margin-left: 20px; padding-left: 3px; background-color: #eeeeee; }");
    sheet.addRule(".changelog h1 { font-size: 110%; }");
View Full Code Here

    JFrame otherFrame = new JBidFrame(frameName);
    JPanel insidePanel = new JPanel(new BorderLayout());
    JScrollPane jsp = new JScrollPane(jep);
    StyleSheet sheet = hek.getStyleSheet();
    sheet.addRule(".smaller { font-size: 85%; }");
    sheet.addRule(".banner { font-size: 110%; }");
    sheet.addRule("body { font-family: Verdana, Geneva, Tahoma, sans-serif; }");
    sheet.addRule("ul li { margin-bottom: 4px; }");
    sheet.addRule(".changelog { color: #333333; margin-left: 20px; padding-left: 3px; background-color: #eeeeee; }");
    sheet.addRule(".changelog h1 { font-size: 110%; }");
View Full Code Here

    JPanel insidePanel = new JPanel(new BorderLayout());
    JScrollPane jsp = new JScrollPane(jep);
    StyleSheet sheet = hek.getStyleSheet();
    sheet.addRule(".smaller { font-size: 85%; }");
    sheet.addRule(".banner { font-size: 110%; }");
    sheet.addRule("body { font-family: Verdana, Geneva, Tahoma, sans-serif; }");
    sheet.addRule("ul li { margin-bottom: 4px; }");
    sheet.addRule(".changelog { color: #333333; margin-left: 20px; padding-left: 3px; background-color: #eeeeee; }");
    sheet.addRule(".changelog h1 { font-size: 110%; }");

    jep.setDocument(hek.createDefaultDocument());
View Full Code Here

    JScrollPane jsp = new JScrollPane(jep);
    StyleSheet sheet = hek.getStyleSheet();
    sheet.addRule(".smaller { font-size: 85%; }");
    sheet.addRule(".banner { font-size: 110%; }");
    sheet.addRule("body { font-family: Verdana, Geneva, Tahoma, sans-serif; }");
    sheet.addRule("ul li { margin-bottom: 4px; }");
    sheet.addRule(".changelog { color: #333333; margin-left: 20px; padding-left: 3px; background-color: #eeeeee; }");
    sheet.addRule(".changelog h1 { font-size: 110%; }");

    jep.setDocument(hek.createDefaultDocument());
    jep.setText(inSB.toString());
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.