/*
* 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.
*/
/**
*/
// Tutorial:
// Themes:
getUserTheme(),
"blueprint",
"Bluecurve",
"Crux",
"SwingFallbackTheme"
};
static {
try {
} catch (FileNotFoundException ex) {
} catch (IOException ex) {
} catch (ParserConfigurationException ex) {
} catch (SAXException ex) {
}
}
break;
}
}
throw new Error("Could not find any installed metacity theme, and fallback failed");
}
}
private static boolean errorLogged = false;
// Reusable clip shape object
protected Metacity(String themeName) throws IOException, ParserConfigurationException, SAXException {
}
} else {
throw new FileNotFoundException(themeName);
}
// Initialize constants
for (int i = 0; i < n; i++) {
try {
} catch (NumberFormatException ex) {
// Ignore bad value
}
}
}
}
// Cache frame geometries
for (int i = 0; i < n; i++) {
}
for (int j = 0; j < nc; j++) {
} else {
}
}
}
}
}
}
}
return INSTANCE.titlePaneLayout;
}
if (roundedClipShape == null) {
roundedClipShape = new RoundRectClipShape();
}
return roundedClipShape;
}
if (titlePaneParent instanceof JInternalFrame) {
} else {
return;
}
state = "pressed";
state = "prelight";
}
boolean left_corner = false;
boolean right_corner = false;
if (buttonName == "InternalFrameTitlePane.menuButton") {
function = "menu";
location = "left_left";
left_corner = true;
} else if (buttonName == "InternalFrameTitlePane.iconifyButton") {
function = "minimize";
switch (nButtons) {
}
} else if (buttonName == "InternalFrameTitlePane.maximizeButton") {
function = "maximize";
} else if (buttonName == "InternalFrameTitlePane.closeButton") {
function = "close";
right_corner = true;
location = "right_right";
}
});
});
if (frame_style != null) {
if (right_corner) {
} else {
}
}
}
}
}
}
if (buttonNode != null) {
if (draw_ops_name != null) {
} else {
}
}
}
return;
}
if (comp instanceof JInternalFrame) {
} else {
assert false : "component is not JInternalFrame or JInternalFrame.JDesktopIcon";
return;
}
// These don't seem to apply here, but the Galaxy theme uses them. Not sure why.
if (frame_style_set != null) {
});
});
if (frame_style != null) {
}
if (!minimized) {
}
jif);
if (!minimized) {
}
}
}
}
}
private int type;
return AccessController.doPrivileged(this);
}
if (type == GET_THEME_DIR) {
};
// System property may not be set so skip null directories.
continue;
}
try {
} catch (MalformedURLException ex) {
}
break;
}
}
try {
} catch (MalformedURLException ex) {
}
}
}
return themeDir;
} else if (type == GET_USER_THEME) {
try {
// Set userHome here because we need the privilege
return theme;
}
// Note: this is a small file (< 1024 bytes) so it's not worth
// starting an XML parser or even to use a buffered reader.
// Pending: verify character encoding spec for gconf
char[] buf = new char[1024];
int n;
}
if (i >= 0) {
if (i > 0) {
i += "<stringvalue>".length();
}
}
}
} catch (MalformedURLException ex) {
// OK to just ignore. We'll use a fallback theme.
} catch (IOException ex) {
// OK to just ignore. We'll use a fallback theme.
}
return null;
} else {
return null;
}
}
}
}
}
int y = y0;
while (y < y0 + h) {
int x = x0;
while (x < x0 + w) {
int i = (int)f;
f -= (int)f;
}
x += swm;
}
y += sh;
}
}
}
}
return image;
}
try {
} catch (MalformedURLException ex) {
//log("Bad image url: "+ themeDir + "/" + key);
}
}
}
}
return image;
}
public ColorizeImageFilter() {
canFilterIndexColorModel = true;
}
}
setColor(c);
}
// Assume all rgb values are shades of gray
double r, g, b;
if (grayLevel <= 1.0) {
} else {
grayLevel -= 1.0;
}
return ((rgb & 0xff000000) +
(((int)(r * 255)) << 16) +
(((int)(g * 255)) << 8) +
(int)(b * 255));
}
}
int n = parent.getComponentCount();
for (int i = 0; i < n; i++) {
return c;
}
}
return null;
}
return minimumLayoutSize(c);
}
if (titlePaneParent instanceof JInternalFrame) {
} else {
return null;
}
// Calculate width.
if (title_border != null) {
}
if (frame.isClosable()) {
}
if (frame.isMaximizable()) {
}
if (frame.isIconifiable()) {
}
// Leave room for three characters in the title.
if (title_length > 3) {
} else {
}
// Calculate height.
if (title_border != null) {
}
if (button_border != null) {
}
}
if (titlePaneParent instanceof JInternalFrame) {
} else {
return;
}
int x = getInt("left_titlebar_edge");
if (button_border != null) {
x -= button_border.right;
}
if (frame.isClosable()) {
}
if (frame.isMaximizable()) {
}
if (frame.isIconifiable()) {
}
} else {
x = getInt("left_titlebar_edge");
if (button_border != null) {
x += button_border.left;
}
if (frame.isClosable()) {
}
if (frame.isMaximizable()) {
}
if (frame.isIconifiable()) {
}
}
}
} // end TitlePaneLayout
return frameGeometry;
}
this.frameGeometry = gm;
}
}
if (i == null) {
}
}
}
x -= w;
}
y -= h;
}
if (filled) {
} else {
}
}
if (lineWidth != 1) {
} else {
}
}
x -= w;
}
y -= h;
}
if (filled) {
g.fillRect(x, y, w, h);
} else {
g.drawRect(x, y, w, h);
}
}
if (width == -1) {
x0 -= w;
}
if (height == -1) {
y0 -= h;
}
if (g instanceof Graphics2D) {
}
int y = y0;
while (y < y0 + h) {
int x = x0;
while (x < x0 + w) {
g.translate(x, y);
g.translate(-x, -y);
x += tw;
}
y += th;
}
}
x -= w;
}
y -= h;
}
if (g instanceof Graphics2D) {
}
}
if (i > 0) {
}
}
}
if (buttonHeight == 0) {
if (buttonHeight == 0) {
buttonHeight = 13;
} else {
if (button_border != null) {
}
}
}
if (buttonWidth == 0) {
if (aspect_ratio != null) {
}
}
}
r.x = getInt("left_titlebar_edge");
r.y = 0;
if (title_border != null) {
r.x += title_border.left;
r.y += title_border.top;
}
if (button_border != null) {
r.x += button_border.left;
}
if (jif.isClosable()) {
}
if (jif.isMaximizable()) {
}
if (jif.isIconifiable()) {
}
} else {
if (jif.isClosable()) {
}
if (jif.isMaximizable()) {
}
if (jif.isIconifiable()) {
}
if (button_border != null) {
r.x -= button_border.right;
}
}
if (title_border != null) {
}
return r;
}
}
return 0;
}
x -= w;
}
y -= h;
}
if (g instanceof Graphics2D) {
}
}
int state = -1;
state = MOUSE_OVER;
}
}
}
}
int state = -1;
state = MOUSE_OVER;
}
}
}
int state = -1;
state = MOUSE_OVER;
}
}
x -= w;
}
y -= h;
}
// Get colors from child nodes
}
if (g instanceof Graphics2D) {
if (alpha >= 0F) {
}
for (int i = 0; i < n; i++) {
y + (vertical ? (i*h/n) : 0),
colors[i],
colors[i+1]));
y + (vertical ? (i*h/n) : 0),
(horizontal ? (w/n) : w),
(vertical ? (h/n) : h));
}
}
}
x -= w;
}
y -= h;
}
}
} else {
if (g instanceof Graphics2D) {
}
}
} else {
}
}
return;
}
x -= w;
}
y -= h;
}
if (g instanceof Graphics2D) {
}
} else {
}
}
if (w != -1) {
}
if (h != -1) {
}
});
g.translate(x, y);
g.translate(-x, -y);
if (w != -1) {
}
if (h != -1) {
}
}
try {
drawGradient(child, g);
drawGTKArrow(child, g);
drawGTKBox(child, g);
drawGTKVLine(child, g);
drawRectangle(child, g);
} else {
}
} catch (NumberFormatException ex) {
}
}
}
}
}
}
if (draw_ops_name != null) {
} else {
}
g.translate(x, y);
g.translate(-x, -y);
}
}
}
return insets;
}
if (comp instanceof JInternalFrame) {
} else {
assert false : "component is not JInternalFrame or JInternalFrame.JDesktopIcon";
return;
}
if (frame_style_set == null) {
}
if (frame_style_set == null) {
}
}
if (frame_style_set != null) {
});
});
if (frame_style != null) {
}
}
}
}
}
if (!errorLogged) {
errorLogged = true;
}
}
// XML Parsing
throws IOException,
if (documentBuilder == null) {
}
public InputStream run() {
try {
} catch (IOException ex) {
return null;
}
}
});
if (inputStream != null) {
}
return doc;
}
for (int i=0; i < n; i++) {
}
}
}
}
}
if (inheritFrom != null) {
if (inheritFromNode != null) {
}
}
}
return node;
}
for (int i=0; i < n; i++) {
boolean matches = true;
for (int a = 0; a < nAttrs; a++) {
matches = false;
break;
}
}
if (matches) {
return node;
}
}
} else {
return node;
}
}
}
return null;
}
if (inheritFrom != null) {
node.getNodeName(),
if (inheritFromNode != null) {
}
}
}
}
return value;
}
}
}
return fallback;
}
try {
} catch (NumberFormatException ex) {
}
}
return value;
}
try {
} catch (NumberFormatException ex) {
}
}
return value;
}
int n = tokenizer.countTokens();
if (n > 1) {
assert (n == 3);
assert (n == 4);
if (alpha > 1.0f) {
}
} else {
return null;
}
} else {
return parseColor2(str);
}
}
if (i1 > 3) {
int state = -1;
state = MOUSE_OVER;
}
}
}
}
}
}
if (c == null) {
c = parseColorString(str);
}
return c;
}
if (i < 3 || i > 12 || (i % 3) != 0) {
return null;
}
i /= 3;
int r;
int g;
int b;
try {
} catch (NumberFormatException nfe) {
return null;
}
if (i == 4) {
} else if (i == 1) {
} else if (i == 2) {
return new ColorUIResource(r, g, b);
} else {
}
} else {
}
}
class ArithmeticExpressionEvaluator {
}
}
public float expression() {
float value = getTermValue();
boolean done = false;
float value2 = getTermValue();
}
} else {
done = true;
}
}
return value;
}
public float getTermValue() {
float value = getFactorValue();
boolean done = false;
float value2 = getFactorValue();
} else {
}
} else {
done = true;
}
}
return value;
}
public float getFactorValue() {
float value;
value = expression();
} else {
} else {
if (i == null) {
}
if (i == null) {
return 0;
}
}
}
return value;
}
}
boolean returnDelims) {
peek();
}
}
return token;
}
public boolean hasMoreTokens() {
}
if (hasMoreTokens()) {
peek();
}
return t;
} else {
&& hasMoreTokens()) {
}
return token;
}
}
}
int x;
int y;
int width;
int height;
int arcwidth;
int archeight;
int corners;
public RoundRectClipShape() {
}
public RoundRectClipShape(int x, int y, int w, int h,
}
public void setRoundedRect(int x, int y, int w, int h,
this.x = x;
this.y = y;
this.width = w;
this.height = h;
}
public double getX() {
return (double)x;
}
public double getY() {
return (double)y;
}
public double getWidth() {
return (double)width;
}
public double getHeight() {
return (double)height;
}
public double getArcWidth() {
return (double)arcwidth;
}
public double getArcHeight() {
return (double)archeight;
}
public boolean isEmpty() {
return false; // Not called
}
return null; // Not called
}
public int getCornerFlags() {
return corners;
}
public void setFrame(double x, double y, double w, double h) {
// Not called
}
public boolean contains(double x, double y) {
return false; // Not called
}
return 0; // Not called
}
public boolean intersects(double x, double y, double w, double h) {
return false; // Not called
}
public boolean contains(double x, double y, double w, double h) {
return false; // Not called
}
return new RoundishRectIterator(this, at);
}
int index;
double ctrlpts[][];
int types[];
// For each array:
// 4 values for each point {v0, v1, v2, v3}:
// point = (x + v0 * w + v1 * arcWidth,
// y + v2 * h + v3 * arcHeight);
private static final double CtrlPtTemplate[][] = {
{ 0.0, 0.0, 1.0, 0.0 }, /* BOTTOM LEFT corner */
{ 0.0, 0.0, 1.0, -0.5 }, /* BOTTOM LEFT arc start */
0.0, 0.5, 1.0, 0.0 },
{ 1.0, 0.0, 1.0, 0.0 }, /* BOTTOM RIGHT corner */
{ 1.0, -0.5, 1.0, 0.0 }, /* BOTTOM RIGHT arc start */
1.0, 0.0, 1.0, -0.5 },
{ 1.0, 0.0, 0.0, 0.0 }, /* TOP RIGHT corner */
{ 1.0, 0.0, 0.0, 0.5 }, /* TOP RIGHT arc start */
1.0, -0.5, 0.0, 0.0 },
{ 0.0, 0.0, 0.0, 0.0 }, /* TOP LEFT corner */
{ 0.0, 0.5, 0.0, 0.0 }, /* TOP LEFT arc start */
0.0, 0.0, 0.0, 0.5 },
{}, /* Closing path element */
};
private static final int CornerFlags[] = {
};
if (w < 0 || h < 0) {
// Don't draw anything...
ctrlpts = new double[0][];
types = new int[0];
} else {
for (int i = 1; i < 0x10; i <<= 1) {
// Add one for each corner that has a curve
}
int j = 0;
for (int i = 0; i < 4; i++) {
types[j] = SEG_LINETO;
} else {
types[j] = SEG_CUBICTO;
}
}
}
}
public int getWindingRule() {
return WIND_NON_ZERO;
}
public boolean isDone() {
}
public void next() {
index++;
}
if (isDone()) {
throw new NoSuchElementException("roundrect iterator out of bounds");
}
int nc = 0;
}
}
}
if (isDone()) {
throw new NoSuchElementException("roundrect iterator out of bounds");
}
int nc = 0;
}
}
}
}
}
}