本文整理了Java中org.eclipse.swt.widgets.Text.getEchoChar()
方法的一些代码示例,展示了Text.getEchoChar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.getEchoChar()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Text
类名称:Text
方法名:getEchoChar
[英]Returns the echo character.
The echo character is the character that is displayed when the user enters text or the text is changed by the programmer.
[中]
代码示例来源:origin: pentaho/pentaho-kettle
public void modifyText( ModifyEvent e ) {
if ( textField.getEchoChar() == '\0' ) { // Can't show passwords ;-)
String tip = textField.getText();
if ( !Utils.isEmpty( tip ) && !Utils.isEmpty( toolTipText ) ) {
tip += Const.CR + Const.CR + toolTipText;
}
if ( Utils.isEmpty( tip ) ) {
tip = toolTipText;
}
textField.setToolTipText( variables.environmentSubstitute( tip ) );
}
}
};
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
private static String getEchoChar( Text text ) {
return text.getEchoChar() == 0 ? null : String.valueOf( text.getEchoChar() );
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07
static void preservePasswordMode( final Text text ) {
IWidgetAdapter adapter = WidgetUtil.getAdapter( text );
Boolean value = new Boolean( text.getEchoChar() != 0 );
adapter.preserve( PROP_PASSWORD_MODE, value );
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07
static void writePasswordMode( final Text text ) throws IOException {
Boolean newValue = new Boolean( text.getEchoChar() != 0 );
String prop = PROP_PASSWORD_MODE;
if( WidgetLCAUtil.hasChanged( text, prop, newValue, Boolean.FALSE ) ) {
JSWriter writer = JSWriter.getWriterFor( text );
writer.set( JS_PROP_PASSWORD_MODE, newValue );
}
}
内容来源于网络,如有侵权,请联系作者删除!