KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > swing > plaf > synth > SynthCheckBoxUI


1 /*
2  * @(#)SynthCheckBoxUI.java 1.6 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.swing.plaf.synth;
9
10 import javax.swing.*;
11 import java.awt.*;
12 import java.awt.event.*;
13 import javax.swing.plaf.*;
14 import java.io.Serializable JavaDoc;
15
16
17 /**
18  * Synth's CheckBoxUI.
19  *
20  * @version 1.6, 12/19/03
21  * @author Jeff Dinkins
22  */

23 class SynthCheckBoxUI extends SynthRadioButtonUI JavaDoc {
24
25     // ********************************
26
// Create PLAF
27
// ********************************
28
public static ComponentUI createUI(JComponent b) {
29         return new SynthCheckBoxUI JavaDoc();
30     }
31
32     protected String JavaDoc getPropertyPrefix() {
33     return "CheckBox.";
34     }
35
36     void paintBackground(SynthContext JavaDoc context, Graphics g, JComponent c) {
37         context.getPainter().paintCheckBoxBackground(context, g, 0, 0,
38                                                   c.getWidth(), c.getHeight());
39     }
40
41     public void paintBorder(SynthContext JavaDoc context, Graphics g, int x,
42                             int y, int w, int h) {
43         context.getPainter().paintCheckBoxBorder(context, g, x, y, w, h);
44     }
45 }
46
Popular Tags