4632N/A public static void enforceComponentOrientation(Component c, ComponentOrientation orientation) {
4632N/A final Method getCreatorMethod = CImage.class.getDeclaredMethod("getCreator", new Class[] {});
4632N/A private static final RecyclableSingleton<CImage.Creator> cImageCreator = new RecyclableSingleton<CImage.Creator>() {
4632N/A return getCImageCreatorInternal();
4632N/A final ImageProducer prod = new FilteredImageSource(image.getSource(), new IconImageFilter() {
4632N/A final ImageProducer prod = new FilteredImageSource(image.getSource(), new IconImageFilter() {
4632N/A canFilterIndexColorModel = true;
4632N/A return (rgb & 0xff000000) | (grayTransform(red, gray) << 16) | (grayTransform(green, gray) << 8) | (grayTransform(blue, gray) << 0);
4632N/A public static class RecyclableSingletonFromDefaultConstructor<T> extends RecyclableSingleton<T> {
4632N/A } catch (final InstantiationException e) {
4632N/A e.printStackTrace();
4632N/A } catch (final IllegalAccessException e) {
4632N/A e.printStackTrace();
4632N/A static final RecyclableSingleton<Boolean> enableAnimations = new RecyclableSingleton<Boolean>() {
4632N/A final String sizeProperty = (String)java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.GetPropertyAction(ANIMATIONS_SYSTEM_PROPERTY));
4632N/A if (!animationsEnabled()) return;
4632N/A } catch (final InterruptedException e) { }
4632N/A public static void paintDropShadowText(final Graphics g, final JComponent c, final Font font, final FontMetrics metrics, final int x, final int y, final int offsetX, final int offsetY, final Color textColor, final Color shadowColor, final String text) {
4632N/A public ShadowBorder(final Painter prePainter, final Painter postPainter, final int offsetX, final int offsetY, final float distance, final float intensity, final int blur) {
4632N/A this.insets = new Insets(halfBlur - offsetY, halfBlur - offsetX, halfBlur + offsetY, halfBlur + offsetX);
4632N/A public void paintBorder(final Component c, final Graphics g, final int x, final int y, final int width, final int height) {
4632N/A final BufferedImage img = new BufferedImage(width + blur * 2, height + blur * 2, BufferedImage.TYPE_INT_ARGB_PRE);
4632N/A protected void paintToImage(final BufferedImage img, final int x, final int y, final int width, final int height) {
4632N/A imgG.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
4632N/A imgG.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
4632N/A public SlicedShadowBorder(final Painter prePainter, final Painter postPainter, final int offsetX, final int offsetY, final float distance, final float intensity, final int blur, final int templateWidth, final int templateHeight, final int leftCut, final int topCut, final int rightCut, final int bottomCut) {
4632N/A final BufferedImage i = new BufferedImage(templateWidth, templateHeight, BufferedImage.TYPE_INT_ARGB_PRE);
4632N/A public void paintBorder(final Component c, final Graphics g, final int x, final int y, final int width, final int height) {
4632N/A // <rdar://problem/4851533> REGR: JButton: Myst IV: the buttons of 1.0.3 updater have redraw issue
4632N/A if (classExists(launcherClassLoader, "com.installshield.wizard.platform.macosx.MacOSXUtils")) return true;
4632N/A private static RecyclableSingleton<Method> getJComponentGetFlagMethod = new RecyclableSingleton<Method>() {
4632N/A final Method method = JComponent.class.getDeclaredMethod("getFlag", new Class[] { int.class });
4632N/A private static final Integer OPAQUE_SET_FLAG = new Integer(24); // private int JComponent.OPAQUE_SET
5233N/A if (!(c instanceof JComponent)) {
5233N/A if (!(g instanceof Graphics2D)) {