1. /*
  2. * @(#)MotifTextFieldUI.java 1.20 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.motif;
  11. import javax.swing.*;
  12. import javax.swing.plaf.basic.BasicTextFieldUI;
  13. import javax.swing.plaf.*;
  14. import javax.swing.text.Caret;
  15. /**
  16. * Provides the Motif look and feel for a text field.
  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. * @author Timothy Prinzing
  26. * @version 1.20 02/02/00
  27. */
  28. public class MotifTextFieldUI extends BasicTextFieldUI {
  29. /**
  30. * Creates a UI for a JTextField.
  31. *
  32. * @param c the text field
  33. * @return the UI
  34. */
  35. public static ComponentUI createUI(JComponent c) {
  36. return new MotifTextFieldUI();
  37. }
  38. /**
  39. * Creates the object to use for a caret. By default an
  40. * instance of MotifTextUI.MotifCaret is created. This method
  41. * can be redefined to provide something else that implements
  42. * the Caret interface.
  43. *
  44. * @return the caret object
  45. */
  46. protected Caret createCaret() {
  47. return MotifTextUI.createCaret();
  48. }
  49. }