if (icon == null) {
final BufferedImage image = new BufferedImage(IconSize.width,
IconSize.height, BufferedImage.TYPE_INT_ARGB);
final Graphics2D g2 = (Graphics2D) image.getGraphics();
g2.setBackground(new Color(255, 255, 255, 0)); // transparent
g2.clearRect(0, 0, IconSize.width, IconSize.height);
g2.translate(IconSize.width / 2, IconSize.height / 2);
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BILINEAR);