1. /*
  2. * @(#)WindowsTextAreaUI.java 1.16 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 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 WindowsTextAreaUI extends BasicTextAreaUI {
  23. /**
  24. * Creates the object to use for a caret. By default an
  25. * instance of WindowsCaret is created. This method
  26. * can be redefined to provide something else that implements
  27. * the InputPosition interface or a subclass of DefaultCaret.
  28. *
  29. * @return the caret object
  30. */
  31. protected Caret createCaret() {
  32. return new WindowsTextUI.WindowsCaret();
  33. }
  34. /**
  35. * Creates a UI for a JTextField.
  36. *
  37. * @param c the text field
  38. * @return the UI
  39. */
  40. public static ComponentUI createUI(JComponent c) {
  41. return new WindowsTextAreaUI();
  42. }
  43. }