1.3 KiB
1.3 KiB
Desktop
Desktop.isDesktopSupported()Desktop.getDesktop()isSupported(Desktop.Action)browse(URI)mail(URI)open(File)edit(File)print(File)
Desktop.Action
- BROWSE
- OPEN
- EDIT
GraphicsEnvironment
GraphicsEnvironment.getLocalGraphicsEnvironment()GraphicsDevice getDefaultScreenDevice()
GraphicsDevice
isWindowTranslucencySupported(): WindowTranslucency.TRANSLUCENT | PERPIXEL_TRANSLUCENT | PERPIXEL_TRANSPARENT
jFrame.setOpacity(0.5f);
Splash Screen
SplashScreen.getSplashScreen()Graphics2D createGraphics()getBounds()close()
final SplashScreen splashScreen = SplashScreen.getSplashScreen();
Graphics2D graphics2D = splashScreen.createGraphics();
// ...
splashScreen.close();
Manifest-Version: 1.0
Main-Class: <class name>
SplashScreen-Image: <image name>
System tray
SystemTray.isSupported()SystemTray.getSystemTray()add(TrayIcon)/remove(TrayIcon)
if(SystemTray.isSupported()){
SystemTray systemTray = SystemTray.getSystemTray();
systemTray.add(new TrayIcon(...));
}
TrayIcon
-
TrayIcon(Image,String,PopupMenu) -
setImage(Image) -
setImageAutoSize(boolean) -
setPopupMenu(PopupMenu) -
setToolTip(String)