Package editor.util

Class EditorUtilities


  • public class EditorUtilities
    extends Object
    • 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
    • Constructor Detail

      • EditorUtilities

        public EditorUtilities()
    • 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)
      • centerWindowInFrame

        public static void centerWindowInFrame​(Component window,
                                               Window frame)
      • getPrimaryMonitorScreenRect

        public static Rectangle getPrimaryMonitorScreenRect()
      • findIcon

        public static Icon findIcon​(Path fileOrDir)
      • findIcon

        public static Icon findIcon​(IType type)
      • findIcon

        public static Icon findIcon​(ClassType classType)
      • handleUncaughtException

        public static void handleUncaughtException​(Throwable e)
      • handleUncaughtException

        public static void handleUncaughtException​(String s,
                                                   Throwable e)
      • settleEventQueue

        public static void settleEventQueue()
      • getClipboard

        public static Clipboard getClipboard()
      • frameForComponent

        public static Frame frameForComponent​(Component comp)
      • windowForComponent

        public static Window windowForComponent​(Component comp)
      • buildFunctionIntellisenseString

        public static String buildFunctionIntellisenseString​(boolean bFeatureLiteralCompletion,
                                                             IFunctionType functionType)
      • getWindow

        public static Window getWindow()
      • createSystemColorImage

        public static Image createSystemColorImage​(Image i)
      • 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)
      • wrapText

        public static String wrapText​(String strText)
      • wrapText

        public static String wrapText​(String strText,
                                      int iLineLen)
      • convertRectangleToScreen

        public static void convertRectangleToScreen​(Rectangle rectangle,
                                                    Component component)
      • hideToolTip

        public static void hideToolTip​(JComponent c)
      • invokeInDispatchThread

        public static void invokeInDispatchThread​(Runnable task)
      • invokeNowOrLater

        public static void invokeNowOrLater​(Runnable task)
      • 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)
      • 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)
      • getFontFamilyOrDefault

        public static String getFontFamilyOrDefault​(String name,
                                                    String defaultFont)