1. /*
  2. * @(#)BasicTextPaneUI.java 1.69 04/07/23
  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.basic;
  8. import java.awt.*;
  9. import java.awt.event.*;
  10. import java.beans.*;
  11. import javax.swing.*;
  12. import javax.swing.text.*;
  13. import javax.swing.plaf.*;
  14. import javax.swing.border.*;
  15. /**
  16. * Provides the look and feel for a styled text editor.
  17. * <p>
  18. * <strong>Warning:</strong>
  19. * Serialized objects of this class will not be compatible with
  20. * future Swing releases. The current serialization support is
  21. * appropriate for short term storage or RMI between applications running
  22. * the same version of Swing. As of 1.4, support for long term storage
  23. * of all JavaBeans<sup><font size="-2">TM</font></sup>
  24. * has been added to the <code>java.beans</code> package.
  25. * Please see {@link java.beans.XMLEncoder}.
  26. *
  27. * @author Timothy Prinzing
  28. * @version 1.69 07/23/04
  29. */
  30. public class BasicTextPaneUI extends BasicEditorPaneUI {
  31. /**
  32. * Creates a UI for the JTextPane.
  33. *
  34. * @param c the JTextPane object
  35. * @return the UI
  36. */
  37. public static ComponentUI createUI(JComponent c) {
  38. return new BasicTextPaneUI();
  39. }
  40. /**
  41. * Creates a new BasicTextPaneUI.
  42. */
  43. public BasicTextPaneUI() {
  44. super();
  45. }
  46. /**
  47. * Fetches the name used as a key to lookup properties through the
  48. * UIManager. This is used as a prefix to all the standard
  49. * text properties.
  50. *
  51. * @return the name ("TextPane")
  52. */
  53. protected String getPropertyPrefix() {
  54. return "TextPane";
  55. }
  56. public void installUI(JComponent c) {
  57. super.installUI(c);
  58. }
  59. /**
  60. * This method gets called when a bound property is changed
  61. * on the associated JTextComponent. This is a hook
  62. * which UI implementations may change to reflect how the
  63. * UI displays bound properties of JTextComponent subclasses.
  64. * If the font, foreground or document has changed, the
  65. * the appropriate property is set in the default style of
  66. * the document.
  67. *
  68. * @param evt the property change event
  69. */
  70. protected void propertyChange(PropertyChangeEvent evt) {
  71. super.propertyChange(evt);
  72. }
  73. }