public class SwingTools
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
SwingTools.RunnableReturn<R> |
static class |
SwingTools.SwingReturn<R>
A class used for the return value of swingOperation(RunnableReturn).
|
static class |
SwingTools.ValueContainer<T> |
Modifier and Type | Field and Description |
---|---|
private static java.lang.Object |
workLock |
private static java.lang.Thread |
workThread |
Constructor and Description |
---|
SwingTools() |
Modifier and Type | Method and Description |
---|---|
static void |
debugCheckEventThread()
Use this to debug access to Swing objects outside event dispatch thread.
|
static boolean |
doWork(java.lang.Runnable run,
WaitNotificationHandler wnh) |
static void |
swingOperation(java.lang.Runnable run)
Runs the given Runnable immediately if called from event dispatch thread
or at some later time inside event dispatch thread otherwise.
|
static <R> SwingTools.SwingReturn<R> |
swingOperation(SwingTools.RunnableReturn<R> run)
Runs the given RunnableReturn immediately if called from event dispatch thread
or at some later time inside event dispatch thread otherwise.
|
static boolean |
swingOperationBlock(java.lang.Runnable run)
Runs the given Runnable immediately if called from event dispatch thread
or at some later time inside event dispatch thread otherwise and blocks
until it is ready.
|
static <R> R |
swingOperationBlock(SwingTools.RunnableReturn<R> run)
Runs the given RunnableReturn immediately if called from event dispatch thread
or at some later time inside event dispatch thread otherwise.
|
private static final java.lang.Object workLock
private static java.lang.Thread workThread
public static void debugCheckEventThread()
public static void swingOperation(java.lang.Runnable run)
public static boolean swingOperationBlock(java.lang.Runnable run)
public static <R> SwingTools.SwingReturn<R> swingOperation(SwingTools.RunnableReturn<R> run)
public static <R> R swingOperationBlock(SwingTools.RunnableReturn<R> run)
public static boolean doWork(java.lang.Runnable run, WaitNotificationHandler wnh)
Copyright 2004-2015 Wandora Team