Dont go crazy w/new features
This commit is contained in:
parent
9dbb4f5da3
commit
be0ade6ff0
4
pom.xml
4
pom.xml
|
|
@ -28,7 +28,6 @@
|
|||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<!-- https://mvnrepository.com/artifact/com.dorkbox/SystemTray -->
|
||||
<dependency>
|
||||
|
|
@ -37,5 +36,4 @@
|
|||
<version>4.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -142,12 +142,16 @@ public class ColorOracle extends WindowAdapter implements KeyListener, FocusList
|
|||
return;
|
||||
}
|
||||
|
||||
java.awt.EventQueue.invokeLater(() -> {
|
||||
try {
|
||||
new ColorOracle();
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(ColorOracle.class.getName()).log(Level.SEVERE, null, ex);
|
||||
System.exit(-1);
|
||||
java.awt.EventQueue.invokeLater(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
new ColorOracle();
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(ColorOracle.class.getName()).log(Level.SEVERE, null, ex);
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -232,21 +236,12 @@ public class ColorOracle extends WindowAdapter implements KeyListener, FocusList
|
|||
* Initializes the tray icon and attaches it to the system tray.
|
||||
*/
|
||||
private void initTrayIcon() throws Exception {
|
||||
|
||||
// if (!SystemTray.isSupported()) {
|
||||
// throw new Exception(TRAYICONS_NOT_SUPPORTED_MESSAGE);
|
||||
// }
|
||||
|
||||
// get the SystemTray instance
|
||||
// SystemTray tray = SystemTray.getSystemTray();
|
||||
SystemTray tray = SystemTray.get("Color Oracle");
|
||||
ImageIcon icon = loadImageIcon(MENUICON, "Color Oracle Icon");
|
||||
Image image = icon.getImage();
|
||||
tray.setImage(image);
|
||||
tray.setTooltip(TOOLTIP);
|
||||
// final Menu menu = tray.getMenu();
|
||||
|
||||
// create the menu
|
||||
JMenu imenu = initMenu();
|
||||
tray.setMenu(imenu);
|
||||
}
|
||||
|
|
@ -635,4 +630,4 @@ public class ColorOracle extends WindowAdapter implements KeyListener, FocusList
|
|||
switchToNormalVision();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue