MCPcopy Create free account
hub / github.com/dorkbox/SystemTray / realizeImageFile

Method realizeImageFile

src/dorkbox/systemTray/MenuItem.java:165–185  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

163 }
164
165 private void realizeImageFile() {
166 if (this.unknownImage instanceof String) {
167 this.imageFile = imageResizeUtil.shouldResizeOrCache(false, (String) this.unknownImage);
168 }
169 else if (this.unknownImage instanceof File) {
170 this.imageFile = imageResizeUtil.shouldResizeOrCache(false, (File) this.unknownImage);
171 }
172 else if (this.unknownImage instanceof URL) {
173 this.imageFile = imageResizeUtil.shouldResizeOrCache(false, (URL) this.unknownImage);
174 }
175 else if (this.unknownImage instanceof InputStream) {
176 this.imageFile = imageResizeUtil.shouldResizeOrCache(false, (InputStream) this.unknownImage);
177 }
178 else if (this.unknownImage instanceof Image) {
179 this.imageFile = imageResizeUtil.shouldResizeOrCache(false, (Image) this.unknownImage);
180 }
181 else if (this.unknownImage instanceof ImageInputStream) {
182 this.imageFile = imageResizeUtil.shouldResizeOrCache(false, (ImageInputStream) this.unknownImage);
183 }
184 this.unknownImage = null;
185 }
186
187 /**
188 * @param peer the platform specific implementation for all actions for this type

Callers 3

bindMethod · 0.95
setImageFromTrayMethod · 0.95
setImageMethod · 0.95

Calls 1

shouldResizeOrCacheMethod · 0.80

Tested by

no test coverage detected