Skip to content

Commit

Permalink
add table header
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkAmi committed Mar 9, 2024
1 parent 3dabe51 commit 91df349
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
@@ -1,22 +1,22 @@
package com.github.thinkami.hellojetbrainsplugin.ui

import com.intellij.openapi.ui.DialogPanel
import com.intellij.ui.components.JBScrollPane
import com.intellij.ui.dsl.builder.Cell
import com.intellij.ui.dsl.builder.panel
import com.intellij.ui.table.JBTable

class AppleTableContent {
var contentPanel : DialogPanel
lateinit var myTableModel: Cell<JBTable>
lateinit var myTableModel: Cell<JBScrollPane>

init {
contentPanel = panel {
row {

val table = JBTable()
val model = AppleTableModel()
table.model = model
myTableModel = cell(table)
myTableModel = cell(JBScrollPane(table))
}
}
}
Expand Down
Expand Up @@ -29,6 +29,10 @@ class AppleTableModel : AbstractTableModel() {
return tableData[rowIndex][columnIndex]
}

override fun getColumnName(column: Int): String {
return columns[column]
}

fun filterChanged() {
tableData = allData.filter {
val name = it[1] // Nameで絞り込むため、列番号を指定
Expand Down

0 comments on commit 91df349

Please sign in to comment.