// Get the colorizing filter
int[] targetColors = _getTargetColors(requestedProperties);
ImageFilter filter = new ColorizingFilter(_SOURCE_COLORS, targetColors);
Toolkit toolkit = Toolkit.getDefaultToolkit();
ImageProducer producer = icon.getSource();
// If direction is RTL, flip the source image
if (_isRightToLeft(context))
producer = new FilteredImageSource(producer, new MirrorImageFilter());