summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TeXLive/TLPackage.scala
blob: 9a797d9c8ae4891c54968d9363c24f1bc71568c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package TeXLive

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 TLPackage(name: StringProperty, lrev: ObjectProperty[Int], rrev: ObjectProperty[Int],
                     shortdesc: StringProperty, size: ObjectProperty[Int], 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)
    )
}