39 |
|
|
40 |
import java.awt.Dimension; |
import java.awt.Dimension; |
41 |
import java.awt.event.KeyEvent; |
import java.awt.event.KeyEvent; |
|
import java.io.IOException; |
|
42 |
import java.io.InputStream; |
import java.io.InputStream; |
43 |
|
import java.io.IOException; |
44 |
import java.net.URL; |
import java.net.URL; |
45 |
|
|
46 |
import javax.accessibility.AccessibleContext; |
import javax.accessibility.AccessibleContext; |
47 |
import javax.swing.event.HyperlinkEvent; |
import javax.swing.event.HyperlinkEvent; |
48 |
import javax.swing.event.HyperlinkListener; |
import javax.swing.event.HyperlinkListener; |
49 |
|
import javax.swing.text.DefaultEditorKit; |
50 |
import javax.swing.text.EditorKit; |
import javax.swing.text.EditorKit; |
51 |
import javax.swing.text.JTextComponent; |
import javax.swing.text.JTextComponent; |
|
import javax.swing.text.PlainEditorKit; |
|
52 |
|
|
53 |
|
|
54 |
public class JEditorPane extends JTextComponent |
public class JEditorPane extends JTextComponent |
83 |
|
|
84 |
protected EditorKit createDefaultEditorKit() |
protected EditorKit createDefaultEditorKit() |
85 |
{ |
{ |
86 |
return new PlainEditorKit(); |
return new DefaultEditorKit(); |
87 |
} |
} |
88 |
|
|
89 |
protected static EditorKit createEditorKitForContentType(String type) |
public static EditorKit createEditorKitForContentType(String type) |
90 |
{ |
{ |
91 |
return new PlainEditorKit(); |
return new DefaultEditorKit(); |
92 |
} |
} |
93 |
|
|
94 |
/** |
/** |
198 |
} |
} |
199 |
|
|
200 |
/** |
/** |
201 |
* Make sure that TAB and Shift-TAB events get consumed, so that awt doesn't attempt focus traversal. |
* Make sure that TAB and Shift-TAB events get consumed, |
202 |
|
* so that awt doesn't attempt focus traversal. |
203 |
*/ |
*/ |
204 |
protected void processKeyEvent(KeyEvent e) |
protected void processKeyEvent(KeyEvent e) |
205 |
{ |
{ |
230 |
} |
} |
231 |
|
|
232 |
/** |
/** |
233 |
* Replaces the currently selected content with new content represented by the given string. |
* Replaces the currently selected content with new content represented |
234 |
|
* by the given string. |
235 |
*/ |
*/ |
236 |
public void replaceSelection(String content) |
public void replaceSelection(String content) |
237 |
{ |
{ |
238 |
} |
} |
239 |
|
|
240 |
/** |
/** |
241 |
* Scrolls the view to the given reference location (that is, the value returned by the UL.getRef method for the URL being displayed). |
* Scrolls the view to the given reference location (that is, the value |
242 |
|
* returned by the UL.getRef method for the URL being displayed). |
243 |
*/ |
*/ |
244 |
protected void scrollToReference(String reference) |
public void scrollToReference(String reference) |
245 |
{ |
{ |
246 |
} |
} |
247 |
|
|