MCPcopy Index your code
hub / github.com/processing/processing / loadIcon

Method loadIcon

app/src/processing/app/Mode.java:735–746  ·  view source on GitHub ↗

Get an ImageIcon object from the Mode folder. Or when prefixed with /lib, load it from the main /lib folder. @since 3.0a6

(String filename)

Source from the content-addressed store, hash-verified

733 * @since 3.0a6
734 */
735 public ImageIcon loadIcon(String filename) {
736 if (filename.startsWith("/lib/")) {
737 return Toolkit.getLibIcon(filename.substring(5));
738 }
739 File file = new File(folder, filename);
740 if (!file.exists()) {
741// EditorConsole.systemErr.println("file does not exist: " + file.getAbsolutePath());
742 return null;
743 }
744// EditorConsole.systemErr.println("found: " + file.getAbsolutePath());
745 return new ImageIcon(file.getAbsolutePath());
746 }
747
748
749 /**

Callers 1

loadImageMethod · 0.95

Calls 2

getLibIconMethod · 0.95
startsWithMethod · 0.80

Tested by

no test coverage detected