:: ADVANCE ::

[Plug-in] Input Dialog 본문

Study/Eclipse

[Plug-in] Input Dialog

KSJ14 2015. 9. 19. 01:28
반응형

[Plug-in] Input Dialog


IInputValidator validator = new IInputValidator() {

public String isValid(String text) {

if(text.length() < 5)

return "You must enter at least 5 characters";

else if(text.length() > 12)

return "You may not enter more than 12 characters.";

else 

return null;

}

};

InputDialog inputDialog = new InputDialog( window.getShell(), 

"Please input a String",

"Enter a String : ",

"default text",

validator);

inputDialog.open();

반응형

'Study > Eclipse' 카테고리의 다른 글

[Plug-in] Dialog  (0) 2015.09.19
[Plug-in] MessageDialog  (0) 2015.09.17
[Plug-in] Dialog  (0) 2015.09.17
Comments