Topic: "用ecips怎样做edit mask"请高手指点 |
Print this page |
1."用ecips怎样做edit mask"请高手指点 | Copy to clipboard |
Posted by: limeiyong Posted on: 2005-05-04 12:04 "用ecips怎样做edit mask"请高手指点 如图: |
2.Re:"用ecips怎样做edit mask"请高手指点 [Re: limeiyong] | Copy to clipboard |
Posted by: wl Posted on: 2005-05-23 05:50 edit mask不知道 不过可以在focusLost中检验 sr1.addFocusListener(new org.eclipse.swt.events.FocusAdapter() { public void focusLost(org.eclipse.swt.events.FocusEvent e) { Text text=((Text)e.widget); if (!isTimeValid(text.getText())) { MessageDialog.openError(sShell, "提示", "格式输入错误,请输入如下格式数据\r\r '09:11'"); text.forceFocus(); } } private boolean isTimeValid(String text) { boolean retval = false; String timeNumberPattern = "(\\d{2})\\\\d{2})"; retval = text.matches(timeNumberPattern); return retval; } }); private boolean isTimeValid(String text) { boolean retval = false; String timeNumberPattern = "(\\d{2})\\\\d{2})"; retval = text.matches(timeNumberPattern); return retval; } }); |
3.Re:"用ecips怎样做edit mask"请高手指点 [Re: limeiyong] | Copy to clipboard |
Posted by: java88 Posted on: 2005-06-03 08:55 监控KEY事件 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |