2019-05-08 18:12:31 +02:00
package org.hso.texturesyncclient.view.mainView
2019-06-05 16:23:45 +02:00
import com.jfoenix.controls.JFXButton
2019-05-09 13:55:22 +02:00
import com.jfoenix.controls.JFXChipView
2019-05-08 18:12:31 +02:00
import javafx.geometry.Insets
import javafx.geometry.Orientation
2019-06-05 16:23:45 +02:00
import javafx.geometry.Pos
2019-05-09 13:55:22 +02:00
import javafx.scene.control.Label
2019-05-08 18:12:31 +02:00
import javafx.scene.image.Image
import javafx.scene.layout.Background
import javafx.scene.layout.BackgroundFill
import javafx.scene.layout.CornerRadii
import javafx.scene.paint.Paint
import tornadofx.*
class DetailView : View ( ) {
val preview = Preview3D ( )
2019-06-08 14:19:14 +02:00
val metaLabel = Label ( " Auflösung: 8MP \n Name: Texture.png \n Andere: was anderes \n Einfügedatum: 31.02.2019 " )
2019-05-09 13:55:22 +02:00
val cvTags = JFXChipView < String > ( )
2019-06-05 16:23:45 +02:00
val btnImport = JFXButton ( " + " )
2019-05-08 18:12:31 +02:00
init {
2019-05-09 12:03:49 +02:00
// set a default texture
2019-05-09 15:24:45 +02:00
preview . setTexture ( Image ( " textures/sample_texture_1.jpg " ) )
2019-06-08 14:19:14 +02:00
//preview.setTexture(Image("icons/TextureSync_Icon_256x256.jpg"))
2019-05-08 18:12:31 +02:00
}
override val root = form {
minWidth = 250.0
2019-06-08 14:19:14 +02:00
background = Background ( BackgroundFill ( Paint . valueOf ( " #3a3a3a " ) , CornerRadii . EMPTY , Insets . EMPTY ) )
2019-05-08 18:12:31 +02:00
2019-06-04 20:49:07 +02:00
fieldset ( labelPosition = Orientation . VERTICAL ) {
2019-05-08 18:12:31 +02:00
2019-06-04 20:49:07 +02:00
field {
2019-05-08 18:12:31 +02:00
vbox ( 7 ) {
add ( preview )
}
}
2019-06-08 13:31:29 +02:00
field {
2019-06-08 14:19:14 +02:00
paddingTop = 2
paddingBottom = 3
2019-05-09 13:55:22 +02:00
add ( metaLabel )
2019-05-08 18:12:31 +02:00
}
2019-06-04 20:49:07 +02:00
field {
2019-06-08 14:19:14 +02:00
minHeight = 155.0
2019-05-09 13:55:22 +02:00
add ( cvTags )
2019-06-05 16:23:45 +02:00
}
field {
hbox ( alignment = Pos . CENTER _RIGHT ) {
add ( btnImport )
}
2019-05-08 18:12:31 +02:00
}
2019-05-09 13:55:22 +02:00
}
style {
2019-06-08 14:19:14 +02:00
metaLabel . style = " -fx-text-fill: #2b7bbb; "
cvTags . minHeight = 145.0
2019-06-05 16:23:45 +02:00
cvTags . paddingAll = 3.0
2019-06-08 13:25:55 +02:00
cvTags . style = " -fx-background-color: #53585b; -fx-text-inner-color: #b15b2e; "
2019-06-05 16:23:45 +02:00
btnImport . buttonType = JFXButton . ButtonType . RAISED
2019-06-08 14:19:14 +02:00
btnImport . styleClass . add ( " jfx-floating-action-button " )
2019-06-05 16:23:45 +02:00
}
2019-06-08 13:25:55 +02:00
2019-05-08 18:12:31 +02:00
}
}