common-swing

iSysCore Common Kotlin Library

License

License

GroupId

GroupId

com.github.isyscore
ArtifactId

ArtifactId

darcula-theme
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

common-swing
iSysCore Common Kotlin Library
Project URL

Project URL

https://github.com/isyscore/common-jvm
Source Code Management

Source Code Management

https://github.com/isyscore/common-swing

Download darcula-theme

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.isyscore/darcula-theme/ -->
<dependency>
    <groupId>com.github.isyscore</groupId>
    <artifactId>darcula-theme</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.isyscore/darcula-theme/
implementation 'com.github.isyscore:darcula-theme:1.0.0'
// https://jarcasting.com/artifacts/com.github.isyscore/darcula-theme/
implementation ("com.github.isyscore:darcula-theme:1.0.0")
'com.github.isyscore:darcula-theme:jar:1.0.0'
<dependency org="com.github.isyscore" name="darcula-theme" rev="1.0.0">
  <artifact name="darcula-theme" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.isyscore', module='darcula-theme', version='1.0.0')
)
libraryDependencies += "com.github.isyscore" % "darcula-theme" % "1.0.0"
[com.github.isyscore/darcula-theme "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.4.10

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
com.github.isyscore : common-swing jar 1.0.8

Project Modules

There are no modules declared in this project.

指令集 通用 SWING 基础库

指令集通用的 Kotlin 基础库,适用于 JVM/Swing 平台。

使用

kotlin_version=1.4.10

dependencies {
    implementation 'com.github.isyscore:common-swing:1.0.6'
}

传递依赖

api 'com.github.isyscore:common-jvm:1.3.2'

详细信息和用法参考本篇,此处不再赘述 点击进入

class MainForm: JFrame("Main") {
    init {
        contentPane = rootVertPanel {
            val tbl = table(arrayRowData = arrayOf(arrayOf("A", true), arrayOf("B", false)), arrayColumnNames = arrayOf("Name", "Checked")) {
                cell<JCheckBox> { cell, value, selected, cellHasFocus, row, col ->
                    // 此处的 this 是 JCheckBox
                    this.isSelected = value as Boolean
                    addActionListener { cell.setEditValue(this.isSelected, row, col) }
                }
            }
            borderPanel {
                button("Check") {
                    addActionListener {
                        val d1 = tbl.model.getValueAt(0, 1)
                        val d2 = tbl.model.getValueAt(1, 1)
                        println("d1 = $d1, d2 = $d2")
                    }
                }
            }
        }
        size { 500 x 300 }
        isVisible = true
    }
}

Versions

Version
1.0.0