Give this Frame an icon.
(Frame frame)
| 2129 | * Give this Frame an icon. |
| 2130 | */ |
| 2131 | static public void setIcon(Frame frame) { |
| 2132 | if (OSUtils.isMacOS()) { |
| 2133 | return; |
| 2134 | } |
| 2135 | |
| 2136 | List<Image> icons = Stream |
| 2137 | .of("16", "24", "32", "48", "64", "72", "96", "128", "256") |
| 2138 | .map(res -> "/lib/icons/" + res + "x" + res + "/apps/arduino.png") |
| 2139 | .map(path -> BaseNoGui.getContentFile(path).getAbsolutePath()) |
| 2140 | .map(absPath -> Toolkit.getDefaultToolkit().createImage(absPath)) |
| 2141 | .collect(Collectors.toList()); |
| 2142 | frame.setIconImages(icons); |
| 2143 | } |
| 2144 | |
| 2145 | |
| 2146 | /** |
no test coverage detected