• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to make a custom CellEditor register changes without loss of focus?

 
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there

I have written my own component that is kind of like a checkbox, called a SelectableComponent. I am busy putting this into various tables and I would like to ask a question about the custom cell editor that I'm using to edit
the component in the table.

To give you a quick overview, the SelectableComponent has two boolean values, isSelectable and isSelected.

If the SelectableComponent.isSelectable() then the renderer shows a checkbox in the table. Else it shows a blank label.

If the SelectableComponent.isSelectable(), then the editor is placed on the cell.

Now the problem I am having is that it is working as far as I can click on the cells to get them to change their value and as I click the checkbox selects and unselects. However, I need this clicking to be registered with another table that tally's totals, and this change at the moment registers only when the row that I am clicking on loses focus.

How can I make this change in selection fire the event without having to lose the focus?

Many kind regards,
Rachel


[ September 30, 2004: Message edited by: Rachel Swailes ]
 
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
something like this might work :



D.
 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The almighty Don returns!

Thanks for the advice, I'll give it a try and let you know how it goes.

Cheers,
Rachel
 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Works like a charm!
Don Rules!

Thanks again,
Rachel
 
Don Kiddick
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
reply
    Bookmark Topic Watch Topic
  • New Topic