Package javax.swing.text.html

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


    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


    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());

    jsp.getVerticalScrollBar().setValue(0);
View Full Code Here

        };
       
        // set font size manually in an effort to get fonts in this panel to look
        // similar to what is in the 'String View' content viewer.
        StyleSheet ss = editorKit.getStyleSheet();
        ss.addRule("body {font-size: 8.5px;}"); //NON-NLS
       
        extractedTextPane.setEditorKit(editorKit);

        sourceComboBox.addItemListener(new ItemListener() {
            @Override
View Full Code Here

        HTMLEditorKit kit = new HTMLEditorKit();
        messageDetailsPane.setEditorKit(kit);
        StyleSheet styleSheet = kit.getStyleSheet();
        /* I tried to define the font-size only on body to have it inherit,
         * it didn't work in all cases. */
        styleSheet.addRule("body {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("p {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("li {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("table {table-layout:fixed;}"); //NON-NLS
        styleSheet.addRule("td {white-space:pre-wrap;overflow:hidden;}"); //NON-NLS
        styleSheet.addRule("th {font-weight:bold;}"); //NON-NLS
View Full Code Here

        messageDetailsPane.setEditorKit(kit);
        StyleSheet styleSheet = kit.getStyleSheet();
        /* I tried to define the font-size only on body to have it inherit,
         * it didn't work in all cases. */
        styleSheet.addRule("body {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("p {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("li {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("table {table-layout:fixed;}"); //NON-NLS
        styleSheet.addRule("td {white-space:pre-wrap;overflow:hidden;}"); //NON-NLS
        styleSheet.addRule("th {font-weight:bold;}"); //NON-NLS
       
View Full Code Here

        StyleSheet styleSheet = kit.getStyleSheet();
        /* I tried to define the font-size only on body to have it inherit,
         * it didn't work in all cases. */
        styleSheet.addRule("body {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("p {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("li {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("table {table-layout:fixed;}"); //NON-NLS
        styleSheet.addRule("td {white-space:pre-wrap;overflow:hidden;}"); //NON-NLS
        styleSheet.addRule("th {font-weight:bold;}"); //NON-NLS
       
        BlackboardResultViewer v = Lookup.getDefault().lookup(BlackboardResultViewer.class);
View Full Code Here

        /* I tried to define the font-size only on body to have it inherit,
         * it didn't work in all cases. */
        styleSheet.addRule("body {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("p {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("li {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("table {table-layout:fixed;}"); //NON-NLS
        styleSheet.addRule("td {white-space:pre-wrap;overflow:hidden;}"); //NON-NLS
        styleSheet.addRule("th {font-weight:bold;}"); //NON-NLS
       
        BlackboardResultViewer v = Lookup.getDefault().lookup(BlackboardResultViewer.class);
        v.addOnFinishedListener(new PropertyChangeListener() {
View Full Code Here

         * it didn't work in all cases. */
        styleSheet.addRule("body {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("p {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("li {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("table {table-layout:fixed;}"); //NON-NLS
        styleSheet.addRule("td {white-space:pre-wrap;overflow:hidden;}"); //NON-NLS
        styleSheet.addRule("th {font-weight:bold;}"); //NON-NLS
       
        BlackboardResultViewer v = Lookup.getDefault().lookup(BlackboardResultViewer.class);
        v.addOnFinishedListener(new PropertyChangeListener() {

View Full Code Here

        styleSheet.addRule("body {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("p {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("li {font-family:Arial;font-size:10pt;}"); //NON-NLS
        styleSheet.addRule("table {table-layout:fixed;}"); //NON-NLS
        styleSheet.addRule("td {white-space:pre-wrap;overflow:hidden;}"); //NON-NLS
        styleSheet.addRule("th {font-weight:bold;}"); //NON-NLS
       
        BlackboardResultViewer v = Lookup.getDefault().lookup(BlackboardResultViewer.class);
        v.addOnFinishedListener(new PropertyChangeListener() {

            @Override
View Full Code Here

         * always work. Defined all of the basics just in case. @@@
         * IngestInboxViewer also defines styles similar to this. Consider a
         * method that sets consistent styles for all viewers and takes font
         * size as an argument.
         */
        styleSheet.addRule("body {font-family:Arial, 'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro','メイリオ',Meiryo,'MS Pゴシック','MS PGothic',sans-serif;font-size:14pt;}"); //NON-NLS
        styleSheet.addRule("p {font-family:Arial, 'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro','メイリオ',Meiryo,'MS Pゴシック','MS PGothic',sans-serif;font-size:14pt;}"); //NON-NLS
        styleSheet.addRule("li {font-family:Arial, 'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro','メイリオ',Meiryo,'MS Pゴシック','MS PGothic',sans-serif;font-size:14pt;}"); //NON-NLS
        styleSheet.addRule("td {font-family:Arial, 'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro','メイリオ',Meiryo,'MS Pゴシック','MS PGothic',sans-serif;font-size:14pt;overflow:hidden;padding-right:5px;padding-left:5px;}"); //NON-NLS
        styleSheet.addRule("th {font-family:Arial, 'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro','メイリオ',Meiryo,'MS Pゴシック','MS PGothic',sans-serif;font-size:14pt;overflow:hidden;padding-right:5px;padding-left:5px;font-weight:bold;}"); //NON-NLS
        styleSheet.addRule("p {font-family:Arial, 'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro','メイリオ',Meiryo,'MS Pゴシック','MS PGothic',sans-serif;font-size:14pt;}"); //NON-NLS
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.