|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--javatools.swing.StatusLabelSync
It is a thread to control messages displayed into a status label. Use this
sequence of commands:
StatusLabelSync sync = new StatusLabelSync();
sync.setStatusLabel(myOwnJLabel);
sync.start();
-- repeat
sync.setMessage(theMessageGroup, theMessageToBeDisplayed);
// make what you need
sync.removeMessage(theMessageGroup);
-- return to repeat while you need it.
sync.stopAll();
Field Summary |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
StatusLabelSync()
Creates a new instance of StatusLabelSync |
Method Summary | |
void |
removeMessage(java.lang.String threadName)
Removes the message previously set. |
void |
run()
Thread's run method. |
void |
setMessage(java.lang.String threadName,
java.lang.String message)
Sets the message to be displayed. |
void |
setStatusLabel(javax.swing.JLabel pStatusLabel)
Sets the status label in which messages will be displayed. |
void |
stopAll()
Stops the thread. |
void |
wakeUp()
Effectively shows the string of the status label. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public StatusLabelSync()
Method Detail |
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void stopAll()
public void setStatusLabel(javax.swing.JLabel pStatusLabel)
pStatusLabel
- The label to use.public void setMessage(java.lang.String threadName, java.lang.String message)
threadName
- The message group.message
- The message to be displayed.public void removeMessage(java.lang.String threadName)
threadName
- The message group.public void wakeUp()
wakeUp
in interface RunningRunnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |