summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/TLDisplayClasses.scala
blob: 630cbfce0619ff565e056fa5e388832bc0c3e9b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package TLCockpit

import scalafx.beans.property.{ObjectProperty, StringProperty}


// Note!!! we have to use ObjectProperty[Int] here instead of IntegerProperty
// since IntegerProperty does NOT implement Observable[Int,Int]
// see https://github.com/scalafx/scalafx/issues/243
case class TLPackageDisplay(name: StringProperty, var lrev: ObjectProperty[Int], rrev: ObjectProperty[Int],
                            shortdesc: StringProperty, size: ObjectProperty[Int], var installed: StringProperty) {
  def this(_name: String, _lrev: String, _rrev: String, _shortdesc: String, _size: String, _installed: String) =
    this(
      StringProperty(_name),      ObjectProperty[Int](_lrev.toInt), ObjectProperty[Int](_rrev.toInt),
      StringProperty(_shortdesc), ObjectProperty[Int](_size.toInt), StringProperty(_installed)
    )
}

case class TLBackupDisplay(name: StringProperty, rev: StringProperty, date: StringProperty) {
  def this(_name: String, _rev: String, _date: String) =
    this(StringProperty(_name), StringProperty(_rev), StringProperty(_date))
}

case class TLUpdateDisplay(name: StringProperty, var status: StringProperty, var lrev: StringProperty, rrev: StringProperty,
                           shortdesc: StringProperty, size: StringProperty) {
  def this(_name: String, _status: String, _lrev: String, _rrev: String, _shortdesc: String, _size: String) =
    this(
      StringProperty(_name), StringProperty(_status), StringProperty(_lrev), StringProperty(_rrev),
      StringProperty(_shortdesc), StringProperty(_size)
    )
}