contentPanel.add(controls, BorderLayout.SOUTH);\r
setLayout(new BorderLayout());\r
add(contentPanel, BorderLayout.CENTER);\r
- if (isSearch) {\r
- addWindowListener(new WindowAdapter() {\r
- @Override\r
- public void windowOpened(WindowEvent event) {\r
+ addWindowListener(new WindowAdapter() {\r
+ @Override\r
+ public void windowOpened(WindowEvent event) {\r
+ if (isSearch) {\r
searchFragment.requestFocus();\r
+ } else {\r
+ search(0);\r
}\r
+ }\r
\r
- @Override\r
- public void windowActivated(WindowEvent event) {\r
+ @Override\r
+ public void windowActivated(WindowEvent event) {\r
+ if (isSearch) {\r
searchFragment.requestFocus();\r
}\r
- });\r
- }\r
+ }\r
+ });\r
}\r
\r
public void selectRepository(RepositoryModel repository) {\r
tableModel.entries.clear();\r
tableModel.entries.addAll(entries);\r
tableModel.fireTableDataChanged();\r
- setTitle(Translation.get(isSearch ? "gb.search" : "gb.log") + ": " + text + " ("\r
- + entries.size() + (page > 0 ? (", pg " + (page + 1)) : "") + ")");\r
+ setTitle(Translation.get(isSearch ? "gb.search" : "gb.log")\r
+ + (StringUtils.isEmpty(text) ? "" : (": " + text)) + " (" + entries.size()\r
+ + (page > 0 ? (", pg " + (page + 1)) : "") + ")");\r
header.setText(getTitle());\r
if (pack) {\r
Utils.packColumns(table, Utils.MARGIN);\r
propertiesTable.setRowHeight(nameRenderer.getFont().getSize() + 8);\r
propertiesTable.getColumn(name).setCellRenderer(nameRenderer);\r
\r
- JPanel centerPanel = new JPanel(new BorderLayout());\r
+ JPanel centerPanel = new JPanel(new BorderLayout(Utils.MARGIN, Utils.MARGIN));\r
centerPanel.add(fieldsPanel, BorderLayout.NORTH);\r
centerPanel.add(new JScrollPane(propertiesTable), BorderLayout.CENTER);\r
\r
- JPanel controls = new JPanel();\r
+ JPanel controls = new JPanel(new FlowLayout(FlowLayout.CENTER, Utils.MARGIN, 0));\r
controls.add(refreshStatus);\r
\r
header = new HeaderPanel(Translation.get("gb.status"), "health_16x16.png");\r
- setLayout(new BorderLayout());\r
+ setLayout(new BorderLayout(Utils.MARGIN, Utils.MARGIN));\r
add(header, BorderLayout.NORTH);\r
add(centerPanel, BorderLayout.CENTER);\r
add(controls, BorderLayout.SOUTH);\r