R
rupertlssmith
Hi,
I'd like a text UI component that lets me place monospaced text within it, using row/column addressing. The built-in text controls are constructed around a Document model, which models text as a single stream (by stream I mean linear buffer of text), with rendered row/column derived from placement of newlines, wrapping strategy, and lots of other things.
The Document model lets you have multiple root 'elements', each of which isa single stream. I'm thinking I could extend and existing text control, perhaps JTextArea, to render one root element per row, and disable all line wrapping. It might make more sense than having to insert newlines into the text stream to control row position.
Does anyone have any thoughts on how to create a simple text grid UI control with Swing? I suppose I should take a look at lanterna, which must be achieving something similar to what I want, when emulating a console under Swing.
Thanks for your input.
Rupert Smith
I'd like a text UI component that lets me place monospaced text within it, using row/column addressing. The built-in text controls are constructed around a Document model, which models text as a single stream (by stream I mean linear buffer of text), with rendered row/column derived from placement of newlines, wrapping strategy, and lots of other things.
The Document model lets you have multiple root 'elements', each of which isa single stream. I'm thinking I could extend and existing text control, perhaps JTextArea, to render one root element per row, and disable all line wrapping. It might make more sense than having to insert newlines into the text stream to control row position.
Does anyone have any thoughts on how to create a simple text grid UI control with Swing? I suppose I should take a look at lanterna, which must be achieving something similar to what I want, when emulating a console under Swing.
Thanks for your input.
Rupert Smith