Created
September 8, 2009 22:18
-
-
Save aalmiray/183273 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 groovy.swing.SwingBuilder | |
import com.bric.plaf.* | |
import org.kordamp.jsilhouette.geom.* | |
def shapes =[ | |
new Arrow(10f, 10f, 100f, 60f), | |
new Balloon(10f, 10f, 100f, 100f, 20f, 20f, 10f, | |
Balloon.TAB_AT_BOTTOM, 0.5f, Balloon.ANGLE_AT_END), | |
new Cross(50f, 50f, 40f, 30f, 0f, 0.25f), | |
new Lauburu(50f, 50f, 40f, 0f) | |
] | |
def swing = new SwingBuilder() | |
swing.edt { | |
def ui = new VistaButtonUI() | |
frame(title: "FilledButtonUI", size: [200, 200], visible: true) { | |
gridLayout(cols: 2, rows: 2, hgap: 10, vgap: 10) | |
shapes.eachWithIndex { s, i -> | |
button((i+1).toString(), UI: ui, clientProperties:[(FilledButtonUI.SHAPE): s]) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment