Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flemming-n-larsen/java-swing-ansi-support
ANSI Support classes for Java Swing
https://github.com/flemming-n-larsen/java-swing-ansi-support
ansi editorkit editorpane java kotlin swing
Last synced: about 2 months ago
JSON representation
ANSI Support classes for Java Swing
- Host: GitHub
- URL: https://github.com/flemming-n-larsen/java-swing-ansi-support
- Owner: flemming-n-larsen
- License: mit
- Created: 2023-12-04T20:14:06.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-29T07:39:07.000Z (10 months ago)
- Last Synced: 2024-03-29T23:33:45.680Z (10 months ago)
- Topics: ansi, editorkit, editorpane, java, kotlin, swing
- Language: Java
- Homepage:
- Size: 189 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ANSI Support classes for Java Swing
It supports basic [ANSI escape code] styles and colors, but _not_ all escape codes for various reasons.
Classes and interfaces are provided for both [Java](./java/README.md) and [Kotlin](./kotlin/README.md).
These classes are useful for creating a "text terminal" in editor panes using a monospaced font and basic ANSI styles
and colors to give it a look and feel like a real terminal.Here is a demo of how a [JEditorPane] can be styled by using an `AnsiEditorKit`, which is a [EditorKit] used to create
styled documents based on [ANSI escape code].![Screen shot of the AnsiDemoFrame](./gfx/AnsiDemoFrame.png)
[Java Swing]: https://docs.oracle.com/javase/tutorial/uiswing/ "Oracle docs: The Swing Tutorial"
[ANSI escape code]: https://en.wikipedia.org/wiki/ANSI_escape_code "WikiPedia: ANSI escape code"
[JEditorPane]: https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/JEditorPane.html "Oracle docs: JEditorPane"
[EditorKit]: https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/text/EditorKit.html "Oracle docs: EditorKit documentation"