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