/** * Retrieves stripe image. * * @param baseSize * Stripe base in pixels. * @param isRotated * if <code>true</code>, the resulting stripe image will be * rotated. * @param colorScheme * Color scheme to paint the stripe image. * @return Stripe image. */ private static BufferedImage getStripe(int baseSize, boolean isRotated, SubstanceColorScheme colorScheme) { HashMapKey key = SubstanceCoreUtilities.getHashKey(baseSize, isRotated, colorScheme.getDisplayName()); BufferedImage result = SubstanceProgressBarUI.stripeMap.get(key); if (result == null) { result = SubstanceImageCreator.getStripe(baseSize, colorScheme .getUltraLightColor()); if (isRotated) { result = SubstanceImageCreator.getRotated(result, 1); } SubstanceProgressBarUI.stripeMap.put(key, result); } return result; }
/** * Retrieves stripe image. * * @param baseSize * Stripe base in pixels. * @param isRotated * if <code>true</code>, the resulting stripe image will be * rotated. * @param colorScheme * Color scheme to paint the stripe image. * @return Stripe image. */ private static BufferedImage getStripe(int baseSize, boolean isRotated, SubstanceColorScheme colorScheme) { HashMapKey key = SubstanceCoreUtilities.getHashKey(baseSize, isRotated, colorScheme.getDisplayName()); BufferedImage result = SubstanceProgressBarUI.stripeMap.get(key); if (result == null) { result = SubstanceImageCreator.getStripe(baseSize, colorScheme .getUltraLightColor()); if (isRotated) { result = SubstanceImageCreator.getRotated(result, 1); } SubstanceProgressBarUI.stripeMap.put(key, result); } return result; }