|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
fr.tireme.shared.GuiThread
public abstract class GuiThread
Class managing all threaded User Interface where there is a need to send interactive messages to a log area and, if needed to update a progress bar.
The calls is abstract and is extended in order to rpvide the _run mlethod, responsible to run all user actions.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
boolean |
debug
debug mode ? |
java.lang.String |
message
Interact with the user interrface : the current message that will be output. |
Messages |
mMess
Message handler |
int |
pbCount
Interact with the user interface : percentage for the progress bar. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
GuiThread()
|
|
| Method Summary | |
|---|---|
abstract java.lang.String |
_run()
This is implemented by extending classes. |
java.io.File |
initializeVariables(boolean debug,
Messages mess,
java.lang.Runnable ml,
boolean withProgressbar)
Initialize all needed objects of the abstract class |
void |
run()
Main processing method for the called as soon a something is launched and that need to output messages in the log area window. |
void |
writeMessage(java.lang.String mess)
Write a message in the text Area. |
void |
writeMessage(java.lang.String mess,
boolean retBefore)
Description of the rite a message but in plus, output a return before |
void |
writeMessage(java.lang.String log,
java.lang.String mess)
|
void |
writeMessageAndProgress(java.lang.String mess,
int progress)
Write a message in the text Area and increment the progress bar |
void |
writeMessageAndProgress(java.lang.String log,
java.lang.String mess,
int progress)
|
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public Messages mMess
public boolean debug
public java.lang.String message
public int pbCount
| Constructor Detail |
|---|
public GuiThread()
| Method Detail |
|---|
public java.io.File initializeVariables(boolean debug,
Messages mess,
java.lang.Runnable ml,
boolean withProgressbar)
throws java.lang.Exception
debug - Are we in a debug modemess - MutoMessage message handlerml - the modifier used to log information in the text log areawithProgressbar - do we have a progress bar in the user interface ?
java.lang.Exception - mainly, all IO Exceptions linked to the log file creationpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void writeMessage(java.lang.String mess)
mess - String defining the message to write
public void writeMessage(java.lang.String mess,
boolean retBefore)
mess - String defining the message to writeretBefore - Indicate that a break needs to be generated before the message
public void writeMessageAndProgress(java.lang.String mess,
int progress)
mess - String defining the message to writeprogress - Integer value from 0 to 100 that will be understood as a percentage of the total progress bar
width.
public void writeMessageAndProgress(java.lang.String log,
java.lang.String mess,
int progress)
public void writeMessage(java.lang.String log,
java.lang.String mess)
public abstract java.lang.String _run()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||