1 7 package javax.swing.plaf.basic; 8 9 import java.awt.*; 10 import javax.swing.*; 11 import javax.swing.text.*; 12 import javax.swing.event.*; 13 import javax.swing.plaf.*; 14 15 16 26 public class BasicPasswordFieldUI extends BasicTextFieldUI { 27 28 34 public static ComponentUI createUI(JComponent c) { 35 return new BasicPasswordFieldUI (); 36 } 37 38 45 protected String getPropertyPrefix() { 46 return "PasswordField"; 47 } 48 49 55 public View create(Element elem) { 56 return new PasswordView(elem); 57 } 58 59 64 65 ActionMap createActionMap() { 66 ActionMap map = super.createActionMap(); 67 if (map.get(DefaultEditorKit.selectWordAction) != null) { 68 Action a = map.get(DefaultEditorKit.selectLineAction); 69 if (a != null) { 70 map.remove(DefaultEditorKit.selectWordAction); 71 map.put(DefaultEditorKit.selectWordAction, a); 72 } 73 } 74 return map; 75 } 76 77 } 78 79 80 81 82 83 | Popular Tags |