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


Groups > comp.lang.java.programmer > #38602

Re: Displaying a ragged array

From Martin Gregorie <martin@mydomain.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Displaying a ragged array
Date 2018-09-19 17:49 +0000
Organization albasani.net
Message-ID <pnu278$1o1$1@news.albasani.net> (permalink)
References (1 earlier) <pnoc21$ga9$1@dont-email.me> <pnovgf$rio$1@news.albasani.net> <pnp6d1$vj6$1@dont-email.me> <pnpe6d$ivs$1@news.albasani.net> <pntsi7$t5j$1@dont-email.me>

Show all headers | View raw


On Wed, 19 Sep 2018 18:12:20 +0200, Daniele Futtorovic wrote:

> I was thinking of a separate component, say a TextArea in some corner,
> for the comment, which would get shown when the row it belongs to is
> selected. It depends on whether you need to see comments all the time,
> or if it's fine just having it when the row is selected.
>
OK, Now I understand why you suggested using a tree structure. 

The first time I needed to edit the files that I'd use the editor on, I 
used a plain text editor, which was OK because big sections of it had 
similar length data in adjacent rows. Last time I had to change these 
files I did the job with OfficeLibre Calc, which was much easier because 
the data presentation was better. The main bugbear of using spreadsheets 
comes from the way that can mangle date and numeric columns. This wasn't 
a problem for me (either because Calc is fairly benign in this respect or 
because the data in these file is mostly alphanumeric) but friends say 
that data mangling is a real problem if you try using Excel to edit CSV 
files. Consequently I really want a similar window layout to a typical 
spreadsheet.

As I said, the files its most likely to get used on are quite large  - 14 
columns by 5800 lines, they are around 450KB in size. These are backup 
files used by a program I wrote (in Java of course) to manage setting up 
duty rosters for a large gliding club. This deals with creating six 
weekend rosters for a six month season, manned by just over 100 people 
and taking into account when they're available, that some are on more 
than one roster and that there are good reasons (such as shared glider 
ownership) why some people much not be rostered on the same day. IOW the 
rosters are not independent - so can't be backed up separately because 
doing so can mess up the crosslinks. Fairly infrequently something 
happens while the rosters are being set up (a multi-day process) which 
can require somebody to be removed from a roster that hasn't yet been 
worked on: they can't be removed from the 
list of members on the specific roster without messing up the backup 
files, which don't contain static data like who is on what roster, but do 
contain links to it. Hence the necessity to also edit them out of the 
latest backup as well - this is the reason I'm writing the editor.

Apologies for that over-large explanation, but I felt that an explanation 
of the problem size and why it needs the ability to display a lot of data 
in a reasonably compact form.

>> Is that like a JTree, but with the content of branches displayed
>> horizontally rather than hanging down as in a JTree? It doesn't appear
>> to be part of the Java 8 standard class library.
> 
> I might be misremembering it. Doc says it's a JTable "using a JTree as a
> renderer (and editor) for the cells in a particular column in the
> JTable".
>
OK. Thanks anyway.

I now have the datastore working more or less as I want it. It can 
operate at the column and row level (insert/delete operations) and also 
has the ability to insert/delete/modify a specified field in a selected 
row. It now does the right thing with comment lines, which occupy a 
single, rather wide field in a row, and understands this always starts 
with a marker character and is ignored when calculating the width of the 
first column (unlike a spreadsheet). 


-- 
Martin    | martin at
Gregorie  | gregorie dot org

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-16 22:17 +0000
  Re: Displaying a ragged array Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2018-09-17 16:00 +0200
    Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-17 19:32 +0000
      Re: Displaying a ragged array Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2018-09-17 23:29 +0200
        Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-17 23:43 +0000
          Re: Displaying a ragged array Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2018-09-19 18:12 +0200
            Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-19 17:49 +0000
              Re: Displaying a ragged array Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-09-19 14:25 -0400
                Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-19 19:29 +0000
                Re: Displaying a ragged array Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2018-09-20 15:30 +0200
                Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-20 15:06 +0000
              Re: Displaying a ragged array Eric Douglas <e.d.programmer@gmail.com> - 2018-09-24 08:11 -0700
                Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-24 17:52 +0000
                Re: Displaying a ragged array Eric Douglas <e.d.programmer@gmail.com> - 2018-09-24 12:01 -0700
                Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-10-23 21:00 +0000
  Re: Displaying a ragged array Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-09-17 10:17 -0400
    Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-17 19:46 +0000
      Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-17 23:53 +0000

csiph-web