Skip to content
Snippets Groups Projects
Commit c204b3c1 authored by gv1's avatar gv1
Browse files

A helper class to hide password fields for the UI.

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@11608 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent c76b4107
No related branches found
No related tags found
No related merge requests found
package uk.ac.sanger.artemis.io;
class UIEraserThread implements Runnable {
private boolean stop;
/**
*@param The prompt displayed to the user
*/
public UIEraserThread(String prompt) {
System.out.print(prompt);
}
/**
* Begin masking...display asterisks (*)
*/
public void run () {
stop = true;
while (stop) {
System.out.print("\010*");
try {
Thread.currentThread().sleep(1);
} catch(InterruptedException ie) {
ie.printStackTrace();
}
}
}
/**
* Instruct the thread to stop masking
*/
public void stopMasking() {
this.stop = false;
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment