The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Endless Animations

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Endless Animations Posted: May 11, 2007 10:32 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Endless Animations
Feed Title: Michael Lucas-Smith
Feed URL: http://www.michaellucassmith.com/site.atom
Feed Description: Smalltalk and my misinterpretations of life
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Michael Lucas-Smith

Advertisement

I was thinking about something Travis mentioned to me the other day about Animations. He pointed out that the Animations package only gives you finite animation. It runs for a particular amount of time and then finishes.

After letting that rattle around in my head for a bit I realised that all animations are like that. Actually, they just loop a set of finite animations endlessly. So I've added a #loop API to Animations (v3 in public store). You can start the Animation with #loop and stop it with #stop.

One prime example of a common endless animation is the blinking cursor. Previously in WithStyle I used ExtraActivity to achieve a blinking cursor. This was pretty good, but now that I have Animations, I wanted to be able to achieve the same sort of thing.

We got fancy in WithStyle,.. while you're typing the cursor won't blink, it stays solid. When you idle, the cursor starts to blink. Pretty nifty actually. For a quick and dirty example in VisualWorks I decided not to do that.

Instead, I plugged in to every input field and text edit area in VisualWorks Wrappers to give them a blinking cursor. The example was pretty easy, just have an animation that turned the cursor on and invalidated the current edit area and then flip the cursor off and invalidate again.. so on and so forth forever.

I've published BlinkingInsertionPoint to public store which does just that. It hooks in to all looks and feels (except motif, which has its own special insertion point drawer) and begins the animation immediately. All editable text areas will now have a blinking cursor using the new #loop behaviour.

Read: Endless Animations

Topic: Meeting 13 - Agile Software Development: The Cooperative Game Previous Topic   Next Topic Topic: Making TDD and Java Swing behave

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use