Class GuiUtil

java.lang.Object
org.locationtech.jtstest.testrunner.GuiUtil

public class GuiUtil extends Object
Useful GUI utilities
Version:
1.7
  • Constructor Details

    • GuiUtil

      public GuiUtil()
  • Method Details

    • center

      public static void center(Component componentToMove, Component componentToCenterOn)
      Centers the first component on the second
    • centerOnScreen

      public static void centerOnScreen(Component componentToMove)
      Centers the component on the screen
    • centerOnWindow

      public static void centerOnWindow(Component componentToMove)
      Centers the component on its window
    • commitChanges

      public static void commitChanges(JTable table)
    • show

      public static void show(JInternalFrame internalFrame, JDesktopPane desktopPane) throws PropertyVetoException
      Workaround for bug: can't re-show internal frames. See bug parade 4138031.
      Throws:
      PropertyVetoException
    • getSelectedFiles

      public static File[] getSelectedFiles(JFileChooser chooser)
      Workaround for Swing bug: JFileChooser does not support multi-file selection See Sun bug database 4218431. http://manning.spindoczine.com/sbe/files/uts2/Chapter14html/Chapter14.htm)
    • formatTooltips

      public static void formatTooltips(Container container)
      Changes the tooltip text of each component in the Container to be multiline HTML. Modifies all descendants (children, grandchildren, etc.).
    • formatTooltip

      public static void formatTooltip(JComponent jcomponent)
      Changes the tooltip text of the JComponent to be multiline HTML.
    • invokeAndWait

      public static void invokeAndWait(Runnable r) throws InterruptedException, InvocationTargetException
      Runs r in the event dispatch thread, which may be the current thread. Waits for r to finish before returning.
      Throws:
      InterruptedException
      InvocationTargetException