1. /*
  2. * @(#)FontUIResource.java 1.14 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. package javax.swing.plaf;
  8. import java.awt.Font;
  9. import javax.swing.plaf.UIResource;
  10. /**
  11. * A subclass of java.awt.Font that implements UIResource.
  12. * UI classes which set default font properties should use
  13. * this class.
  14. * <p>
  15. * <strong>Warning:</strong>
  16. * Serialized objects of this class will not be compatible with
  17. * future Swing releases. The current serialization support is
  18. * appropriate for short term storage or RMI between applications running
  19. * the same version of Swing. As of 1.4, support for long term storage
  20. * of all JavaBeans<sup><font size="-2">TM</font></sup>
  21. * has been added to the <code>java.beans</code> package.
  22. * Please see {@link java.beans.XMLEncoder}.
  23. *
  24. * @see javax.swing.plaf.UIResource
  25. * @version 1.14 12/19/03
  26. * @author Hans Muller
  27. *
  28. */
  29. public class FontUIResource extends Font implements UIResource
  30. {
  31. public FontUIResource(String name, int style, int size) {
  32. super(name, style, size);
  33. }
  34. public FontUIResource(Font font) {
  35. super(font.getName(), font.getStyle(), font.getSize());
  36. }
  37. }