Package javax.swing.text.html

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


            // If _styleSheetURL is non-null, we set the style sheet
            // once and only once.  If try to do this in a static initializer,
            // then the styles are wrong.
            HTMLDocument doc = (HTMLDocument) pane.getDocument();
            StyleSheet styleSheet = doc.getStyleSheet();
            styleSheet.importStyleSheet(_styleSheetURL);
            new HTMLEditorKit().setStyleSheet(styleSheet);
            _styleSheetURL = null;
        }

        // http://mindprod.com/jgloss/antialiasing.html says that in
View Full Code Here


        });

        // Setup the editor pane for rendering HTML.
        final HTMLEditorKit kit = new MarkdownEditorKit(document);
        final StyleSheet style = new StyleSheet();
        style.importStyleSheet(MarkdownPreviewEditor.class.getResource(PREVIEW_STYLESHEET_PATH));
        kit.setStyleSheet(style);
        jEditorPane.setEditorKit(kit);
        jEditorPane.setEditable(false);

        // Set the editor pane position to top left, and do not let it reset it
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.