KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)SynthToggleButtonUI.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 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 ToggleButtonUI.
19  * <p>
20  * @version 1.6, 12/19/03
21  * @author Jeff Dinkins
22  */

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