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. package javax.swing.plaf.synth;
  8. import java.awt.*;
  9. import java.awt.event.*;
  10. import javax.swing.*;
  11. import javax.swing.border.*;
  12. import javax.swing.plaf.*;
  13. import javax.swing.text.View;
  14. /**
  15. * Synth's RadioButtonUI.
  16. *
  17. * @version 1.8, 04/16/04
  18. * @author Jeff Dinkins
  19. */
  20. class SynthRadioButtonUI extends SynthToggleButtonUI {
  21. // ********************************
  22. // Create PLAF
  23. // ********************************
  24. public static ComponentUI createUI(JComponent b) {
  25. return new SynthRadioButtonUI();
  26. }
  27. protected String getPropertyPrefix() {
  28. return "RadioButton.";
  29. }
  30. /**
  31. * Returns the Icon used in calculating the pref/min/max size.
  32. */
  33. protected Icon getSizingIcon(AbstractButton b) {
  34. return getIcon(b);
  35. }
  36. void paintBackground(SynthContext context, Graphics g, JComponent c) {
  37. context.getPainter().paintRadioButtonBackground(context, g, 0, 0,
  38. c.getWidth(), c.getHeight());
  39. }
  40. public void paintBorder(SynthContext context, Graphics g, int x,
  41. int y, int w, int h) {
  42. context.getPainter().paintRadioButtonBorder(context, g, x, y, w, h);
  43. }
  44. }