noelopan
|
Posted: February 11, 2010 17:00 by noelopan
|
|
Hi Tim/Hugo Would you please consider adding JTable support? I have a few situations in which the user is required to add at least one item to a table. I know there is ValidationListener (or whatever its called now), but this would be nice to have builtin. Do yo have any ideas about a release date of the new stuff? Thanks |
Table validation
Replies: 4 - Last Post: February 14, 2010 07:30
by: noelopan
by: noelopan
showing 1 - 5 of 5
hugoheden
|
Posted: February 11, 2010 23:39 by hugoheden
|
|
Hi noelopan, > Would you please consider adding JTable support? I can't speak for Tim -- and he's the boss -- but yes, I'd definitely consider that. It seems only natural considering that we support e.g JList and JComboBox. Actually, I thought I had already added that on the current development branch, but now that I checked it seems that apparently I hadn't. It should be very similar to the code for JListValidationListenerImpl, right? See here. > I have a few situations in which the user is required to add at least one item to a table. Hmm, I'm not sure what you mean by "add an item to a table", could you elaborate? Do you mean "select one row in a table" or "select one item in a table" or something like that? I myself have a situation where the user is required to select a row in a JTable. > Do yo have any ideas about a release date of the new stuff? Hopefully soon, the original plan was February, but I think Tim is currently choked up with other work. So, currently no promises can be made. Thanks for keeping in touch ![]() |
noelopan
|
Posted: February 13, 2010 10:42 by noelopan
|
|
Hi Hugo Great. I suppose I can actually write and submit it myself. Although I'm not too familiar with the new API. Might give it a shot. > Hmm, I'm not sure what you mean by "add an item to a table", could you elaborate? I mean row not item. Suppose the GUI starts off with an empty table in a form. The user can add/remove rows/items to this table by means of Add/Remove buttons and a mini form that pops up. For instance, if you want the user to add all the players in a team and there must be at least one player in the table before he can click OK. This is not about selection, it's about a change to the table model. So JTableValidationListenerImpl must also implement TableDataListener. I have similiar use cases for JList. Consider a situation where you have a list on the left populated with items and you let the user move items to a list on the right (with a ">" button or a ">>" button in the case of move all). But the user must move at least one item to the list on the right. Again, for this you'll need JListValidationListenerImpl to implement not only ListSelectionListener, but also ListDataListener. Thanks for investing so much in this project. |
hugoheden
|
Posted: February 13, 2010 14:45 by hugoheden
|
|
Ah, good explanation, I understand now. I hadn't thought about this, but it does seem like pretty valid and common use-cases. Given the simplicity of the code changes needed it all seems reasonable. To sum up, we should let the JListValidationListenerImp to implement ListDataListener as well, and for a hypothetical JTableValidationListenerImpl to implement TableDataListener (in addition to ListSelectionListener or whatever it is that is used for the selection). Added the issues to the issue tracker 38 39 |
Replies: 4 - Last Post: February 14, 2010 07:30
by: noelopan
by: noelopan







