T
- Result type returned by this EnhancedSwingWorker's
doInBackground
and get
methods.V
- Type used for carrying out intermediate results by this
EnhancedSwingWorker's
publish
and process
methods.public abstract class EnhancedSwingWorker<T,V> extends Object
Modifier and Type | Field and Description |
---|---|
static Map.Entry<Integer,Integer> |
NO_DELAY |
static String |
STATE_PROPERTY |
Constructor and Description |
---|
EnhancedSwingWorker()
Deprecated.
|
EnhancedSwingWorker(String pName) |
EnhancedSwingWorker(String pName,
Map.Entry<Integer,Integer> pDelay) |
EnhancedSwingWorker(String pName,
Map.Entry<Integer,Integer> pDelay,
boolean pMultithread) |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener pListener)
'progress' property not yet implemented.
|
void |
cancel(boolean pMayInterruptIfRunning) |
protected abstract T |
doInBackground() |
protected void |
done() |
void |
execute()
This method should only be called from the event queue thread.
|
T |
get() |
SwingWorker.StateValue |
getState()
Unlike SwingWorker.getState(), this method will never return
SwingWorker.StateValue#PENDING after
SwingWorker.execute() has been called.
|
boolean |
isCancelled() |
boolean |
isDone() |
static boolean |
isSuppressingThreading() |
void |
removePropertyChangeListener(PropertyChangeListener pListener) |
static void |
setSuppressingThreading(boolean pSuppressingThreading)
Can disable multithreading.
|
public static final String STATE_PROPERTY
getState()
,
Constant Field Values@Deprecated public EnhancedSwingWorker()
public EnhancedSwingWorker(String pName)
public EnhancedSwingWorker(String pName, Map.Entry<Integer,Integer> pDelay, boolean pMultithread)
pName
- Friendly name used along with
System.identityHashCode(Object) to construct identifier.pDelay
- Min/max delay in milliseconds.pMultithread
- If true, perform work in separate thread.public static boolean isSuppressingThreading()
public static void setSuppressingThreading(boolean pSuppressingThreading)
public void addPropertyChangeListener(PropertyChangeListener pListener)
STATE_PROPERTY
public void removePropertyChangeListener(PropertyChangeListener pListener)
protected abstract T doInBackground() throws Exception
Exception
SwingWorker.doInBackground()
protected void done()
SwingWorker.done()
public final T get() throws InterruptedException, ExecutionException
InterruptedException
ExecutionException
SwingWorker.get()
public final void execute()
SwingWorker.execute()
public void cancel(boolean pMayInterruptIfRunning)
SwingWorker.cancel(boolean)
public SwingWorker.StateValue getState()
public boolean isCancelled()
SwingWorker.isCancelled()
public boolean isDone()
SwingWorker.isDone()
Copyright © 2023. All rights reserved.