Skip to content

Commit 2426510

Browse files
committed
StaticSwingUtils: deprecated bogus methods
We never want anyone calling the dispatchToEDT or dispatchToEDTWait methods from this class; that's what the ThreadService is for.
1 parent b8bf4ae commit 2426510

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/org/scijava/ui/swing/StaticSwingUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ public static Rectangle getWorkSpaceBounds() {
271271
.getMaximumWindowBounds();
272272
}
273273

274+
/** @deprecated Use {@link org.scijava.thread.ThreadService#queue}. */
275+
@Deprecated
274276
public static void dispatchToEDT(final Runnable runnable) {
275277
if (!SwingUtilities.isEventDispatchThread()) {
276278
SwingUtilities.invokeLater(runnable);
@@ -280,6 +282,8 @@ public static void dispatchToEDT(final Runnable runnable) {
280282
}
281283
}
282284

285+
/** @deprecated Use {@link org.scijava.thread.ThreadService#invoke}. */
286+
@Deprecated
283287
public static void dispatchToEDTWait(final Runnable runnable) {
284288
if (!SwingUtilities.isEventDispatchThread()) {
285289
try {

0 commit comments

Comments
 (0)