I would rather create a new Widget called BlinkyLable(String style1,
String style2, int timerinterval) which has both styles and can save
the current one ;) Plus a few Methods like startToBlink, stopToBlink
etc.
On 4 Dez., 06:33, ArunDhaJ <[EMAIL PROTECTED]> wrote:
> Hi,
> I wanted to make a label to blink, like toggling two colors. I've
> implemented a timer to do the same.
> How can I know which color has been previously set ?? so that I can
> swap with the new color...
>
> //////////////////////////////////////////////////////////////
> Label lblOfflineLabel = new Label();
> Timer offlineLabelTimer;
> lblOfflineLabel.addStyleName("OfflineLabel");
> lblOfflineLabel.addStyleName("OfflineLabel-blink");
>
> offlineLabelTimer = new Timer() {
> public void run() {
> lblOfflineLabel.removeStyleName("OfflineLabel-blink");
> }
>
> };
>
> // blink at the rate of 2 second
> offlineLabelTimer.scheduleRepeating(2000);
> //////////////////////////////////////////////////////////////
>
> How to implement the run logic to toggle the two styles ???...
>
> .OfflineLabel{
> color: #FF0000;
>
> }
>
> .OfflineLabel-blink {
> color: #00FF00;
>
> }
>
> Thanks in advance !!!
>
> - ArunDhaJ
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---