01: /*
02: * Copyright 2005 Patrick Gotthardt
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package com.pagosoft.plaf;
17:
18: import javax.swing.*;
19: import javax.swing.plaf.*;
20: import javax.swing.plaf.basic.*;
21: import javax.swing.plaf.metal.*;
22: import java.awt.*;
23:
24: public class PgsCheckBoxUI extends MetalCheckBoxUI {
25: private final static PgsCheckBoxUI checkboxUI = new PgsCheckBoxUI();
26:
27: public static ComponentUI createUI(JComponent b) {
28: return checkboxUI;
29: }
30:
31: protected BasicButtonListener createButtonListener(AbstractButton b) {
32: return new RolloverButtonListener(b);
33: }
34:
35: public synchronized void paint(Graphics g, JComponent c) {
36: PgsUtils.installAntialiasing(g);
37: super.paint(g, c);
38: PgsUtils.uninstallAntialiasing(g);
39: }
40: }
|