Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #4895

Re: Existing Cell Renderers/Editors for long text passages?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From Jeff Higgins <jeff@invalid.invalid>
Newsgroups comp.lang.java.gui
Subject Re: Existing Cell Renderers/Editors for long text passages?
Date Wed, 04 Jan 2012 18:52:19 -0500
Organization A noiseless patient Spider
Lines 41
Message-ID <je2oc2$4a1$1@dont-email.me> (permalink)
References <Xns9FD09960E6B65jpnasty@94.75.214.39> <je2elp$2n9$1@dont-email.me> <Xns9FD0A63DE4DFCjpnasty@94.75.214.39>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Wed, 4 Jan 2012 23:46:10 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="qwFw1g9RsQ6TkML5yezG9A"; logging-data="4417"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ewukWSDQs+1aieDrjT3lDmL3bUf2dkpM="
User-Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20111110 Icedove/3.0.11
In-Reply-To <Xns9FD0A63DE4DFCjpnasty@94.75.214.39>
Cancel-Lock sha1:FewLTRPha+zZECzDAXCtupUq8c4=
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.gui:4895

Show key headers only | View raw


On 01/04/2012 04:20 PM, Novice wrote:
> Jeff Higgins<jeff@invalid.invalid>  wrote in
> news:je2elp$2n9$1@dont-email.me:
>
>> On 01/04/2012 03:04 PM, Novice wrote:
>>> Rather than re-invent the wheel, I was wondering if anyone is aware
>>> of source code for any existing JTable cell editors and renderers for
>>> displaying cells that have substantial amounts of text in them?
>>>
>>> I have a JTable that has three columns of text, two of which are
>>> occasionally very wide. (They are several hundred characters as
>>> opposed to several thousand or several million characters.) I think
>>> I'd like to see those long values displayed in a JScrollPane,
>>> word-wrapped over several lines so that you can see the whole thing
>>> at once and I'd like to edit them the same way.
>>>
>>> I can probably figure out how to do this myself but this seems like a
>>> problem others will have already solved so I thought I'd see if
>>> anyone could point me to existing (free) code for this purpose.
>>>
>> Have you considered popping up a JTextArea for editing and displaying
>> "It was a dark and ..." in display mode?
>>
>
> I wouldn't rule out that approach but it's not my first choice. I think it
> would be more elegant to edit it within the table than to have to display
> it in a different frame/dialog.

A UI element as you describe might be more elegant but the code 
implementing it on top of a JTable would likely be very inelegant.
It seems that quite a few have attempted it with varying degrees of success.
The main stumbling block is that the JTable grid that you see onscreen 
is not a grid of Components, rather an image put together by the JTable 
using it's TableCellRender(s).

Also, I probably understated the frequency
> of the problem somewhat. Now that I think about it, quite a lot of the
> values in two of the columns are likely to be wide enough to need to be
> wrapped in other to see them for editing.
>

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Existing Cell Renderers/Editors for long text passages? Novice <novice@example..com> - 2012-01-04 20:04 +0000
  Re: Existing Cell Renderers/Editors for long text passages? Jeff Higgins <jeff@invalid.invalid> - 2012-01-04 16:06 -0500
    Re: Existing Cell Renderers/Editors for long text passages? Novice <novice@example..com> - 2012-01-04 21:20 +0000
      Re: Existing Cell Renderers/Editors for long text passages? Jeff Higgins <jeff@invalid.invalid> - 2012-01-04 18:52 -0500
        Re: Existing Cell Renderers/Editors for long text passages? Novice <novice@example..com> - 2012-01-05 23:06 +0000
  Re: Existing Cell Renderers/Editors for long text passages? Roedy Green <see_website@mindprod.com.invalid> - 2012-01-05 04:47 -0800
    Re: Existing Cell Renderers/Editors for long text passages? Novice <novice@example..com> - 2012-01-05 23:08 +0000

csiph-web