public EditorKit getEditorKitForContentType(String type) {
EditorKit editorKit = super.getEditorKitForContentType(type);
JEditorPane outerMostJEditorPane = null;
if ((outerMostJEditorPane = getOutermostJEditorPane()) != null) {
EditorKit inheritedEditorKit = outerMostJEditorPane.getEditorKitForContentType(type);
if (! editorKit.getClass().equals(inheritedEditorKit.getClass())) {
editorKit = (EditorKit) inheritedEditorKit.clone();
setEditorKitForContentType(type, editorKit);
}
}
return editorKit;
}
|