Scala property bindings

码农软件 · 软件分类 · 其他开发相关 · 2019-10-25 14:57:19

软件介绍

This library provides property bindings similar to Qt signal slot system, JavaFx's properties and other.

示例程序:

private class Model {
  val text = new Observable("count: 0")
  private var count = 
  def increment() {
    count += 1
    text() = "count: " + count
  }
}

object Example extends SimpleSwingApplication {
  private val model = new Model

  def top = new MainFrame {
    title = "Example"
    contents = new GridPanel(2, 1) {
      val button = new Button("Press Me!")
      contents += button

      val label = new Label {
        text = observes(model.text, text_=)
      }
      contents += label

      listenTo(button)
      reactions += {
        case ButtonClicked(_) => model.increment()
      }
    }
  }
}

本文地址:https://codercto.com/soft/d/17536.html

Blog Design Solutions

Blog Design Solutions

Richard Rutter、Andy Budd、Simon Collison、Chris J Davis、Michael Heilemann、Phil Sherry、David Powers、John Oxton / friendsofED / 2006-2-16 / USD 39.99

Blogging has moved rapidly from being a craze to become a core feature of the Internetfrom individuals sharing their thoughts with the world via online diaries, through fans talking about their favori......一起来看看 《Blog Design Solutions》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

URL 编码/解码
URL 编码/解码

URL 编码/解码