Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #28194
| X-Received | by 10.58.59.104 with SMTP id y8mr23340177veq.18.1398239813743; Wed, 23 Apr 2014 00:56:53 -0700 (PDT) |
|---|---|
| X-Received | by 10.140.102.150 with SMTP id w22mr167042qge.9.1398239813678; Wed, 23 Apr 2014 00:56:53 -0700 (PDT) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!cm18no5523714qab.0!news-out.google.com!dz10ni19326qab.1!nntp.google.com!cm18no5523712qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.java.programmer |
| Date | Wed, 23 Apr 2014 00:56:53 -0700 (PDT) |
| In-Reply-To | <lj6eet$66e$1@dont-email.me> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=195.59.58.50; posting-account=lu82qwoAAADTCukE-yHKgXq1LeJIU4ZA |
| NNTP-Posting-Host | 195.59.58.50 |
| References | <8c3ea48c-26d5-4ef8-869b-08f46023b953@googlegroups.com> <lj62s5$buc$1@dont-email.me> <lj6eet$66e$1@dont-email.me> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <3cc8ce8c-ee9c-430e-8c3d-efdf95bb7150@googlegroups.com> (permalink) |
| Subject | Re: Java Swing text as a grid? |
| From | Rupert Smith <rupertlssmith@googlemail.com> |
| Injection-Date | Wed, 23 Apr 2014 07:56:53 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Received-Bytes | 2167 |
| X-Received-Body-CRC | 2560122915 |
| Xref | csiph.com comp.lang.java.programmer:28194 |
Show key headers only | View raw
On Tuesday, April 22, 2014 8:03:25 PM UTC+1, Jeff Higgins wrote:
> On 04/22/2014 11:45 AM, Jeff Higgins wrote:
> You might look at the source of javax.swing.text.PlainView after
> you've got your document model completely worked out.
PlainView: The view represents each child element as a line of text.
Sounds like its pretty close to what I'm after, thanks.
> > javax.swing.text is a big, and to my mind, complex package.
Its a beast for sure. 6 chapters in the Swing text book I have, and even that doesn't leave room for the details.
I looked an lanterna and realised that rendering a simple grid of text can be as simple as implementing paintComponent()
for (int i = 0; i < columns; i++) {
for (int j = 0; j < rows; j++) {
graphics2d.drawString(characters[j][i], ...
So I think I will keep the model very simple for now, and render that way. I can re-implement on top of text.Document and play around with text.View as and when more capability is required.
Rupert
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Java Swing text as a grid? rupertlssmith@googlemail.com - 2014-04-22 07:50 -0700
Re: Java Swing text as a grid? markspace <markspace@nospam.nospam> - 2014-04-22 08:22 -0700
Re: Java Swing text as a grid? Jeff Higgins <jeff@invalid.invalid> - 2014-04-22 11:45 -0400
Re: Java Swing text as a grid? Jeff Higgins <jeff@invalid.invalid> - 2014-04-22 15:03 -0400
Re: Java Swing text as a grid? Rupert Smith <rupertlssmith@googlemail.com> - 2014-04-23 00:56 -0700
Re: Java Swing text as a grid? Roedy Green <see_website@mindprod.com.invalid> - 2014-04-23 19:49 -0700
Re: Java Swing text as a grid? Rupert Smith <rupertlssmith@googlemail.com> - 2014-04-25 02:13 -0700
Re: Java Swing text as a grid? Arne Vajhøj <arne@vajhoej.dk> - 2014-04-28 20:26 -0400
csiph-web