Blame view

src/main/kotlin/application/model/ObservableCurrentTime.kt 421 Bytes
9e952e84e   lsagona   add message clust...
1
2
3
  package application.model
  
  import kotlin.properties.Delegates
3b26be8f9   lsagona   controle the time...
4
  class ObservableCurrentTime {
9e952e84e   lsagona   add message clust...
5

3b26be8f9   lsagona   controle the time...
6
7
8
      val listeners: MutableList<CurrentTime> = mutableListOf()
  
      var value: Int by Delegates.observable(
e220e082b   lsagona   graph binded to s...
9
          initialValue = Int.MAX_VALUE,
9e952e84e   lsagona   add message clust...
10
11
12
13
14
15
16
17
          onChange = { _, _, new ->
              run {
                  listeners.forEach {
                      it.onValueChanged(new)
                  }
              }
          }
      )
3b26be8f9   lsagona   controle the time...
18

9e952e84e   lsagona   add message clust...
19
  }