2362N/A * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * This is a dumping ground for random stuff we want to use in several places. 0N/A * @author Steve Wilson 0N/A * This draws the "Flush 3D Border" which is used throughout the Metal L&F 0N/A * This draws a variant "Flush 3D Border" 0N/A * It is used for things like pressed buttons. 0N/A * This draws a variant "Flush 3D Border" 0N/A * It is used for things like pressed buttons. 0N/A * This draws a variant "Flush 3D Border" 0N/A * It is used for things like active toggle buttons. 0N/A * This is used rarely. 0N/A * This draws a variant "Flush 3D Border" 0N/A * It is used for things like active toggle buttons. 0N/A * This is used rarely. 0N/A * Convenience function for determining ComponentOrientation. Helps us 0N/A * avoid having Munge directives throughout the code. 0N/A // Ocean specific stuff. 0N/A * Draws a radial type gradient. The gradient will be drawn vertically if 0N/A * <code>vertical</code> is true, otherwise horizontally. 0N/A * The UIManager key consists of five values: 0N/A * r1 r2 c1 c2 c3. The gradient is broken down into four chunks drawn 0N/A * in order from the origin. 0N/A * <li>Gradient r1 % of the size from c1 to c2 0N/A * <li>Rectangle r2 % of the size in c2. 0N/A * <li>Gradient r1 % of the size from c2 to c1 0N/A * <li>The remaining size will be filled with a gradient from c1 to c3. 0N/A * @param c Component rendering to 0N/A * @param g Graphics to draw to. 0N/A * @param key UIManager key used to look up gradient values. 0N/A * @param x X coordinate to draw from 0N/A * @param y Y coordinate to draw from 0N/A * @param w Width to draw to 0N/A * @param h Height to draw to 0N/A * @param vertical Direction of the gradient 0N/A * @return true if <code>key</code> exists, otherwise false. 0N/A if (w <=
0 || h <=
0) {
0N/A * Instance used for painting. This is the only instance that is 0N/A // Size of images to create. For vertical gradients this is the width, 0N/A // otherwise it's the height. 0N/A * This is the actual width we're painting in, or last painted to. 0N/A * This is the actual height we're painting in, or last painted to 0N/A // Render to the VolatileImage 0N/A // Render to the screen 0N/A (
float)
0, (
float)h,
c3));
0N/A * Returns true if the specified widget is in a toolbar. 0N/A * Used to create a disabled Icon with the ocean look. 0N/A // Coefficients are from the sRGB color space: 0N/A (
0.7154f * ((
rgb >>
8) &
0xFF)) +
0N/A * Used to create the rollover icons with the ocean look.