MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / getImageIcon

Method getImageIcon

src/org/opensourcephysics/tools/Resource.java:224–234  ·  view source on GitHub ↗

Gets an ImageIcon. @return the icon

()

Source from the content-addressed store, hash-verified

222 * @return the icon
223 */
224 public ImageIcon getImageIcon() {
225 if ((icon == null) && isAnImage) {
226 icon = new ImageIcon(getURL());
227 if (icon.getIconWidth() < 1) {
228 icon = null;
229 isAnImage = false;
230 return null;
231 }
232 }
233 return icon;
234 }
235
236 /**
237 * Gets a ResizableIcon.

Callers 2

getResizableIconMethod · 0.95
getImageMethod · 0.95

Calls 2

getURLMethod · 0.95
getIconWidthMethod · 0.45

Tested by

no test coverage detected