前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >javafx框架tornadofx入门实战 计算Sha256

javafx框架tornadofx入门实战 计算Sha256

原创
作者头像
用户6167008
修改2020-02-14 18:19:44
3.2K0
修改2020-02-14 18:19:44
举报
代码语言:txt
复制
class FxHashingView : View("javafx框架tornadofx入门实战 计算Sha256") {
    val str0 = stringProperty()
    val strHash = stringProperty()
    val fpath = stringProperty()
    val fileContent = stringProperty()
    override val root = vbox(5) {
        hbox(5) {
            label("Sha256:")
            textfield(strHash) {
                promptText = "Sha256 hashing string"
                isEditable = false
                str0.onChange {
                    strHash.value = calcuteSha256(str0.value)
                }
                hgrow = Priority.ALWAYS
            }
        }
        textarea(str0) {
            promptText = "input string here"
            hgrow = Priority.ALWAYS

        }
        button("choose file") {
            action {
                _chooseFile()
                strHash.value = calcuteSha256(File(fpath.value))
                fileContent.value = File(fpath.value).readText()
            }
        }
        textarea(fileContent) {
            vgrow = Priority.ALWAYS
            promptText = "显示文件内容"
        }
        setPrefSize(700.0, 700.0)
        paddingAll = 10.0
        style {
            fontSize = 16.px
        }
    }
image.png
image.png

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档