properly set size of tables

pull/24/head
Zlatin Balevsky 2019-10-24 19:22:39 +01:00
parent bf72c76f13
commit 626e145e25
5 changed files with 5 additions and 5 deletions

View File

@ -35,7 +35,7 @@ class DownloadsView extends BasicWindow {
table.setCellSelection(false) table.setCellSelection(false)
table.setSelectAction({rowSelected()}) table.setSelectAction({rowSelected()})
table.setTableModel(model.model) table.setTableModel(model.model)
table.setSize(terminalSize) table.setVisibleRows(terminalSize.getRows())
contentPanel.addComponent(table, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER)) contentPanel.addComponent(table, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER))
Button closeButton = new Button("Close",{close()}) Button closeButton = new Button("Close",{close()})

View File

@ -40,7 +40,7 @@ class FilesView extends BasicWindow {
table.setCellSelection(false) table.setCellSelection(false)
table.setTableModel(model.model) table.setTableModel(model.model)
table.setSelectAction({rowSelected()}) table.setSelectAction({rowSelected()})
table.setSize(terminalSize) table.setVisibleRows(terminalSize.getRows())
contentPanel.addComponent(table, layoutData) contentPanel.addComponent(table, layoutData)
Panel buttonsPanel = new Panel() Panel buttonsPanel = new Panel()

View File

@ -39,7 +39,7 @@ class ResultsView extends BasicWindow {
table.setCellSelection(false) table.setCellSelection(false)
table.setSelectAction({rowSelected()}) table.setSelectAction({rowSelected()})
table.setTableModel(model.model) table.setTableModel(model.model)
table.setSize(terminalSize) table.setVisibleRows(terminalSize.getRows())
contentPanel.addComponent(table, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER)) contentPanel.addComponent(table, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER))
Button closeButton = new Button("Close", {close()}) Button closeButton = new Button("Close", {close()})

View File

@ -34,7 +34,7 @@ class SearchView extends BasicWindow {
table.setCellSelection(false) table.setCellSelection(false)
table.setSelectAction({rowSelected()}) table.setSelectAction({rowSelected()})
table.setTableModel(model.model) table.setTableModel(model.model)
table.setSize(terminalSize) table.setVisibleRows(terminalSize.getRows())
contentPanel.addComponent(table, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER)) contentPanel.addComponent(table, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER))
Button closeButton = new Button("Close", { Button closeButton = new Button("Close", {

View File

@ -27,7 +27,7 @@ class UploadsView extends BasicWindow {
table = new Table("Name","Progress","Downloader","Remote Pieces") table = new Table("Name","Progress","Downloader","Remote Pieces")
table.setCellSelection(false) table.setCellSelection(false)
table.setTableModel(model.model) table.setTableModel(model.model)
table.setSize(terminalSize) table.setVisibleRows(terminalSize.getRows())
contentPanel.addComponent(table, layoutData) contentPanel.addComponent(table, layoutData)
Button closeButton = new Button("Close",{close()}) Button closeButton = new Button("Close",{close()})