Hi,
Once again thanks alot for your feedback.
I have done that now, but I wont say it is completed. But I got the
functionality as I expected. Below is the code I used
Just have a look and clarify one question here.
class Client {
.....
.....
DBUpdate;
new Highlighter().removeHighlight(rowIndex);
.....
.....
public class Highlighter{
Timer pushTimer;
int timerCount;
private void removeHighlight(final int row){
pushTimer = new Timer(){
public void run(){
timerCount++;
System.out.println("TimerCount.."+timerCount);
if (timerCount == 20) {
for(int i=1;i<=colCount;i++){
if
(datacellFormatter.getStyleName(row,i).equals("AADD_POLL")){
//System.out.println("colIndex.."+i);
datacellFormatter.removeStyleName(row, i, "AADD_POLL");
}
}
this.cancel();
}
}
};
pushTimer.scheduleRepeating(250);
}
}
}
Here my doubt is the object created by
new Highlighter().removeHighlight(rowIndex);
will be closed automatically or we may have to anything explicitly???
Kindly advise
Thanks
Suren
On Jun 18, 7:59 pm, Kwhit <[email protected]> wrote:
> Sure...
>
> > >4/ At the last interrupt have the object commit suicide and remove
> > >itself
>
> Feedback will wake up every, say, 250ms.. You want to keep a highlight
> visible for say 5 seconds so that's 20 wake ups. Count them. On the
> 20th you're going to set the background back to it's original color -
> probably white. When you've done that remove the association between
> the cell/row and the Feedback object and don't set the timer again.
> There's no more references to that Feedback object so it will be
> forgotten about and garbage collected.
>
> > >5/ On an edit clear any existing feedback objects and kill them.
> > >Instantiate a new Feedback object and forget about it
>
> When you start editing a cell check if there are any associated
> Feedback objects - there will be either 0 or 1. If you find one then
> remove it and set a flag in it to tell it not to change the background
> color of the cell and that's it.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---