|
|
|
@ -9,11 +9,20 @@ import com.fr.design.utils.gui.GUICoreUtils;
|
|
|
|
|
import com.fr.stable.Constants; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
import javax.swing.JFrame; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.JTextField; |
|
|
|
|
import javax.swing.event.DocumentEvent; |
|
|
|
|
import javax.swing.event.DocumentListener; |
|
|
|
|
import javax.swing.text.Document; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.Graphics; |
|
|
|
|
import java.awt.Graphics2D; |
|
|
|
|
import java.awt.Insets; |
|
|
|
|
import java.awt.LayoutManager; |
|
|
|
|
import java.awt.RenderingHints; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @author Jerry |
|
|
|
@ -33,31 +42,33 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs
|
|
|
|
|
|
|
|
|
|
public UITextField() { |
|
|
|
|
super(); |
|
|
|
|
InputEventBaseOnOS.addBasicEditInputMap(this); |
|
|
|
|
initListener(); |
|
|
|
|
init(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public UITextField(int columns) { |
|
|
|
|
super(columns); |
|
|
|
|
InputEventBaseOnOS.addBasicEditInputMap(this); |
|
|
|
|
initListener(); |
|
|
|
|
init(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public UITextField(String text, int columns) { |
|
|
|
|
super(text, columns); |
|
|
|
|
InputEventBaseOnOS.addBasicEditInputMap(this); |
|
|
|
|
initListener(); |
|
|
|
|
init(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public UITextField(String text) { |
|
|
|
|
super(text); |
|
|
|
|
InputEventBaseOnOS.addBasicEditInputMap(this); |
|
|
|
|
|
|
|
|
|
initListener(); |
|
|
|
|
init(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public UITextField(Document doc, String text, int columns) { |
|
|
|
|
super(doc, text, columns); |
|
|
|
|
init(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 每个构造方法里都需要做的一些操作 |
|
|
|
|
*/ |
|
|
|
|
public void init() { |
|
|
|
|
InputEventBaseOnOS.addBasicEditInputMap(this); |
|
|
|
|
initListener(); |
|
|
|
|
} |
|
|
|
@ -251,4 +262,4 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs
|
|
|
|
|
this.isBorderPainted = isBorderPainted; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|