Skip to content

Feature requests for SwingTerminal / ScrollingSwingTerminal: Better Support for standard Swing features #628

@Shrill-Girl

Description

@Shrill-Girl

I understand that for the typical console operation additional AWT and Swing features do not make much sense. But for the Swing terminals some features might be really helpful:

  1. A default background color (incl. getter / setter) which is not Black - the initial background color of the terminal before anything is written and if the terminal scrolls, the new lines background. If I am not mistaken this is currently TextColor.ANSI.DEFAULT which is hard coded to be black. Changing this default background color should change the attribute of all text including the text which is currently not visible because is scrolled out of the current viewport. So if you scroll a ScrollingSwingTerminal all the background should have that color initially / until one writes something with a different background color. If you call clearScr, that should remove all characters and all colors other than the default background color.
  2. Better support of AWT.Color as a TextColor. Converting between TextColor and AWT.Color while using a SwingTerminal is a clumsy.
  3. Something like clearEOL -> fill the current line from the current position to the end of the line with ' ' and the default background color, without changing the the cursor position.
  4. A more easy way to auto hide the scrollbar (e.g. using a ScrollPane) when no Scrollbar is needed (if, for example, the whole text is currently visible).
  5. A more easy way to attach Mouse / Keyboard Listeners to a SwingTerminal / Scrolling SwingTerminal.

I do not need that on the screen or GUI level, but on the terminal level. 2,4,5 can be done with a little bit of hacking and without changing the Lanterna sources but a more direct way would be appreciated (at least be myself :-)

Thx a lot for even considering this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions