home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / Chip_1998-11_cd.bin / tema / Cafe / jfc.bin / MotifPasswordFieldUI.java < prev    next >
Text File  |  1998-02-26  |  3KB  |  88 lines

  1. /*
  2.  * @(#)MotifPasswordFieldUI.java    1.6 98/02/02
  3.  * 
  4.  * Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  */
  20. package com.sun.java.swing.plaf.motif;
  21.  
  22. import java.awt.*;
  23. import com.sun.java.swing.*;
  24. import com.sun.java.swing.text.*;
  25. import com.sun.java.swing.event.*;
  26. import com.sun.java.swing.plaf.*;
  27. import com.sun.java.swing.plaf.basic.BasicPasswordFieldUI;
  28.  
  29. /**
  30.  * Provides the Motif look and feel for a password field.
  31.  * <p>
  32.  * Warning: serialized objects of this class will not be compatible with
  33.  * future swing releases.  The current serialization support is appropriate
  34.  * for short term storage or RMI between Swing1.0 applications.  It will
  35.  * not be possible to load serialized Swing1.0 objects with future releases
  36.  * of Swing.  The JDK1.2 release of Swing will be the compatibility
  37.  * baseline for the serialized form of Swing objects.
  38.  *
  39.  * @author  Timothy Prinzing
  40.  * @version 1.6 02/02/98
  41.  */
  42. public class MotifPasswordFieldUI extends MotifTextFieldUI {
  43.  
  44.     /**
  45.      * Creates a UI for a JPasswordField.
  46.      *
  47.      * @param c the JPasswordField
  48.      * @return the UI
  49.      */
  50.     public static ComponentUI createUI(JComponent c) {
  51.         return new MotifPasswordFieldUI();
  52.     }
  53.  
  54.     /**
  55.      * Creates a new MotifPasswordFieldUI object.
  56.      */
  57.     public MotifPasswordFieldUI() {
  58.     super();
  59.     }
  60.  
  61.     /**
  62.      * Fetches the name used as a key to lookup properties through the
  63.      * UIManager.  This is used as a prefix to all the standard
  64.      * text properties.
  65.      *
  66.      * @return the name
  67.      */
  68.     protected String getPropertyPrefix() {
  69.     return "PasswordField";
  70.     }
  71.  
  72.     /**
  73.      * Creates a view for an element.
  74.      *
  75.      * @param elem the element
  76.      * @return the view
  77.      */
  78.     public View create(Element elem) {
  79.     return new PasswordView(elem);
  80.     }
  81.  
  82. }
  83.  
  84.  
  85.  
  86.  
  87.  
  88.