Skip to content

Instantly share code, notes, and snippets.

@aalmiray
Created May 20, 2009 06:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aalmiray/114664 to your computer and use it in GitHub Desktop.
Save aalmiray/114664 to your computer and use it in GitHub Desktop.
import java.awt.Color
import groovy.swing.SwingBuilder
import griffon.builder.trident.TridentBuilder
def trident = new TridentBuilder()
def swing = new SwingBuilder()
swing.edt {
frame( title: "Trident+Groovy", size: [400,200],
locationRelativeTo: null, visible: true ) {
flowLayout()
button = button("Sample")
timeline = trident.timeline(button, duration: 2500) {
trident.interpolatedProperty("foreground",
from: Color.BLUE, to: Color.RED)
}
noparent {
bean(button,
mouseEntered: {timeline.play()},
mouseExited: {timeline.playReverse()})
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment