Package org.omegat.util.gui
Class UIThreadsUtil
java.lang.Object
org.omegat.util.gui.UIThreadsUtil
Utils for check UI threads and run specific code in UI threads only.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidexecuteInSwingThread(Runnable code) Execute code in swing thread only.static voidCheck if current thread is swing thread, and report error in log if it's not true.static voidCheck if current thread is NOT swing thread, and report error in log if it's not true.static <T> T
-
Method Details
-
executeInSwingThread
Execute code in swing thread only. -
returnResultFromSwingThread
-
mustBeSwingThread
public static void mustBeSwingThread()Check if current thread is swing thread, and report error in log if it's not true. -
mustNotBeSwingThread
public static void mustNotBeSwingThread()Check if current thread is NOT swing thread, and report error in log if it's not true.
-