()
| 99 | } |
| 100 | |
| 101 | public Image asJavaFX() |
| 102 | { |
| 103 | String fileName = RESOURCE_URL + name() + extension; |
| 104 | final URL iconURL = getClass().getResource(fileName); |
| 105 | if (iconURL == null) |
| 106 | { |
| 107 | throw new RuntimeException("invalid image: " + fileName); |
| 108 | } |
| 109 | return new Image(iconURL.toExternalForm()); |
| 110 | } |
| 111 | } |