Added final to the class

This commit is contained in:
nathan 2017-06-15 00:45:06 +02:00
parent 951a600f0b
commit 2690d9aae4
3 changed files with 8 additions and 6 deletions

View File

@ -76,7 +76,7 @@ import dorkbox.systemTray.util.ImageResizeUtil;
* http://bazaar.launchpad.net/~ubuntu-desktop/ido/gtk3/files
*/
@SuppressWarnings("Duplicates")
public
public final
class _AppIndicatorNativeTray extends Tray implements NativeUI {
private volatile AppIndicatorInstanceStruct appIndicator;
private boolean isActive = false;
@ -239,7 +239,7 @@ class _AppIndicatorNativeTray extends Tray implements NativeUI {
}
@Override
public final
public
boolean hasImage() {
return imageFile != null;
}

View File

@ -41,7 +41,7 @@ import dorkbox.util.SwingUtil;
* Also, on linux, this WILL NOT CLOSE properly -- there is a frame handle that keeps the JVM open. MacOS does not have this problem.
*/
@SuppressWarnings({"SynchronizationOnLocalVariableOrMethodParameter", "WeakerAccess"})
public
public final
class _AwtTray extends Tray implements NativeUI {
private volatile SystemTray tray;
private volatile TrayIcon trayIcon;

View File

@ -35,7 +35,7 @@ import dorkbox.systemTray.jna.linux.Gtk;
* This is the "old" way to do it, and does not work with some newer desktop environments.
*/
@SuppressWarnings("Duplicates")
public
public final
class _GtkStatusIconNativeTray extends Tray implements NativeUI {
private volatile Pointer trayIcon;
@ -55,6 +55,8 @@ class _GtkStatusIconNativeTray extends Tray implements NativeUI {
private volatile boolean visible = true;
private volatile File imageFile;
private final GtkMenu gtkMenu;
// called on the EDT
public
_GtkStatusIconNativeTray(final SystemTray systemTray) {
@ -63,7 +65,7 @@ class _GtkStatusIconNativeTray extends Tray implements NativeUI {
Gtk.startGui();
// we override various methods, because each tray implementation is SLIGHTLY different. This allows us customization.
final GtkMenu gtkMenu = new GtkMenu() {
gtkMenu = new GtkMenu() {
@Override
public
void setEnabled(final MenuItem menuItem) {
@ -215,7 +217,7 @@ class _GtkStatusIconNativeTray extends Tray implements NativeUI {
}
@Override
public final
public
boolean hasImage() {
return imageFile != null;
}