/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public class AquaUtils {
/*
* Convenience function for determining ComponentOrientation. Helps us
* avoid having Munge directives throughout the code.
*/
return c.getComponentOrientation().isLeftToRight();
}
if (c instanceof Container) {
}
}
}
try {
getCreatorMethod.setAccessible(true);
} catch (final Exception e) {
return null;
}
}
});
}
private static final RecyclableSingleton<CImage.Creator> cImageCreator = new RecyclableSingleton<CImage.Creator>() {
protected Creator getInstance() {
return getCImageCreatorInternal();
}
};
return cImageCreator.get();
}
int getGreyFor(final int gray) {
}
});
}
int getGreyFor(final int gray) {
}
});
}
}
public IconImageFilter() {
super();
canFilterIndexColorModel = true;
}
return (rgb & 0xff000000) | (grayTransform(red, gray) << 16) | (grayTransform(green, gray) << 8) | (grayTransform(blue, gray) << 0);
}
return result;
}
}
public abstract static class RecyclableObject<T> {
public T get() {
return referent;
}
protected abstract T create();
}
public abstract static class RecyclableSingleton<T> {
public T get() {
}
final T object = getInstance();
return object;
}
public void reset() {
appContext.remove(this);
}
protected abstract T getInstance();
}
}
protected T getInstance() {
try {
return clazz.newInstance();
} catch (final InstantiationException e) {
e.printStackTrace();
} catch (final IllegalAccessException e) {
e.printStackTrace();
}
return null;
}
}
public abstract static class LazyKeyedSingleton<K, V> {
return value;
}
}
protected Boolean getInstance() {
final String sizeProperty = (String)java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.GetPropertyAction(ANIMATIONS_SYSTEM_PROPERTY));
}
};
static boolean animationsEnabled() {
return enableAnimations.get();
}
if (!animationsEnabled()) return;
try {
selectable.paintSelected(false);
selectable.paintSelected(true);
} catch (final InterruptedException e) { }
}
interface Selectable {
}
interface JComponentPainter {
}
interface Painter {
}
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) {
g.setColor(shadowColor);
}
final int offsetX;
final int offsetY;
final float distance;
final int blur;
public ShadowBorder(final Painter prePainter, final Painter postPainter, final int offsetX, final int offsetY, final float distance, final float intensity, final int blur) {
this.insets = new Insets(halfBlur - offsetY, halfBlur - offsetX, halfBlur + offsetY, halfBlur + offsetX);
}
public boolean isBorderOpaque() {
return false;
}
return insets;
}
public void paintBorder(final Component c, final Graphics g, final int x, final int y, final int width, final int height) {
final BufferedImage img = new BufferedImage(width + blur * 2, height + blur * 2, BufferedImage.TYPE_INT_ARGB_PRE);
// debugFrame("border", img);
}
protected void paintToImage(final BufferedImage img, final int x, final int y, final int width, final int height) {
// clear the prior image
// let the delegate paint whatever they want to be blurred
// blur the prior image back into the same pixels
imgG.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
imgG.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
}
}
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) {
final BufferedImage i = new BufferedImage(templateWidth, templateHeight, BufferedImage.TYPE_INT_ARGB_PRE);
// debugFrame("slices", i);
}
public void paintBorder(final Component c, final Graphics g, final int x, final int y, final int width, final int height) {
}
}
public interface NineSliceMetricsProvider {
}
// static void debugFrame(String name, Image image) {
// JFrame f = new JFrame(name);
// f.setContentPane(new JLabel(new ImageIcon(image)));
// f.pack();
// f.setVisible(true);
// }
// special casing naughty applications, like InstallAnywhere
// <rdar://problem/4851533> REGR: JButton: Myst IV: the buttons of 1.0.3 updater have redraw issue
static boolean shouldUseOpaqueButtons() {
if (classExists(launcherClassLoader, "com.installshield.wizard.platform.macosx.MacOSXUtils")) return true;
return false;
}
try {
} catch (final Throwable e) { }
return false;
}
private static RecyclableSingleton<Method> getJComponentGetFlagMethod = new RecyclableSingleton<Method>() {
protected Method getInstance() {
new PrivilegedAction<Method>() {
try {
method.setAccessible(true);
return method;
} catch (final Throwable e) {
return null;
}
}
}
);
}
};
private static final Integer OPAQUE_SET_FLAG = new Integer(24); // private int JComponent.OPAQUE_SET
try {
} catch (final Throwable e) {
return false;
}
}
if (!(c instanceof JComponent)) {
return false;
}
return false;
}
}
}
}
}
final int w, final int h) {
if (!(g instanceof Graphics2D)) {
return;
}
try {
} else {
}
} finally {
}
}
}