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