java.lang.Object
org.bzdev.swing.SwingOps
Additional Swing utilities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
Return the number of iterations for SwingOps methods that have an explicit or implied iteration limit.static void
tryRequestFocusInWindow
(Component target, int limit) TryComponent.requestFocusInWindow()
on a target component repeatedly until that method succeeds or until an iteration count is exceeded.
-
Constructor Details
-
SwingOps
public SwingOps()
-
-
Method Details
-
tryRequestFocusInWindow
TryComponent.requestFocusInWindow()
on a target component repeatedly until that method succeeds or until an iteration count is exceeded. Between each try, the event dispatch thread is emptied by calling Tookit.getDefaultToolkit.sync().This method is useful in cases where
Component.requestFocusInWindow()
would fail due to being called too early.- Parameters:
target
- the componentlimit
- the iteration limit; 0 for a default.
-
lastLimitCount
public static int lastLimitCount()Return the number of iterations for SwingOps methods that have an explicit or implied iteration limit. The methods with this property are This method is provided for debugging or testing.- Returns:
- the number of iterations for the last call to one of these methods; -1 before the first call is made.
-