On Thu, 20 Sep 2018 17:23:21 +0100, Adrian Caspersz wrote:
> On 19/09/18 14:55, Martin Gregorie wrote:
>> On Wed, 19 Sep 2018 14:02:13 +0100, Adrian Caspersz wrote:
>>
>>> On 16/09/18 19:17, Martin Gregorie wrote:
>>>> I'm in the process of creating a desktop application to display and
>>>> edit data that's best treated as a ragged array of Strings: it is
>>>> quite unlikely that all rows in the array will be the same length.
>>>>
>>>> I've built and debugged a Datastore class to hold it as an ArrayList
>>>> of ArrayList - the ArrayList being in a wrapper
>>>> class representing a row of fields. The DataStore allows rows,
>>>> columns and individual fields to be inserted, deleted, and the fields
>>>> to be modified.
>>>>
>>>> Datastore extends AbstractTableModel because I was initially
>>>> intending to use a JTable to display and manipulate its contents, but
>>>> now its successfully manipulating the ragged array I'm having twinges
>>>> of doubt about how whether a JTable can is the best way of displaying
>>>> it and allowing it to be viewed and modified, i.e. can a JTable deal
>>>> successfully with the missing elements at the end of rows in a ragged
>>>> array?
>>>>
>>>> Would I be better off with a custom built structure containing, say,
>>>> an array of JButtons to display fields in the ragged array and that
>>>> can be clicked to add a field, edit or delete it?
>>>>
>>>> I'll be very interested to hear how you've handled, or would handle,
>>>> this display problem.
>>>
>>> XML/XLST to a web browser.
>>
>> ...and modifying it? Saving the result?
>
> web app, client side javascript (jquery, handlebars etc...)
>
> https://en.wikipedia.org/wiki/Ajax_(programming)
>
> or good old CGI html forms processing (POST/GET etc...)
>
> or a NodeJS server....
Why would I ever build a web app or use that typeless mess called
javascript when what I need is a standalone application, preferably
written in Java (or C with curses or GTK2 at a pinch) that reads, alters
and saves local files?
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|