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