KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)SynthRadioButtonUI.java 1.8 04/04/16
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 java.awt.*;
11 import java.awt.event.*;
12 import javax.swing.*;
13 import javax.swing.border.*;
14 import javax.swing.plaf.*;
15 import javax.swing.text.View JavaDoc;
16
17 /**
18  * Synth's RadioButtonUI.
19  *
20  * @version 1.8, 04/16/04
21  * @author Jeff Dinkins
22  */

23 class SynthRadioButtonUI extends SynthToggleButtonUI JavaDoc {
24
25     // ********************************
26
// Create PLAF
27
// ********************************
28
public static ComponentUI createUI(JComponent b) {
29         return new SynthRadioButtonUI JavaDoc();
30     }
31
32     protected String JavaDoc getPropertyPrefix() {
33         return "RadioButton.";
34     }
35
36     /**
37      * Returns the Icon used in calculating the pref/min/max size.
38      */

39     protected Icon getSizingIcon(AbstractButton b) {
40         return getIcon(b);
41     }
42
43     void paintBackground(SynthContext JavaDoc context, Graphics g, JComponent c) {
44         context.getPainter().paintRadioButtonBackground(context, g, 0, 0,
45                                                 c.getWidth(), c.getHeight());
46     }
47
48     public void paintBorder(SynthContext JavaDoc context, Graphics g, int x,
49                             int y, int w, int h) {
50         context.getPainter().paintRadioButtonBorder(context, g, x, y, w, h);
51     }
52 }
53
Popular Tags