Class SwingUtils
java.lang.Object
com.inductiveautomation.snap.swing.SwingUtils
This class offers a number of useful general purpose utilities used by ribs classes.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic JComponentgetDefaultFocusComponent(Component aComponent) Returns the default focus component.static IconReturns an icon for the given shape, color and size.static ImageIcongetImageIcon(Shape aShape, Color aColor, int aWidth, int aHeight) Returns an image icon for the given shape, color and size.static <T> TReturns the first parent of given component which is an instance of given class.static WindowReturns the first parent of given component which is window.static voidinvokeLater(Object anObj, String aMethod) Invokes an given method on a given object after delay.static voidinvokeLater(Object anObj, String aMethod, Object anArg, Class anArgClass) Invokes an given method on a given object after delay, with given arg and arg class.static voidinvokeLater(Runnable aRunnable, int aCount) InvokesLater for a given count before running given runnable, in order to skip past events yet to be posted.static voidinvokeLaterOnce(String aName, Runnable aRunnable) Invokes the given runnable for name once (cancels unexecuted previous invokeLater registered with same name).
- 
Constructor Details- 
SwingUtilspublic SwingUtils()
 
- 
- 
Method Details- 
getWindowReturns the first parent of given component which is window.
- 
getParentReturns the first parent of given component which is an instance of given class.
- 
invokeLaterInvokes an given method on a given object after delay.
- 
invokeLaterInvokes an given method on a given object after delay, with given arg and arg class.
- 
invokeLaterInvokesLater for a given count before running given runnable, in order to skip past events yet to be posted.
- 
invokeLaterOnceInvokes the given runnable for name once (cancels unexecuted previous invokeLater registered with same name).
- 
getIconReturns an icon for the given shape, color and size.
- 
getImageIconReturns an image icon for the given shape, color and size.
- 
getDefaultFocusComponentReturns the default focus component.
 
-