Example usage for javax.swing JTextPane setEditorKitForContentType

List of usage examples for javax.swing JTextPane setEditorKitForContentType

Introduction

In this page you can find the example usage for javax.swing JTextPane setEditorKitForContentType.

Prototype

public void setEditorKitForContentType(String type, EditorKit k) 

Source Link

Document

Directly sets the editor kit to use for the given type.

Usage

From source file:com.mindcognition.mindraider.ui.swing.concept.annotation.renderer.AbstractTextAnnotationRenderer.java

private void configureViewer(JTextPane viewerPane) {
    viewerPane.setContentType("text/html");
    kit = new HTMLEditorKit();
    viewerPane.setEditorKitForContentType("text/html", kit);
    viewerPane.setEditable(false);//from  w  w w  . jav a 2  s.c  om
    disableViewer();

    setViewerText("");

    viewerPane.addHyperlinkListener(new TextAnnotationPreviewHyperlinkListener(getConceptPanel(), viewerPane));
}