Advertisement
Guest User

Untitled

a guest
Jan 15th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 2.02 KB | None | 0 0
  1.                         val yachtName = object : Label() {
  2.                             init {
  3.                                 width = 160.0
  4.                                 text = yacht.name
  5.                                 font = Font.font("Franklin Gothic Medium", 20.0)
  6.                                 setMargin(this, Insets(5.0, 15.0, 0.0, 15.0))
  7.                             }
  8.                         }
  9.  
  10.                         children.add(yachtName)
  11.  
  12.                         val yachtPrice = object : Label() {
  13.                             init {
  14.                                 width = 180.0
  15.                                 text = "Цена: " + yacht.price.toString()
  16.                                 font = Font.font("Franklin Gothic Medium", 20.0)
  17.                                 setMargin(this, Insets(5.0, 15.0, 0.0, 10.0))
  18.                             }
  19.                         }
  20.                         children.add(yachtPrice)
  21.  
  22.                         val bucketButton = object : Button() {
  23.                             init {
  24.                                 id = "buyButton"
  25.                                 prefWidth = 25.0
  26.                                 alignment = Pos.CENTER_RIGHT
  27.                                 prefHeight = 25.0
  28.                                 text = "$"
  29.                                 setMargin(this, Insets(5.0, 5.0, 5.0, 5.0))
  30.                             }
  31.                         }
  32.                         val infoButton = object : Button() {
  33.                             init {
  34.                                 id = "descriptionButton"
  35.                                 layoutX = 365.0
  36.                                 alignment = Pos.CENTER_RIGHT
  37.                                 prefWidth = 25.0
  38.                                 prefHeight = 25.0
  39.                                 text = "D"
  40.                                 setMargin(this, Insets(5.0, 5.0, 5.0, 5.0))
  41.                             }
  42.                         }
  43.  
  44.                         children.addAll(bucketButton, infoButton)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement