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 jp.takeda_soft.examples | |
import javax.swing.{JPanel,JFrame,JButton} | |
import java.awt.{Color,Graphics,Point,BorderLayout} | |
import java.awt.event.{ActionListener,ActionEvent} | |
/** | |
JButton+Actionの記述をDSL化する | |
*/ | |
class SButton extends JButton{ |
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 jp.takeda_soft.examples | |
import javax.swing.{JPanel,JFrame,JButton} | |
import java.awt.{Color,Graphics,Point,BorderLayout} | |
import java.awt.event.{ActionListener,ActionEvent} | |
/** | |
JButton+Actionの記述をDSL化する | |
*/ | |
class SButton extends JButton{ |
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 jp.takeda_soft.examples | |
/** | |
世界のナベアツに挑戦 | |
テーマ:implicitによるScalaAPIの拡張 | |
*/ | |
object Nabeatsu extends Application { | |
//Intがバカになるメソッド"!"を追加 | |
implicit def bakanize(n: Int) = new Bakanizer(n) |
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
/* | |
* ExtendCookBook.scala | |
* 継承アレコレ | |
*/ | |
package jp.takeda_soft.examples | |
/**「何か」、生き物か、食べ物か */ | |
trait Some{ | |
def isCreature:boolean | |
def isFood:boolean |
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
/* | |
ドラゴンカーブを描くアプレット | |
追々カオス理論のPlotterを作りたい。 | |
Type Bindingを使って抽象化したい。 | |
*/ | |
package takedasoft | |
import javax.swing.{JPanel,JFrame} | |
import java.awt.{Color,Graphics,Graphics2D,Dimension} |
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
/* | |
もうちょっと関数と描画ロジックを分離したい | |
Type Bindingとか使ってかっこよく抽象化したい。 | |
*/ | |
package takedasoft | |
import javax.swing.{JPanel,JFrame} | |
import java.awt.{Color,Graphics,Graphics2D,Dimension} | |
import java.awt.image.{BufferedImage} | |
import scala.concurrent.ops.spawn |
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
/* | |
* TmpFile.scala | |
* | |
* specsのためのバグを含んだ簡単な実装です。 | |
*/ | |
package takedasoft | |
import java.io._ | |
/** |
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
/* | |
* ftdrop3Spec.scala | |
* | |
* specs for ftdop3.scala | |
* http://gist.github.com/30441 | |
* | |
* require: specs-<version>.jar | |
* http://code.google.com/p/specs/ | |
*/ | |
package ftdop3 |
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
/* | |
* myProjFullSpec.scala | |
* | |
* Specs API 調査版 | |
* http://specs.googlecode.com/files/scaladocs-1.4.1.rar | |
*/ | |
package takedasoft | |
import org.specs._ | |
import org.specs.matcher._ |
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
/* | |
* scala で OpenGLのためし。 | |
* Java OpenGL ライブラリ JOGL を使っています。 | |
* | |
* scalac -classpath \ | |
* "/jogl/lib/gluegen-rt.jar:/jogl/lib/jogl.jar" JOGLDemo.scala | |
* java -Djava.library.path="/jogl/lib" -classpath \ | |
* "./classes:scala-library.jar:\ | |
* /jogl/lib/gluegen-rt.jar:/jogl/lib/jogl.jar" takedasoft.JOGLDemo | |
* |
OlderNewer