set row height for tables pt2

This commit is contained in:
Zlatin Balevsky
2019-11-04 18:36:18 +00:00
parent dba863a864
commit 6cb1674d14
2 changed files with 4 additions and 2 deletions

View File

@@ -40,6 +40,7 @@ class BrowseView {
def resultsTable
def lastSortEvent
void initUI() {
int rowHeight = application.context.get("row-height")
mainFrame = application.windowManager.findWindow("main-frame")
dialog = new JDialog(mainFrame, model.host.getHumanReadableName(), true)
dialog.setResizable(true)
@@ -52,7 +53,7 @@ class BrowseView {
label(text : bind {model.totalResults == 0 ? "" : Math.round(model.resultCount * 100 / model.totalResults)+ "%"})
}
scrollPane (constraints : BorderLayout.CENTER){
resultsTable = table(autoCreateRowSorter : true) {
resultsTable = table(autoCreateRowSorter : true, rowHeight : rowHeight) {
tableModel(list : model.results) {
closureColumn(header: "Name", preferredWidth: 350, type: String, read : {row -> row.name.replace('<','_')})
closureColumn(header: "Size", preferredWidth: 20, type: Long, read : {row -> row.size})

View File

@@ -34,6 +34,7 @@ class FetchCertificatesView {
def lastSortEvent
void initUI() {
int rowHeight = application.context.get("row-height")
mainFrame = application.windowManager.findWindow("main-frame")
dialog = new JDialog(mainFrame, model.result.name, true)
dialog.setResizable(true)
@@ -46,7 +47,7 @@ class FetchCertificatesView {
label(text : bind {model.certificateCount == 0 ? "" : Math.round(model.certificateCount * 100 / model.totalCertificates)+"%"})
}
scrollPane(constraints : BorderLayout.CENTER) {
certsTable = table(autoCreateRowSorter : true) {
certsTable = table(autoCreateRowSorter : true, rowHeight : rowHeight) {
tableModel(list : model.certificates) {
closureColumn(header : "Issuer", preferredWidth : 200, type : String, read : {it.issuer.getHumanReadableName()})
closureColumn(header : "Name", preferredWidth : 200, type: String, read : {it.name.toString()})