APIとは何の略?
- Accelerated Product Innovation
- Agile Programming Initiative
- Application Programming Interface
- Application Procedural Interface
[ | |
{ | |
"location":{ | |
"latitude":35.648804, | |
"longitude":139.712639, | |
"displayAddress":"東京都渋谷区広尾1-3-13 ハイネス恵比寿" | |
}, | |
"storeNumber":201, | |
"name":"一風堂 恵比寿店", | |
"lateNight":true, |
@Grab('org.codehaus.groovyfx:groovyfx:0.2') | |
import static groovyx.javafx.GroovyFX.start | |
start { | |
stage(visible: true) { | |
scene(width: 400, height: 400, fill: black) { | |
circle(centerX: 200, centerY: 200, radius: 110, fill: yellow) { | |
effect dropShadow(color: white, radius: 50) | |
} | |
moon = circle(centerX: 400, centerY: 0, radius: 100, fill: black) |
@Grab('org.codehaus.groovyfx:groovyfx:0.2') | |
import static groovyx.javafx.GroovyFX.start | |
start { | |
stage(visible: true) { | |
scene(width: 640, height: 480, fill: lightskyblue) { | |
// 緑の鳥:回転(周期2秒)しながらpathに沿って飛ぶ(周期4秒) | |
imageView { | |
image("file:green_bird.png", width: 80, height: 80) |
@Grab('org.codehaus.groovyfx:groovyfx:0.2') | |
import static groovyx.javafx.GroovyFX.start | |
svg = '''<?xml version="1.0" standalone="no"?> | |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | |
<svg width="400px" height="250px" viewBox="0 0 400 250" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"> | |
<rect id="rect" x="50" y="50" width="100" height="75" fill="red" opacity="0.0"> | |
<animate attributeName="opacity" begin="0s" dur="0.5s" from="0.0" to="1.0" fill="freeze" repeatCount="1"/> | |
<animate attributeName="x" begin="1s" dur="5s" fill="freeze" calcMode="linear" repeatCount="1" keyTimes="0;0.2;0.4;0.6;0.8;1" values="50;250;50;250;50;250"/> | |
<animate attributeName="fill" begin="1.5s" dur="2.4s" fill="freeze" calcMode="linear" repeatCount="1" keyTimes="0;0.25;0.5;0.75;1" values="red;green;red;green;red"/> |
// GroovyFX version of "JavaFX Animation Sample": https://gist.github.com/2917266 | |
@Grab('org.codehaus.groovyfx:groovyfx:0.2') | |
import static groovyx.javafx.GroovyFX.start | |
start { | |
stage = stage { | |
scene(width: 400, height: 250) { | |
// --- >8 --- Cut here for GroovyFxPad --- >8 --- | |
root = group { |
import groovyx.javafx.* | |
import javafx.scene.text.Font | |
import javafx.scene.media.* | |
def sound1 = new AudioClip("ルパン風タイプ音.aif") | |
def sound2 = new AudioClip("ルパン風BGM音.aif") | |
String message = "プログラミングGROOVY" | |
int len = message.size() |
@Grab('org.twitter4j:twitter4j:2.2.5') | |
@Grab('org.twitter4j:twitter4j-stream:2.2.5') | |
import twitter4j.* | |
import groovyx.javafx.* | |
import javafx.scene.control.* | |
import javafx.scene.media.* | |
import javafx.application.Platform | |
final HOTWORD = /(?i)groovy/ |
import groovyx.javafx.* | |
GroovyFX.start { | |
def sg = new SceneGraphBuilder() | |
sg.stage(title: "MediaView Demo", width: 640, height: 380, visible: true) { | |
scene(fill: black) { | |
mview = mediaView(fitWidth: 640, fitHeight: 380) { | |
player(autoPlay: true, source: "<URL to movie file(.flv)>") | |
transition = parallelTransition { |
import groovyx.javafx.* | |
key = '<YOUR Google+ API KEY HERE>' | |
uid = 110611905999186598367 // user ID | |
url = "https://www.googleapis.com/plus/v1/people/$uid?key=$key".toURL() | |
json = new groovy.json.JsonSlurper().parseText(url.text) | |
GroovyFX.start { | |
def sg = new SceneGraphBuilder() |