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


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

Re: One missing link in j

From "Martin Gregorie" <martin.gregorie@THRWHITE.remove-dii-this>
Subject Re: One missing link in j
Message-ID <nvusl4-99v.ln1@zoogz.gregorie.org> (permalink)
Newsgroups comp.lang.java.gui
References <f6gegi$u6i$1@aioe.org>
Date 2011-04-27 15:36 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui,comp.l
Bjorn Abelli wrote:
> "Oliver Wong" <owong@castortech.com> wrote...
>> "Eric Sosman" <esosman@ieee-dot-org.invalid> wrote ...
>>> Oliver Wong wrote:
> 
>>>> "RC" <raymond.chui@nospam.noaa.gov> wrote in message 
>>>> news:f5ua7t$2ci$1@news.nems.noaa.gov...
>>>>> Where is that missing link between DefaultTableColumnModel and
>>>>> DefaultTableModel?
>>>>> or between TableColumnModel and TableModel?
>>>>>
>>>>> Thank Q very much in advance!
>>>>     TableModel is an object that can be queried to provide information 
>>>> about tabular data. This object contains no information about how this 
>>>> data should be displayed, or what business rules might apply to the 
>>>> interaction between the user and this data (e.g. this user cannot edit 
>>>> certain parts of the data, etc.)
>>>     You were doing fine, and I was applauding, right up until
>>> the parenthetical remark.  How do you reconcile that remark with
>>> the isCellEditable() method?
>>    Bad design on Sun's part? Surely, the error cannot be mine. ;)
> 
> I'm not sure I get the objections of either part here...
> 
> I agree with Oliver that the TableModel should be a "backing unit", separate 
> from the user interface, but now I'm not quite sure what you mean with 
> "interaction between the user and this [displayed] data".
> 
> As far as I'm concerned there is still a difference between the possibility 
> to edit displayed data (in the interface) and the isCellEditable() in the 
> TableModel; the possibility to affect the "backing data".
> 
This doesn't seem unreasonable. After all isCellEditable() does control 
whether the underlying data can change in response to user input and 
hence whether (a) the edited cell content might need to be saved 
someplace and (b) whether the display needs updating to show the change.

On a related point, I'm quite prepared to believe that there is a 
problem either in the design or documentation of JTable and TableModel. 
I haven't been able to discover how to update the display when the 
underlying data changes. JTable doesn't seem to respond to repaint() and 
I haven't spotted a way of causing a repaint after updating the user 
data structure that TableModel is mapped onto.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

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


Thread

One missing link in javax "RC" <rc@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
  Re: One missing link in j "Oliver Wong" <oliver.wong@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
    Re: One missing link in j "Eric Sosman" <eric.sosman@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
      Re: One missing link in j "Oliver Wong" <oliver.wong@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
        Re: One missing link in j "Bjorn Abelli" <bjorn.abelli@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
          Re: One missing link in j "Martin Gregorie" <martin.gregorie@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
            Re: One missing link in j "Judy Szikora" <judy.szikora@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
            Re: One missing link in j "Eric Sosman" <eric.sosman@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
            Re: One missing link in j "Esmond Pitt" <esmond.pitt@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
              Re: One missing link in j "Martin Gregorie" <martin.gregorie@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
          Re: One missing link in j "Eric Sosman" <eric.sosman@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
            Re: One missing link in j "Bjorn Abelli" <bjorn.abelli@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000

csiph-web