Package cz.fidentis.analyst.gui.app
Class OutputWindowThread
java.lang.Object
java.lang.Thread
cz.fidentis.analyst.gui.app.OutputWindowThread
- All Implemented Interfaces:
Runnable
Wrapper of the default Java Netbeans Platform output window.
This singleton runs in the background, reads messages logged through
the
Logger
and displays them in the output window.
This singleton is currently executed from
the ProjectWindow
, which is always presented
in the FIDENTIS application.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
execute()
Starts the redirection of messages logged via theLogger
into the output window.protected void
fallAsleep
(int mil) void
run()
static boolean
Stops the redirection of messages logged via theLogger
into the output window.static boolean
stopExecution
(boolean err) Stops the redirection of messages logged via theLogger
into the output window.Methods inherited from class java.lang.Thread
activeCount, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, checkAccess, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Constructor Details
-
OutputWindowThread
protected OutputWindowThread()
-
-
Method Details
-
execute
public static boolean execute()Starts the redirection of messages logged via theLogger
into the output window.- Returns:
false
if the singleton/thread is already executed,true
otherwise.
-
stopExecution
public static boolean stopExecution(boolean err) Stops the redirection of messages logged via theLogger
into the output window.- Parameters:
err
- Iftrue
then the logged messages are redirected to the system error output. Otherwise, the system standard output is used.- Returns:
false
if the singleton/thread is already stopped,true
otherwise.
-
stopExecution
public static boolean stopExecution()Stops the redirection of messages logged via theLogger
into the output window. The messages are redirected into the system standard output.- Returns:
false
if the singleton/thread is already stopped,true
otherwise.
-
run
public void run() -
fallAsleep
protected void fallAsleep(int mil)
-