本文整理汇总了Java中java.awt.peer.TextFieldPeer.setEchoChar方法的典型用法代码示例。如果您正苦于以下问题:Java TextFieldPeer.setEchoChar方法的具体用法?Java TextFieldPeer.setEchoChar怎么用?Java TextFieldPeer.setEchoChar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.peer.TextFieldPeer
的用法示例。
在下文中一共展示了TextFieldPeer.setEchoChar方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setEchoCharacter
import java.awt.peer.TextFieldPeer; //导入方法依赖的package包/类
/**
* @deprecated As of JDK version 1.1,
* replaced by <code>setEchoChar(char)</code>.
*/
@Deprecated
public synchronized void setEchoCharacter(char c) {
if (echoChar != c) {
echoChar = c;
TextFieldPeer peer = (TextFieldPeer)this.peer;
if (peer != null) {
peer.setEchoChar(c);
}
}
}
示例2: setEchoCharacter
import java.awt.peer.TextFieldPeer; //导入方法依赖的package包/类
/**
* Sets the character to be echoed when protected input is displayed.
*
* @param c the echo character for this text field
*
* @deprecated As of JDK version 1.1,
* replaced by {@code setEchoChar(char)}.
*/
@Deprecated
public synchronized void setEchoCharacter(char c) {
if (echoChar != c) {
echoChar = c;
TextFieldPeer peer = (TextFieldPeer)this.peer;
if (peer != null) {
peer.setEchoChar(c);
}
}
}
示例3: setEchoCharacter
import java.awt.peer.TextFieldPeer; //导入方法依赖的package包/类
/**
* Sets the character that is echoed when protected input such as
* a password is displayed.
*
* @param echoChar The new echo character.
*
* @deprecated This method is deprecated in favor of
* <code>setEchoChar()</code>
*/
public void setEchoCharacter(char echoChar)
{
this.echoChar = echoChar;
TextFieldPeer peer = (TextFieldPeer) getPeer ();
if (peer != null)
peer.setEchoChar (echoChar);
}
示例4: setEchoCharacter
import java.awt.peer.TextFieldPeer; //导入方法依赖的package包/类
/**
* Sets the character that is echoed when protected input such as
* a password is displayed.
*
* @param echoChar The new echo character.
*
* @deprecated This method is deprecated in favor of
* <code>setEchoChar()</code>
*/
public void setEchoCharacter(char echoChar)
{
this.echoChar = echoChar;
TextFieldPeer peer = (TextFieldPeer) getPeer ();
if (peer != null)
peer.setEchoChar (echoChar);
}