2024-03-30

This commit is contained in:
2024-03-30 19:57:14 +09:00
parent d4055752a9
commit 57cc9ca7ff
90 changed files with 4829 additions and 105 deletions

76
doc/26_desktop.md Normal file
View File

@@ -0,0 +1,76 @@
# Desktop
* `Desktop.isDesktopSupported()`
* `Desktop.getDesktop()`
* `isSupported(Desktop.Action)`
* `browse(URI)`
* `mail(URI)`
* `open(File)`
* `edit(File)`
* `print(File)`
## Desktop.Action
* BROWSE
* MAIL
* OPEN
* EDIT
* PRINT
# GraphicsEnvironment
* `GraphicsEnvironment.getLocalGraphicsEnvironment()`
* `GraphicsDevice getDefaultScreenDevice()`
# GraphicsDevice
* `isWindowTranslucencySupported()` : WindowTranslucency.TRANSLUCENT | PERPIXEL_TRANSLUCENT | PERPIXEL_TRANSPARENT
```java
jFrame.setOpacity(0.5f);
```
## Splash Screen
* `SplashScreen.getSplashScreen()`
* `Graphics2D createGraphics()`
* `getBounds()`
* `close()`
```java
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)`
```java
if(SystemTray.isSupported()){
SystemTray systemTray = SystemTray.getSystemTray();
systemTray.add(new TrayIcon(...));
}
```
### TrayIcon
* `TrayIcon(Image,String,PopupMenu)`
* `setImage(Image)`
* `setImageAutoSize(boolean)`
* `setPopupMenu(PopupMenu)`
* `setToolTip(String)`