yu.ac.bg.etf.javaqx.qswing
Class QSwingUtilities

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.qswing.QSwingUtilities

public final class QSwingUtilities
extends java.lang.Object

QSwing Utilities.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Method Summary
static int getMnemonicIndex(java.lang.String text)
          Returns the index of mnemonic '&'.
static void invokeAndWait(java.lang.Runnable target)
          Invokes runnable target from the GUI loop and waits until finish.
static void invokeLater(java.lang.Runnable target)
          Invokes runnable target from the GUI loop.
static void invokeSafeAndWait(java.lang.Runnable safeTarget)
          Invokes "safe" runnable target from the GUI loop and waits until finish.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

invokeLater

public static void invokeLater(java.lang.Runnable target)
Invokes runnable target from the GUI loop.

Parameters:
target - the runnable target
Throws:
java.lang.IllegalArgumentException - if the target is null

invokeAndWait

public static void invokeAndWait(java.lang.Runnable target)
                          throws java.lang.reflect.InvocationTargetException
Invokes runnable target from the GUI loop and waits until finish.

NOTE: Do not call this method form QSwing thread.

Parameters:
target - the runnable target
Throws:
java.lang.IllegalArgumentException - if the target is null
java.lang.Error - if the method is called from the QSwing thread.
java.lang.reflect.InvocationTargetException - if an exception is thrown while running target

invokeSafeAndWait

public static void invokeSafeAndWait(java.lang.Runnable safeTarget)
Invokes "safe" runnable target from the GUI loop and waits until finish. Exceptions are ignored and printed on the standard error stream. "Safe" runnable target doesn't throw exceptions.

NOTE: Do not call this method form QSwing thread.

Parameters:
safeTarget - the runnable target
Throws:
java.lang.IllegalArgumentException - if the target is null
java.lang.Error - if the method is called from the QSwing thread.

getMnemonicIndex

public static int getMnemonicIndex(java.lang.String text)
Returns the index of mnemonic '&'.

Parameters:
text - the text
Returns:
mnemonic index


Copyright © 2007 ETF and contributors. All Rights Reserved.