@Test public void testIconScale_1x() { final Image img = ScalableIcon.FILE.getImage(1.0f); assertEquals(16, img.getWidth(null)); assertEquals(16, img.getHeight(null)); }
@Nullable public synchronized Image getImage(final double scale) { if (Double.compare(this.currentScaleFactor, scale) != 0) { this.scaledCachedImage = null; } if (this.scaledCachedImage == null) { this.scaledCachedImage = Utils.scaleImage(this.baseImage, this.baseScaleX, this.baseScaleY, scale); this.currentScaleFactor = scale; } return this.scaledCachedImage; }
ScalableIcon { @Nullable public synchronized Image getImage(final double scale) { if (Double.compare(this.currentScaleFactor, scale) != 0) { this.scaledCachedImage = null; } if (this.scaledCachedImage == null) { this.scaledCachedImage = Utils.scaleImage(this.baseImage, this.baseScaleX, this.baseScaleY, scale); this.currentScaleFactor = scale; } return this.scaledCachedImage; } }
ScalableIcon { @Nullable public synchronized Image getImage(final double scale) { if (Double.compare(this.currentScaleFactor, scale) != 0) { this.scaledCachedImage = null; } if (this.scaledCachedImage == null) { this.scaledCachedImage = Utils.scaleImage(this.baseImage, this.baseScaleX, this.baseScaleY, scale); this.currentScaleFactor = scale; } return this.scaledCachedImage; } ScalableIcon(@Nonnull final Image image); private  ScalableIcon(@Nonnull final String name); }
ScalableIcon { @Nullable public synchronized Image getImage(final double scale) { if (Double.compare(this.currentScaleFactor, scale) != 0) { this.scaledCachedImage = null; } if (this.scaledCachedImage == null) { this.scaledCachedImage = Utils.scaleImage(this.baseImage, this.baseScaleX, this.baseScaleY, scale); this.currentScaleFactor = scale; } return this.scaledCachedImage; } ScalableIcon(@Nonnull final Image image); private  ScalableIcon(@Nonnull final String name); @Nonnull static Image loadStandardImage(@Nonnull final String name); synchronized double getScaleFactor(); @Nullable synchronized Image getImage(final double scale); }
ScalableIcon { @Nullable public synchronized Image getImage(final double scale) { if (Double.compare(this.currentScaleFactor, scale) != 0) { this.scaledCachedImage = null; } if (this.scaledCachedImage == null) { this.scaledCachedImage = Utils.scaleImage(this.baseImage, this.baseScaleX, this.baseScaleY, scale); this.currentScaleFactor = scale; } return this.scaledCachedImage; } ScalableIcon(@Nonnull final Image image); private  ScalableIcon(@Nonnull final String name); @Nonnull static Image loadStandardImage(@Nonnull final String name); synchronized double getScaleFactor(); @Nullable synchronized Image getImage(final double scale); static final ScalableIcon FILE; static final ScalableIcon FILE_WARN; static final ScalableIcon FILE_MMD; static final ScalableIcon FILE_MMD_WARN; static final ScalableIcon FILE_PLANTUML; static final ScalableIcon FILE_PLANTUML_WARN; static final ScalableIcon TOPIC; static final ScalableIcon TEXT; static final ScalableIcon LINK; static final ScalableIcon LINK_EMAIL; static final int BASE_WIDTH; static final int BASE_HEIGHT; }