1 | public void addExtension(TextAreaExtension extension)↵ | | 1 | public void addExtension(TextAreaExtension extension)↵
|
2 | {↵ | | 2 | {↵
|
3 | extensionMgr.addExtension(DEFAULT_LAYER,extension);↵ | | 3 | extensionMgr.addExtension(DEFAULT_LAYER,extension);↵
|
4 | repaint();↵ | | 4 | repaint();↵
|
5 | } //}}}↵ | | 5 | } //}}}↵
|
|
6 | //{{{ addExtension() method↵ | | 6 | //{{{ addExtension() method↵
|
7 | /**↵ | | 7 | /**↵
|
8 | * Adds a text area extension, which can perform custom painting and↵ | | 8 | * Adds a text area extension, which can perform custom painting and↵
|
9 | * tool tip handling.↵ | | 9 | * tool tip handling.↵
|
10 | * @param layer The layer to add the extension to. Note that more than↵ | | 10 | * @param layer The layer to add the extension to. Note that more than↵
|
11 | * extension can share the same layer.↵ | | 11 | * extension can share the same layer.↵
|
12 | * @param extension The extension↵ | | 12 | * @param extension The extension↵
|
13 | * @since jEdit 4.0pre4↵ | | 13 | * @since jEdit 4.0pre4↵
|
14 | */↵ | | 14 | */↵
|
15 | public void addExtension(int layer, TextAreaExtension extension)↵ | | 15 | public void addExtension(int layer, TextAreaExtension extension)↵
|
16 | {↵ | | 16 | {↵
|
17 | extensionMgr.addExtension(layer,extension);↵ | | 17 | extensionMgr.addExtension(layer,extension);↵
|
18 | repaint();↵ | | 18 | repaint();↵
|
19 | } //}}}↵ | | 19 | } //}}}↵
|
|
20 | //{{{ removeExtension() method↵ | | 20 | //{{{ removeExtension() method↵
|
21 | /**↵ | | 21 | /**↵
|
22 | * Removes a text area extension. It will no longer be asked to↵ | | 22 | * Removes a text area extension. It will no longer be asked to↵
|
23 | * perform custom painting and tool tip handling.↵ | | 23 | * perform custom painting and tool tip handling.↵
|
24 | * @param extension The extension↵ | | 24 | * @param extension The extension↵
|
25 | * @since jEdit 4.0pre4↵ | | 25 | * @since jEdit 4.0pre4↵
|
26 | */↵ | | 26 | */↵
|
27 | public void removeExtension(TextAreaExtension extension)↵ | | 27 | public void removeExtension(TextAreaExtension extension)↵
|
28 | {↵ | | 28 | {↵
|
29 | extensionMgr.removeExtension(extension);↵ | | 29 | extensionMgr.removeExtension(extension);↵
|
30 | repaint();↵ | | 30 | repaint();↵
|
31 | } //}}}↵ | | 31 | } //}}}↵
|
|
32 | //{{{ getExtensions() method↵ | | 32 | //{{{ getExtensions() method↵
|
33 | /**↵ | | 33 | /**↵
|
34 | * Returns an array of registered text area extensions. Useful for↵ | | 34 | * Returns an array of registered text area extensions. Useful for↵
|
35 | * debugging purposes.↵ | | 35 | * debugging purposes.↵
|
36 | * @since jEdit 4.1pre5↵ | | 36 | * @since jEdit 4.1pre5↵
|
37 | */↵ | | 37 | */↵
|
38 | public TextAreaExtension[] getExtensions()↵ | | 38 | public TextAreaExtension[] getExtensions()↵
|
39 | {↵ | | 39 | {↵
|
40 | return extensionMgr.getExtensions();↵ | | 40 | return extensionMgr.getExtensions();↵
|
41 | } //}}}↵ | | 41 | } //}}}↵
|
|
42 | //{{{ getToolTipText() method↵ | | 42 | //{{{ getToolTipText() method↵
|
43 | /**↵ | | 43 | /**↵
|
44 | * Returns the tool tip to display at the specified location.↵ | | 44 | * Returns the tool tip to display at the specified location.↵
|
45 | * @param evt The mouse event↵ | | 45 | * @param evt The mouse event↵
|
46 | */↵ | | 46 | */↵
|
47 | public String getToolTipText(MouseEvent evt)↵ | | 47 | public String getToolTipText(MouseEvent evt)↵
|
48 | {↵ | | 48 | {↵
|
49 | if(!textArea.getBuffer().isLoaded())↵ | | 49 | if(!textArea.getBuffer().isLoaded())↵
|
50 | return null;↵ | | 50 | return null;↵
|
|
51 | return extensionMgr.getToolTipText(evt.getX(),evt.getY()); | | 51 | return extensionMgr.getToolTipText(evt.getX(),evt.getY());
|