Uses 1485K of libraries. Click here for Pure Java version (15300L/93K).
1 | sclass JSyntaxTextFileEditor > JTextFileEditor { |
2 | *(File file) { super(file); } |
3 | |
4 | RSyntaxTextAreaWithSearch textAreaWithSearch; |
5 | |
6 | @Override |
7 | public RSyntaxTextArea textArea() { ret (RSyntaxTextArea) textArea; } |
8 | |
9 | @Override |
10 | JTextArea makeTextArea() { |
11 | textAreaWithSearch = makeSyntaxTextAreaWithSearch(); |
12 | textAreaWithSearch.menuLessOperation(); |
13 | var ta = textAreaWithSearch.textArea(); |
14 | adaptSyntaxTextArea(ta); |
15 | ret ta; |
16 | } |
17 | |
18 | @Override |
19 | JComponent textAreaLayoutComponent() { |
20 | ret textAreaWithSearch.visualize(); |
21 | } |
22 | |
23 | swappable RSyntaxTextAreaWithSearch makeSyntaxTextAreaWithSearch() { |
24 | ret rSyntaxTextAreaWithSearch(); |
25 | } |
26 | |
27 | swappable void adaptSyntaxTextArea(RSyntaxTextArea textArea) {} |
28 | |
29 | public selfType autoSave(bool b) { super.autoSave(b); this; } |
30 | public selfType uneditable(bool b) { super.uneditable(b); this; } |
31 | } |
Began life as a copy of #1034689
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034701 |
Snippet name: | JSyntaxTextFileEditor - JTextFileEditor with RSyntaxTextArea (and search) |
Eternal ID of this version: | #1034701/12 |
Text MD5: | 8a6badb42ccd91cd3cad3c44b89ef437 |
Transpilation MD5: | 89f0cfdee87fd170dab10dcc071b4784 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-07 15:36:19 |
Source code size: | 901 bytes / 31 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 169 / 291 |
Version history: | 11 change(s) |
Referenced in: | [show references] |