Created
May 20, 2009 06:47
-
-
Save aalmiray/114664 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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