Apply suggestions from code review

This commit is contained in:
Kai S. K. Engelbart 2020-07-24 10:25:35 +02:00
parent 833bb137b5
commit 29053b4d36
No known key found for this signature in database
GPG Key ID: 0A48559CA32CB48F
2 changed files with 4 additions and 4 deletions

View File

@ -129,7 +129,7 @@ public class Settings {
/**
* 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
*/
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;
/**
* @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
*/
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
* menu.
*
* @param stage the stage which focus determines if message
* @param stage the stage whose focus determines if message
* notifications are displayed
* @since Envoy Client v0.2-beta
*/
@ -61,7 +61,7 @@ public class StatusTrayIcon {
trayIcon.setPopupMenu(popup);
// 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
trayIcon.addActionListener(evt -> Platform.runLater(() -> { stage.setIconified(false); stage.toFront(); stage.requestFocus(); }));