518 |
|
|
519 |
public JEditorPane() |
public JEditorPane() |
520 |
{ |
{ |
521 |
init(createDefaultEditorKit()); |
init(); |
522 |
|
setEditorKit(createDefaultEditorKit()); |
523 |
} |
} |
524 |
|
|
525 |
public JEditorPane(String url) throws IOException |
public JEditorPane(String url) throws IOException |
529 |
|
|
530 |
public JEditorPane(String type, String text) |
public JEditorPane(String type, String text) |
531 |
{ |
{ |
532 |
init(createEditorKitForContentType(type)); |
init(); |
533 |
|
setEditorKit(createEditorKitForContentType(type)); |
534 |
setText(text); |
setText(text); |
535 |
} |
} |
536 |
|
|
537 |
public JEditorPane(URL url) throws IOException |
public JEditorPane(URL url) throws IOException |
538 |
{ |
{ |
539 |
this(); |
init (); |
540 |
|
setEditorKit (createEditorKitForContentType("text/html"));; |
541 |
setPage(url); |
setPage(url); |
542 |
} |
} |
543 |
|
|
544 |
/** |
/** |
545 |
* Called by the constructors to set the EditorKit and set up the |
* Called by the constructors to set up the default bindings for content |
546 |
* default bindings for content types and EditorKits. |
* types and EditorKits. |
|
* |
|
|
* @param kit the initial EditorKit |
|
547 |
*/ |
*/ |
548 |
void init(EditorKit kit) |
void init() |
549 |
{ |
{ |
|
setEditorKit(kit); |
|
550 |
editorMap = new HashMap(); |
editorMap = new HashMap(); |
551 |
registerMap = new HashMap(); |
registerMap = new HashMap(); |
552 |
registerEditorKitForContentType("application/rtf", |
registerEditorKitForContentType("application/rtf", |