forked from kscience/visionforge
Add try/catch NoSuchFileException in FX demo
This commit is contained in:
parent
4f8efa0ee0
commit
2f570f2791
@ -3,6 +3,7 @@ package hep.dataforge.vision.solid.demo
|
|||||||
import hep.dataforge.vision.solid.gdml.gdml
|
import hep.dataforge.vision.solid.gdml.gdml
|
||||||
import javafx.stage.Stage
|
import javafx.stage.Stage
|
||||||
import tornadofx.*
|
import tornadofx.*
|
||||||
|
import java.nio.file.NoSuchFileException
|
||||||
import java.nio.file.Paths
|
import java.nio.file.Paths
|
||||||
|
|
||||||
class FXDemoApp : App(FXDemoGrid::class) {
|
class FXDemoApp : App(FXDemoGrid::class) {
|
||||||
@ -16,9 +17,15 @@ class FXDemoApp : App(FXDemoGrid::class) {
|
|||||||
stage.height = 600.0
|
stage.height = 600.0
|
||||||
|
|
||||||
view.showcase()
|
view.showcase()
|
||||||
view.demo("gdml", "gdml-cubes") {
|
try {
|
||||||
gdml(Paths.get("D:\\Work\\Projects\\gdml.kt\\gdml-source\\cubes.gdml"))
|
view.demo("gdml", "gdml-cubes") {
|
||||||
//setProperty(Material3D.MATERIAL_WIREFRAME_KEY, true)
|
gdml(Paths.get("D:\\Work\\Projects\\gdml.kt\\gdml-source\\cubes.gdml"))
|
||||||
|
//setProperty(Material3D.MATERIAL_WIREFRAME_KEY, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (e: NoSuchFileException) {
|
||||||
|
println("GDML demo: Please specify the correct file path e.g. " +
|
||||||
|
"visionforge\\demo\\gdml\\src\\commonMain\\resources\\cubes.gdml")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user