|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjava.lang.Thread
jAudioFeatureExtractor.BatchExecutionThread
public class BatchExecutionThread
GUI components that handles the execution of the feature extraction. The unusual structure is to get around the limitations of Swing - since swing is not thread safe, gui componenets can only operate from the main thread without race conditions. This means that either long running activities must execute on the main thread (making the system unresponsive) or fire updates on the main thread, potentially causing race conditions. This problem can be circumvented by pumping updates to the main event thread via small runnable objects (Geary 1999, 281-91). It works, but makes for obscure code with several inner or anonymous classes that encapsulate a message to the gui thread.
Geary, D. 1999. Graphic Java 2: Mastering the JFC. Palo Alto: Sun Microsystems.
入れ子のクラスの概要 |
---|
クラス java.lang.Thread から継承された入れ子のクラス/インタフェース |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
フィールドの概要 |
---|
クラス java.lang.Thread から継承されたフィールド |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
コンストラクタの概要 | |
---|---|
BatchExecutionThread(Controller controller,
OuterFrame of)
Creates a new thread. |
メソッドの概要 | |
---|---|
void |
announceUpdate(int fileDone)
Called at periodic intervals during the execution of the code. |
void |
announceUpdate(int fileNumber,
int fileDone)
Called after each file executes |
void |
run()
Executes a batch. |
void |
setFileLength(int windows)
Informs the file progress bar on how many windows of data are present in this file. |
void |
setNumberOfFiles(int files)
Informs the batch progress bar about many files are present in this batch. |
クラス 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 |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
コンストラクタの詳細 |
---|
public BatchExecutionThread(Controller controller, OuterFrame of)
controller
- Near global object containing actions and model components.of
- Reference to the main frame so it can be disabled during
execution - preventing modification to the system in mid run.メソッドの詳細 |
---|
public void run()
java.lang.Runnable
内の run
java.lang.Thread
内の run
public void announceUpdate(int fileNumber, int fileDone)
Updater
内の announceUpdate
fileNumber
- How many files are completed.fileDone
- Position in the file (usually 0).public void announceUpdate(int fileDone)
Updater
内の announceUpdate
fileDone
- Position in file.public void setNumberOfFiles(int files)
Updater
内の setNumberOfFiles
files
- Number of files to be processed.public void setFileLength(int windows)
Updater
内の setFileLength
windows
- Total number of windows of data to be processed.
|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |