|
|
|
@ -13,6 +13,9 @@ import javax.swing.text.PlainDocument;
|
|
|
|
|
* Number Field. |
|
|
|
|
*/ |
|
|
|
|
public class EditTextField extends UIGridTextField { |
|
|
|
|
|
|
|
|
|
private static final String I18NProperty = "i18n"; |
|
|
|
|
|
|
|
|
|
private int maxLength = 24; |
|
|
|
|
|
|
|
|
|
public EditTextField() { |
|
|
|
@ -39,7 +42,11 @@ public class EditTextField extends UIGridTextField {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class TextDocument extends PlainDocument { |
|
|
|
|
|
|
|
|
|
private Object defaultI18NProperty; |
|
|
|
|
|
|
|
|
|
public TextDocument() { |
|
|
|
|
defaultI18NProperty = getProperty(I18NProperty); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -49,6 +56,7 @@ public class EditTextField extends UIGridTextField {
|
|
|
|
|
Toolkit.getDefaultToolkit().beep(); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
putProperty(I18NProperty, defaultI18NProperty); |
|
|
|
|
super.insertString(offset, s, a); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|