01: /*
02: * @(#)XertoJideButtonUI.java 5/6/2005
03: *
04: * Copyright 2002 - 2005 JIDE Software Inc. All rights reserved.
05: */
06: package com.jidesoft.plaf.xerto;
07:
08: import com.jidesoft.plaf.basic.BasicJideButtonUI;
09: import com.sun.java.swing.plaf.windows.WindowsButtonUI;
10:
11: import javax.swing.*;
12: import javax.swing.plaf.ComponentUI;
13: import java.awt.*;
14:
15: /**
16: */
17: public class XertoJideButtonUI extends BasicJideButtonUI {
18: private static WindowsButtonUI _buttonUI = new WindowsButtonUI();
19:
20: public static ComponentUI createUI(JComponent c) {
21: return new XertoJideButtonUI();
22: }
23:
24: // ********************************
25: // Install PLAF
26: // ********************************
27: @Override
28: public void installUI(JComponent c) {
29: _buttonUI.installUI(c);
30: if (c instanceof JButton) {
31: ((JButton) c).setBorder(BorderFactory.createEmptyBorder(3,
32: 3, 3, 3));
33: ((JButton) c).setRolloverEnabled(true);
34: }
35: }
36:
37: @Override
38: public void uninstallUI(JComponent c) {
39: _buttonUI.uninstallUI(c);
40: }
41:
42: @Override
43: public void paint(Graphics g, JComponent c) {
44: _buttonUI.paint(g, c);
45: }
46: }
|