Package editor.util
Class EditorUtilities
- java.lang.Object
-
- editor.util.EditorUtilities
-
public class EditorUtilities extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static intCONTROL_KEY_MASKstatic StringCONTROL_KEY_NAMEPlatform dependent keystroke info
-
Constructor Summary
Constructors Constructor Description EditorUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Processbrowse(String strURL)static StringbuildFunctionIntellisenseString(boolean bFeatureLiteralCompletion, IFunctionType functionType)static voidcenterWindowInFrame(Component window, Window frame)static booleancontainsFocus(Component c)static voidconvertRectangleToScreen(Rectangle rectangle, Component component)static ImagecreateSystemColorImage(Image i)static voiddisplayError(String strMsg)static voiddisplayError(Throwable e)static voiddisplayInformation(String strMsg)static voiddisplayMessageBox(String strMsg, int iType, boolean bWrapText)static voiddisplayWarning(String strMsg)static voiddoBackgroundOp(Runnable run)static voiddoWaitOperation(Runnable op)static List<String>filterStrings(Collection<? extends CharSequence> collection, String filter)static <T> TfindAncestor(Component start, Class<T> aClass)Finds the first widget above the passed in widget of the given classstatic <T> TfindAtOrAbove(Component start, Class<T> aClass)Finds the first widget at or above the passed in widget of the given classstatic <T> List<T>findDecendents(Component configUI, Class<T> aClass)static <T> List<T>findDecendents(Component configUI, Class<T> aClass, Predicate<Container> recurseToChildren)static IconfindIcon(ClassType classType)static IconfindIcon(IType type)static IconfindIcon(Path fileOrDir)static voidfixSwingFocusBugWhenPopupCloses(Component c)static booleanfocusContains(Component c)static FrameframeForComponent(Component comp)static WindowgetActiveWindow()static ClipboardgetClipboard()static ComponentgetFocus()static WindowgetFocusedWindow()static StringgetFontFamilyOrDefault(String name, String defaultFont)static RectanglegetPrimaryMonitorScreenRect()static WindowgetWindow()static PointgetXYForDialogRelativeToStudioFrame(int width, int height)static voidhandleUncaughtException(String s, Throwable e)static voidhandleUncaughtException(Throwable e)static Stringhex(Color color)static voidhideToolTip(JComponent c)static voidinvokeInDispatchThread(Runnable task)static voidinvokeNowOrLater(Runnable task)static booleanisInFocusLineage(Component c)static booleanisRunnable(IType type)static ImageIconloadIcon(String strRes)static voidremovePopupBorder(Container c)static JRootPanerootPaneForComponent(Component comp)static voidsettleBackgroundOps()Pumps through all current events in the background operation queue.static voidsettleEventQueue()static ComponentshowWaitCursor(boolean bWait)static voidshowWaitCursor(boolean bWait, Component c)static WindowwindowForComponent(Component comp)static StringwrapText(String strText)static StringwrapText(String strText, int iLineLen)
-
-
-
Field Detail
-
CONTROL_KEY_NAME
public static final String CONTROL_KEY_NAME
Platform dependent keystroke info
-
CONTROL_KEY_MASK
public static final int CONTROL_KEY_MASK
-
-
Method Detail
-
doBackgroundOp
public static void doBackgroundOp(Runnable run)
-
settleBackgroundOps
public static void settleBackgroundOps()
Pumps through all current events in the background operation queue. Note that this is *NOT* a settle. Any operations added after this method is invoked will not be executed.
-
removePopupBorder
public static void removePopupBorder(Container c)
-
getPrimaryMonitorScreenRect
public static Rectangle getPrimaryMonitorScreenRect()
-
handleUncaughtException
public static void handleUncaughtException(Throwable e)
-
settleEventQueue
public static void settleEventQueue()
-
getClipboard
public static Clipboard getClipboard()
-
buildFunctionIntellisenseString
public static String buildFunctionIntellisenseString(boolean bFeatureLiteralCompletion, IFunctionType functionType)
-
getWindow
public static Window getWindow()
-
displayInformation
public static void displayInformation(String strMsg)
-
displayError
public static void displayError(Throwable e)
-
displayError
public static void displayError(String strMsg)
-
displayWarning
public static void displayWarning(String strMsg)
-
displayMessageBox
public static void displayMessageBox(String strMsg, int iType, boolean bWrapText)
-
convertRectangleToScreen
public static void convertRectangleToScreen(Rectangle rectangle, Component component)
-
filterStrings
public static List<String> filterStrings(Collection<? extends CharSequence> collection, String filter)
-
hideToolTip
public static void hideToolTip(JComponent c)
-
invokeInDispatchThread
public static void invokeInDispatchThread(Runnable task)
-
invokeNowOrLater
public static void invokeNowOrLater(Runnable task)
-
browse
public static Process browse(String strURL) throws IOException
- Throws:
IOException
-
findAncestor
public static <T> T findAncestor(Component start, Class<T> aClass)
Finds the first widget above the passed in widget of the given class
-
findAtOrAbove
public static <T> T findAtOrAbove(Component start, Class<T> aClass)
Finds the first widget at or above the passed in widget of the given class
-
findDecendents
public static <T> List<T> findDecendents(Component configUI, Class<T> aClass, Predicate<Container> recurseToChildren)
-
isRunnable
public static boolean isRunnable(IType type)
-
fixSwingFocusBugWhenPopupCloses
public static void fixSwingFocusBugWhenPopupCloses(Component c)
-
showWaitCursor
public static Component showWaitCursor(boolean bWait)
-
showWaitCursor
public static void showWaitCursor(boolean bWait, Component c)
-
doWaitOperation
public static void doWaitOperation(Runnable op)
-
getFocus
public static Component getFocus()
-
getFocusedWindow
public static Window getFocusedWindow()
-
getActiveWindow
public static Window getActiveWindow()
-
containsFocus
public static boolean containsFocus(Component c)
-
focusContains
public static boolean focusContains(Component c)
-
isInFocusLineage
public static boolean isInFocusLineage(Component c)
-
getXYForDialogRelativeToStudioFrame
public static Point getXYForDialogRelativeToStudioFrame(int width, int height)
-
-