Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Button extends AbstractButton {
- def void2This(b: Button => Unit): Button = {val ret = this.clone().asInstanceOf[Button]; b(ret); ret}
- def changeText(text: String): Button = void2This(_.setText(text))
- }
Add Comment
Please, Sign In to add comment