1 18 19 package org.objectweb.jac.aspects.gui.swing; 20 21 import java.awt.Dimension ; 22 import java.lang.reflect.Constructor ; 23 import javax.swing.JPasswordField ; 24 import javax.swing.JTextField ; 25 import org.objectweb.jac.aspects.gui.FieldEditor; 26 import org.objectweb.jac.aspects.gui.GuiAC; 27 import org.objectweb.jac.aspects.gui.Length; 28 import org.objectweb.jac.core.rtti.FieldItem; 29 30 33 34 public abstract class TextFieldEditor extends AbstractFieldEditor 35 { 36 protected JTextField textField; 37 38 public TextFieldEditor(Object substance, FieldItem field) 39 { 40 super(substance,field); 41 } 42 43 public void setSize(Length width, Length height) { 44 this.width = width; 45 this.height = height; 46 SwingUtils.setColumns(textField,width); 47 } 48 49 52 public void requestFocus() { 53 textField.requestFocus(); 54 } 55 56 } 57 | Popular Tags |