center things horizontally

pull/24/head
Zlatin Balevsky 2019-10-25 22:02:04 +01:00
parent 6f624e3afc
commit ac717b5205
8 changed files with 11 additions and 11 deletions

View File

@ -24,7 +24,7 @@ class BrowseView extends BasicWindow {
private final Core core
private final Table table
private final TerminalSize terminalSize
private final LayoutData layoutData = GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER)
private final LayoutData layoutData = GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER, true, false)
BrowseView(BrowseModel model, TextGUI textGUI, Core core, TerminalSize terminalSize) {
super("Browse "+model.persona.getHumanReadableName())

View File

@ -36,10 +36,10 @@ class DownloadsView extends BasicWindow {
table.setSelectAction({rowSelected()})
table.setTableModel(model.model)
table.setVisibleRows(terminalSize.getRows())
contentPanel.addComponent(table, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER))
contentPanel.addComponent(table, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER,true,false))
Button closeButton = new Button("Close",{close()})
contentPanel.addComponent(closeButton, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER))
contentPanel.addComponent(closeButton, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER,true,false))
setComponent(contentPanel)
closeButton.takeFocus()

View File

@ -40,7 +40,7 @@ class FilesView extends BasicWindow {
Panel contentPanel = new Panel()
contentPanel.setLayoutManager(new GridLayout(1))
LayoutData layoutData = GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER)
LayoutData layoutData = GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER, true, false)
table = new Table("Name","Size","Comment")
table.setCellSelection(false)

View File

@ -42,10 +42,10 @@ class ResultsView extends BasicWindow {
table.setSelectAction({rowSelected()})
table.setTableModel(model.model)
table.setVisibleRows(terminalSize.getRows())
contentPanel.addComponent(table, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER))
contentPanel.addComponent(table, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER, true, false))
Button closeButton = new Button("Close", {close()})
contentPanel.addComponent(closeButton, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER))
contentPanel.addComponent(closeButton, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER, true, false))
setComponent(contentPanel)
closeButton.takeFocus()

View File

@ -42,13 +42,13 @@ class SearchView extends BasicWindow {
table.setSelectAction({rowSelected()})
table.setTableModel(model.model)
table.setVisibleRows(terminalSize.getRows())
contentPanel.addComponent(table, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER))
contentPanel.addComponent(table, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER, true, false))
Button closeButton = new Button("Close", {
model.unregister()
close()
})
contentPanel.addComponent(closeButton, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER))
contentPanel.addComponent(closeButton, GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER, true, false))
setComponent(contentPanel)
closeButton.takeFocus()

View File

@ -37,7 +37,7 @@ class TrustListView extends BasicWindow {
Panel contentPanel = new Panel()
contentPanel.setLayoutManager(new GridLayout(1))
LayoutData layoutData = GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER)
LayoutData layoutData = GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER, true, false)
Label nameLabel = new Label("Trust list for "+model.trustList.persona.getHumanReadableName())
Label lastUpdatedLabel = new Label("Last updated "+new Date(model.trustList.timestamp))

View File

@ -39,7 +39,7 @@ class TrustView extends BasicWindow {
Panel contentPanel = new Panel()
contentPanel.setLayoutManager(new GridLayout(1))
LayoutData layoutData = GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER)
LayoutData layoutData = GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER, true, false)
Panel topPanel = new Panel()
topPanel.setLayoutManager(new GridLayout(2))

View File

@ -22,7 +22,7 @@ class UploadsView extends BasicWindow {
Panel contentPanel = new Panel()
contentPanel.setLayoutManager(new GridLayout(1))
LayoutData layoutData = GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER)
LayoutData layoutData = GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER, true, false)
table = new Table("Name","Progress","Downloader","Remote Pieces")
table.setCellSelection(false)