There is a repository on github for it: CommandsConsoleGUI.
Can be customized without changing it directly. Just use the test class as quickstart.
Hit F10 (on the test) to toggle console (initially closed).
Features:
Main
= Command (and params) auto complete “startWith”, key TAB, case insensitive
= Command (and params) auto complete “contains” , key Ctrl+TAB, case insensitive
= Command history, key up/down. Saved and loaded from file, see /statsShowAll.
= Command params can be enclosed into double quotes.
= Command hint (Listbox) while it is being typed.
= If a clicked dump entry is a valid command, it will replace the input field text (that will be dumped).
= Batch execute initialization console commands. Configurable at file, see /statsShowAll.
= Console style can be changed on the fly.
= Line wrapping works for all styles.
Nagivation
= Navigate dump area, key pgup/pgdown or mouse scroll. Dump is saved to a file, see /statsShowAll.
= Auto scroll after command.
Commands
= Several commands available already, see command /help
= Comment detection, line starting with such token will be ignored
= Omit the “command being run” info entry by ending a line with ‘#’, good at init file, mainly for /echo commands.
Editing
= Multi-line copy: Ctrl+b (or Shift+click) marks CopyFrom “begin”, Ctrl+c marks CopyTo “end”.
= Single line wrap detection when copying.
= Ctrl+del clear the input command line
= ctrl+home sroll top, ctrl+end scroll bottom
= Big lines are wrapped, each part ends with ‘’
= Ctrl+/ comment toggle on the input line.
= Any changes to the input text will reset the command history cursor, hit Down to access your last non issued command.
Above the input field is the log area, below is the command hints/auto completion.
(This screenshot may not be updated)
my init file currently has this:
# console commands here will be executed at startup
/consoleStyle console
# enable hacks
/HKtoggle true
/fixCursor
/consoleHeight 0.8
# just some echo test
/echo 123#
Snapshots at googledrive.
Original Post:
Just got lemur libs (n00b here).
I am trying to create that developer console where we have a text area to dump any text we want (like the output of the typed commands), and a single line text input field.
Is there such implementation somewhere?
EDIT: I am having some problems:
- I am not being able to limit the TextField height, it is getting stretched.
- I see no text input blinking cursor.
- I can’t select text, copy/paste
EDIT: I can navigate left/right/home/end
Any tips?
PS.: my start point was GuiDemo.java here