Gfx doodles 1.2 - No Fluff Just Stuff

Gfx doodles 1.2

Posted by: Andres Almiray on February 16, 2008

I've updated the first groodle with the recent addition of aliases. Also it is no longer required to register GraphicsBuilder's extensions, it will do it for you. Finally animations now have more friendly methods like start, stop, pause, resume and restart; all these additions make the code much shorter while keeping the same behavior in place, see for yourself.




A yellow-ish color is set on line 8 using aliases, similar calls may be like the following ones
  • def foreground = 'yellow'
  • def foreground = color( 'yellow' )
  • def foreground = color( color: 'yellow' ) )
  • def foreground = color( red: 1, green: 1 )
  • def foreground = rgba( red: 1, green: 1 )
  • def foreground = rgba( r: 1, g: 1 )
The f on line 14 stands for fill, finally the animation is restarted every time the mouse steps into one of the rectangles, with a simple call, no need to expose the internal state of the animation.

You may find these and other features in the next version of GraphicsBuilder.

Keep on Groovying
Andres Almiray

About Andres Almiray

Andres is a Java/Groovy developer and a Java Champion with more than 20 years of experience in software design and development. He has been involved in web and desktop application development since the early days of Java. Andres is a true believer in open source and has participated on popular projects like Groovy, Griffon, and DbUnit, as well as starting his own projects (Json-lib, EZMorph, GraphicsBuilder, JideBuilder). Founding member of the Griffon framework and Hackergarten community event. https://ch.linkedin.com/in/aalmiray

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »