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 javax.swing.JFrame | |
import java.awt.GridLayout | |
def printlnswing(message) { | |
new SwingBuilder().edt { | |
frame(title: 'Message', pack: true, visible: true, | |
layout: new GridLayout(0, 1), | |
defaultCloseOperation: JFrame.EXIT_ON_CLOSE) { | |
message.eachLine() { |
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
// HighlighterDemo Test | |
// | |
// refarence http://itpro.nikkeibp.co.jp/article/COLUMN/20110329/358840/?ST=develop&P=3 | |
// http://griffon.codehaus.org/SwingxBuilder | |
// | |
@Grab(group='org.swinglabs', module='swingx', version='1.6.1') | |
@Grab(group='org.codehaus.griffon', module='swingxbuilder', version='0.1.7') | |
import java.awt.Color; |
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 java.awt.* | |
class Utils { | |
def getGoodRenderingHints() { | |
def hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON) | |
hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY) |
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
Get exchange rate as JSONP via YQL. | |
YQL Console: http://developer.yahoo.com/yql/console | |
Query (USD to SEK): select rate,name from csv where url='http://download.finance.yahoo.com/d/quotes?s=USDSEK%3DX&f=l1n' and columns='rate,name' | |
Example code: | |
<script type="text/javascript"> |
NewerOlder