Apply suggestions from code review

This commit is contained in:
Kai S. K. Engelbart 2020-07-24 10:25:35 +02:00
parent 59354c403d
commit 2ffcad9d35
2 changed files with 4 additions and 4 deletions

View File

@ -129,7 +129,7 @@ public class Settings {
/** /**
* Sets the current on close mode. * Sets the current on close mode.
* *
* @param hideOnClose the on close mode that should be set. * @param hideOnClose whether the application should be minimized on close
* @since Envoy Client v0.3-alpha * @since Envoy Client v0.3-alpha
*/ */
public void setHideOnClose(boolean hideOnClose) { ((SettingsItem<Boolean>) items.get("hideOnClose")).set(hideOnClose); } public void setHideOnClose(boolean hideOnClose) { ((SettingsItem<Boolean>) items.get("hideOnClose")).set(hideOnClose); }

View File

@ -34,7 +34,7 @@ public class StatusTrayIcon {
private boolean displayMessages = false; private boolean displayMessages = false;
/** /**
* @return true if the status tray icon is supported on this platform * @return {@code true} if the status tray icon is supported on this platform
* @since Envoy Client v0.2-beta * @since Envoy Client v0.2-beta
*/ */
public static boolean isSupported() { return SystemTray.isSupported(); } public static boolean isSupported() { return SystemTray.isSupported(); }
@ -43,7 +43,7 @@ public class StatusTrayIcon {
* Creates a {@link StatusTrayIcon} with the Envoy logo, a tool tip and a pop-up * Creates a {@link StatusTrayIcon} with the Envoy logo, a tool tip and a pop-up
* menu. * menu.
* *
* @param stage the stage which focus determines if message * @param stage the stage whose focus determines if message
* notifications are displayed * notifications are displayed
* @since Envoy Client v0.2-beta * @since Envoy Client v0.2-beta
*/ */
@ -61,7 +61,7 @@ public class StatusTrayIcon {
trayIcon.setPopupMenu(popup); trayIcon.setPopupMenu(popup);
// Only display messages if the stage is not focused // Only display messages if the stage is not focused
stage.focusedProperty().addListener((ov, onHidden, onShown) -> displayMessages = ov.getValue() == Boolean.FALSE); stage.focusedProperty().addListener((ov, onHidden, onShown) -> displayMessages = !ov.getValue());
// Show the window if the user clicks on the icon // Show the window if the user clicks on the icon
trayIcon.addActionListener(evt -> Platform.runLater(() -> { stage.setIconified(false); stage.toFront(); stage.requestFocus(); })); trayIcon.addActionListener(evt -> Platform.runLater(() -> { stage.setIconified(false); stage.toFront(); stage.requestFocus(); }));