author | alexsch |
Wed, 18 Nov 2015 19:13:42 +0400 | |
changeset 34407 | 2b40f400a30b |
parent 25859 | 3317bb8137f4 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
23010
6dadb192ad81
8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents:
20168
diff
changeset
|
2 |
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
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 |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package javax.swing.plaf.synth; |
|
27 |
||
4394 | 28 |
import javax.swing.JComponent; |
29 |
import java.awt.Graphics; |
|
30 |
import javax.swing.plaf.ComponentUI; |
|
2 | 31 |
|
32 |
||
33 |
/** |
|
20168
137788883a22
8025070: [javadoc] fix some javadoc errors in javax/swing/plaf/synth
alexsch
parents:
5506
diff
changeset
|
34 |
* Provides the Synth L&F UI delegate for |
4394 | 35 |
* {@link javax.swing.JCheckBox}. |
2 | 36 |
* |
37 |
* @author Jeff Dinkins |
|
4394 | 38 |
* @since 1.7 |
2 | 39 |
*/ |
4394 | 40 |
public class SynthCheckBoxUI extends SynthRadioButtonUI { |
2 | 41 |
|
42 |
// ******************************** |
|
43 |
// Create PLAF |
|
44 |
// ******************************** |
|
4394 | 45 |
/** |
46 |
* Creates a new UI object for the given component. |
|
47 |
* |
|
48 |
* @param b component to create UI object for |
|
49 |
* @return the UI object |
|
50 |
*/ |
|
2 | 51 |
public static ComponentUI createUI(JComponent b) { |
52 |
return new SynthCheckBoxUI(); |
|
53 |
} |
|
54 |
||
4394 | 55 |
/** |
20168
137788883a22
8025070: [javadoc] fix some javadoc errors in javax/swing/plaf/synth
alexsch
parents:
5506
diff
changeset
|
56 |
* {@inheritDoc} |
4394 | 57 |
*/ |
58 |
@Override |
|
2 | 59 |
protected String getPropertyPrefix() { |
60 |
return "CheckBox."; |
|
61 |
} |
|
62 |
||
4394 | 63 |
@Override |
2 | 64 |
void paintBackground(SynthContext context, Graphics g, JComponent c) { |
65 |
context.getPainter().paintCheckBoxBackground(context, g, 0, 0, |
|
66 |
c.getWidth(), c.getHeight()); |
|
67 |
} |
|
68 |
||
4394 | 69 |
/** |
20168
137788883a22
8025070: [javadoc] fix some javadoc errors in javax/swing/plaf/synth
alexsch
parents:
5506
diff
changeset
|
70 |
* {@inheritDoc} |
4394 | 71 |
*/ |
72 |
@Override |
|
2 | 73 |
public void paintBorder(SynthContext context, Graphics g, int x, |
74 |
int y, int w, int h) { |
|
75 |
context.getPainter().paintCheckBoxBorder(context, g, x, y, w, h); |
|
76 |
} |
|
77 |
} |