1. /*
  2. * @(#)WindowsTextPaneUI.java 1.11 01/11/29
  3. *
  4. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.java.swing.plaf.windows;
  8. import javax.swing.plaf.*;
  9. import javax.swing.plaf.basic.*;
  10. import javax.swing.*;
  11. import javax.swing.text.Caret;
  12. /**
  13. * Windows rendition of the component.
  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 appropriate
  18. * for short term storage or RMI between applications running the same
  19. * version of Swing. A future release of Swing will provide support for
  20. * long term persistence.
  21. */
  22. public class WindowsTextPaneUI extends BasicTextPaneUI
  23. {
  24. /**
  25. * Creates a UI for a JTextPane.
  26. *
  27. * @param c the styled text component
  28. * @return the UI
  29. */
  30. public static ComponentUI createUI(JComponent c) {
  31. return new WindowsTextPaneUI();
  32. }
  33. /**
  34. * Creates the object to use for a caret. By default an
  35. * instance of WindowsCaret is created. This method
  36. * can be redefined to provide something else that implements
  37. * the InputPosition interface or a subclass of DefaultCaret.
  38. *
  39. * @return the caret object
  40. */
  41. protected Caret createCaret() {
  42. return new WindowsTextUI.WindowsCaret();
  43. }
  44. }