Uses 6131K of libraries. Click here for Pure Java version (5708L/38K/137K).
1 | !7 |
2 | |
3 | lib 1013041 // RSyntaxTextArea |
4 | |
5 | import org.fife.ui.rtextarea.*; |
6 | import org.fife.ui.rsyntaxtextarea.*; |
7 | |
8 | static Map<Int> keyStrokeMap = litmap( |
9 | KeyEvent.VK_UP, KeyEvent.VK_KP_UP, |
10 | KeyEvent.VK_DOWN, KeyEvent.VK_KP_DOWN, |
11 | KeyEvent.VK_LEFT, KeyEvent.VK_KP_LEFT, |
12 | KeyEvent.VK_RIGHT, KeyEvent.VK_KP_RIGHT |
13 | ); |
14 | |
15 | p-substance { |
16 | new RSyntaxTextAreaDefaultInputMap inputMap; |
17 | for (KeyStroke key : inputMap.keys()) { |
18 | Int code = keyStrokeMap.get(key.getKeyCode()); |
19 | if (code != null) |
20 | inputMap.put(KeyStroke.getKeyStroke(code, key.getModifiers()), |
21 | inputMap.get(key)); |
22 | } |
23 | //inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_KP_DOWN, 0), |
24 | // inputMap.get(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0)); |
25 | UIManager.put("RSyntaxTextAreaUI.inputMap", inputMap); |
26 | |
27 | RSyntaxTextArea textArea = new RSyntaxTextArea(20, 60); |
28 | textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA); |
29 | textArea.setCodeFoldingEnabled(true); |
30 | textArea.setTabSize(2); |
31 | textArea.setTabsEmulated(true); // Spaces are MUCH better |
32 | RTextScrollPane sp = new RTextScrollPane(textArea); |
33 | showFrame(sp); |
34 | } |
Began life as a copy of #1013043
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1013052 |
Snippet name: | Test RSyntaxTextArea with Substance (fixed num pad arrows) |
Eternal ID of this version: | #1013052/5 |
Text MD5: | 446a3bfb2cd19a72b16099f77c50e8d1 |
Transpilation MD5: | 91fb20bf08fc8814077658ade252bb84 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-22 16:46:37 |
Source code size: | 1134 bytes / 34 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 384 / 499 |
Version history: | 4 change(s) |
Referenced in: | [show references] |