equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
303 } |
303 } |
304 } |
304 } |
305 return border; |
305 return border; |
306 } |
306 } |
307 |
307 |
|
308 @SuppressWarnings("serial") // Superclass is not serializable across versions |
308 private class XPFillBorder extends LineBorder implements UIResource { |
309 private class XPFillBorder extends LineBorder implements UIResource { |
309 XPFillBorder(Color color, int thickness) { |
310 XPFillBorder(Color color, int thickness) { |
310 super(color, thickness); |
311 super(color, thickness); |
311 } |
312 } |
312 |
313 |
331 |
332 |
332 return insets; |
333 return insets; |
333 } |
334 } |
334 } |
335 } |
335 |
336 |
|
337 @SuppressWarnings("serial") // Superclass is not serializable across versions |
336 private class XPStatefulFillBorder extends XPFillBorder { |
338 private class XPStatefulFillBorder extends XPFillBorder { |
337 private final Part part; |
339 private final Part part; |
338 private final Prop prop; |
340 private final Prop prop; |
339 XPStatefulFillBorder(Color color, int thickness, Part part, Prop prop) { |
341 XPStatefulFillBorder(Color color, int thickness, Part part, Prop prop) { |
340 super(color, thickness); |
342 super(color, thickness); |
358 lineColor = getColor(c, part, state, prop, Color.black); |
360 lineColor = getColor(c, part, state, prop, Color.black); |
359 super.paintBorder(c, g, x, y, width, height); |
361 super.paintBorder(c, g, x, y, width, height); |
360 } |
362 } |
361 } |
363 } |
362 |
364 |
|
365 @SuppressWarnings("serial") // Superclass is not serializable across versions |
363 private class XPImageBorder extends AbstractBorder implements UIResource { |
366 private class XPImageBorder extends AbstractBorder implements UIResource { |
364 Skin skin; |
367 Skin skin; |
365 |
368 |
366 XPImageBorder(Component c, Part part) { |
369 XPImageBorder(Component c, Part part) { |
367 this.skin = getSkin(c, part); |
370 this.skin = getSkin(c, part); |
397 |
400 |
398 return insets; |
401 return insets; |
399 } |
402 } |
400 } |
403 } |
401 |
404 |
|
405 @SuppressWarnings("serial") // Superclass is not serializable across versions |
402 private class XPEmptyBorder extends EmptyBorder implements UIResource { |
406 private class XPEmptyBorder extends EmptyBorder implements UIResource { |
403 XPEmptyBorder(Insets m) { |
407 XPEmptyBorder(Insets m) { |
404 super(m.top+2, m.left+2, m.bottom+2, m.right+2); |
408 super(m.top+2, m.left+2, m.bottom+2, m.right+2); |
405 } |
409 } |
406 |
410 |
672 GraphicsConfiguration config, Object[] args) { |
676 GraphicsConfiguration config, Object[] args) { |
673 return new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); |
677 return new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); |
674 } |
678 } |
675 } |
679 } |
676 |
680 |
|
681 @SuppressWarnings("serial") // Superclass is not serializable across versions |
677 static class GlyphButton extends JButton { |
682 static class GlyphButton extends JButton { |
678 private Skin skin; |
683 private Skin skin; |
679 |
684 |
680 public GlyphButton(Component parent, Part part) { |
685 public GlyphButton(Component parent, Part part) { |
681 XPStyle xp = getXP(); |
686 XPStyle xp = getXP(); |