drobne upravy
parent
33f6104c88
commit
5fd95f2d19
|
|
@ -98,10 +98,11 @@ public class Client {
|
|||
/// okno
|
||||
///
|
||||
if (config.getBoolean("open_maximalized")) {
|
||||
System.err.println("true");
|
||||
okno.setExtendedState(JFrame.MAXIMIZED_BOTH);
|
||||
} else {
|
||||
System.err.println("false");
|
||||
okno.setSize(1024, 800);
|
||||
okno.setLocationRelativeTo(null);
|
||||
}
|
||||
|
||||
///
|
||||
|
|
|
|||
|
|
@ -47,13 +47,9 @@ public class Window extends JFrame {
|
|||
});
|
||||
|
||||
initComponents();
|
||||
|
||||
if (!Client.config.getBoolean("open_maximalized")) {
|
||||
pack();
|
||||
setLocationRelativeTo(null);
|
||||
}
|
||||
|
||||
|
||||
// pack();
|
||||
// setLocationRelativeTo(null);
|
||||
}
|
||||
|
||||
private void initComponents() {
|
||||
|
|
@ -145,17 +141,17 @@ public class Window extends JFrame {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setVisible(boolean b) {
|
||||
super.setVisible(b);
|
||||
if (b) {
|
||||
// Pro jistotu zpozdíme maximalizaci, aby se provedla až po dokončení layoutu
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
setExtendedState(JFrame.MAXIMIZED_BOTH);
|
||||
toFront();
|
||||
requestFocus();
|
||||
});
|
||||
public void setVisible(boolean b) {
|
||||
super.setVisible(b);
|
||||
if (b) {
|
||||
// Pro jistotu zpozdíme maximalizaci, aby se provedla až po dokončení layoutu
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
setExtendedState(JFrame.MAXIMIZED_BOTH);
|
||||
toFront();
|
||||
requestFocus();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Statické přístupové metody pro ostatní komponenty
|
||||
|
|
@ -371,7 +367,7 @@ public void setVisible(boolean b) {
|
|||
currentServerSettingsPanel.refreshSnmpTemplates();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void refreshValueMap() {
|
||||
if (currentServerSettingsPanel != null) {
|
||||
currentServerSettingsPanel.refreshValueMap();
|
||||
|
|
|
|||
Loading…
Reference in New Issue