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
/* | |
* Copyright 2008 the original author or authors. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
if (isMacOSX) { | |
javaOps << "-Xdock:name=$griffonAppName" | |
javaOps << "-Xdock:icon=${jardir.absolutePath}/griffon-icon-48x48.png" | |
} |
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 groovy.swing.SwingBuilder | |
def loremIpsum = """Lorem ipsum dolor sit amet, consectetur adipiscing elit. | |
Suspendisse consectetur neque eget purus. Praesent aliquam, | |
mi eget vestibulum facilisis, leo ipsum mattis lacus, at | |
luctus lacus urna eget quam. Proin massa augue, consequat sed, | |
convallis et, faucibus id, ligula. Vivamus sagittis velit id | |
quam. Nam quis quam quis nisi convallis auctor. Etiam sodales | |
ligula ornare libero. Ut at eros vel diam ultrices sollicitudin. | |
Ut quis augue sed ante cursus luctus. Nullam sed urna. Etiam |
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() |
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
button("Sample", id: "button", | |
mouseEntered: controller.play, | |
mouseExited: controller.playReverse) { | |
timeline(button, id: "timeline", duration: 2500) { | |
interpolatedProperty("foreground", from: Color.BLUE, to: Color.RED) | |
} | |
} |
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
package snake | |
import java.awt.Color | |
import java.awt.Dimension | |
import java.awt.Graphics | |
import javax.swing.JPanel | |
import org.pushingpixels.trident.Timeline | |
import org.pushingpixels.trident.Timeline.RepeatBehavior |
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 java.awt.Font | |
import matrix.Letter | |
import org.pushingpixels.trident.Timeline | |
import org.pushingpixels.trident.Timeline.RepeatBehavior | |
// warning!! reading font file on EDT | |
InputStream is = MatrixView.classLoader.getResourceAsStream("katakana.ttf") | |
Font kf = Font.createFont(Font.TRUETYPE_FONT, is) |
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
/* | |
* Copyright 2008 the original author or authors. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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 groovy.beans.Bindable | |
import groovy.swing.SwingBuilder | |
class Foo { | |
@Bindable Bar bar | |
} | |
class Bar { | |
@Bindable String baz | |
} |
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 | |
application(title:'dock', size:[600,400], | |
locationByPlatform:true, | |
iconImage: imageIcon('/griffon-icon-48x48.png').image, | |
iconImages: [imageIcon('/griffon-icon-48x48.png').image, | |
imageIcon('/griffon-icon-32x32.png').image, | |
imageIcon('/griffon-icon-16x16.png').image]) { | |
tabbedPane { | |
panel(title: "Simple") { |
OlderNewer