Class GuiUtil
java.lang.Object
org.locationtech.jtstest.testrunner.GuiUtil
Useful GUI utilities
- Version:
- 1.7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Centers the first component on the secondstatic void
centerOnScreen
(Component componentToMove) Centers the component on the screenstatic void
centerOnWindow
(Component componentToMove) Centers the component on its windowstatic void
commitChanges
(JTable table) static void
formatTooltip
(JComponent jcomponent) Changes the tooltip text of the JComponent to be multiline HTML.static void
formatTooltips
(Container container) Changes the tooltip text of each component in the Container to be multiline HTML.static File[]
getSelectedFiles
(JFileChooser chooser) Workaround for Swing bug: JFileChooser does not support multi-file selection See Sun bug database 4218431.static void
Runs r in the event dispatch thread, which may be the current thread.static void
show
(JInternalFrame internalFrame, JDesktopPane desktopPane) Workaround for bug: can't re-show internal frames.
-
Constructor Details
-
GuiUtil
public GuiUtil()
-
-
Method Details
-
center
Centers the first component on the second -
centerOnScreen
Centers the component on the screen -
centerOnWindow
Centers the component on its window -
commitChanges
-
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
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
Changes the tooltip text of each component in the Container to be multiline HTML. Modifies all descendants (children, grandchildren, etc.). -
formatTooltip
Changes the tooltip text of the JComponent to be multiline HTML. -
invokeAndWait
Runs r in the event dispatch thread, which may be the current thread. Waits for r to finish before returning.
-