Class SwingUtil
java.lang.Object
org.locationtech.jtstest.testbuilder.ui.SwingUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
chooseFilenameWithConfirm
(Component comp, JFileChooser fileChooser) static Object
static boolean
confirmOverwrite
(Component comp, File file) static Double
convertDouble
(String str) static Integer
convertInteger
(String str) static void
copyToClipboard
(Object o, boolean isFormatted) static JButton
createButton
(String title, String tip, ActionListener action) static JButton
createButton
(ImageIcon icon, String tip, ActionListener action) static FileFilter
createFileFilter
(String description, String extension) Example usage:static Transferable
getContents
(Clipboard clipboard) static Double
getDouble
(JTextField txt, Double defaultVal) static Object
static Integer
getInteger
(JTextField txt, Integer defaultVal) static void
static void
setEnabledWithBackground
(Component comp, boolean isEnabled) static Object
static String
value
(JTextComponent txt)
-
Field Details
-
XML_FILE_FILTER
-
JAVA_FILE_FILTER
-
PNG_FILE_FILTER
-
-
Constructor Details
-
SwingUtil
public SwingUtil()
-
-
Method Details
-
createFileFilter
Example usage:SwingUtil.createFileFilter("JEQL script (*.jql)", "jql")
- Parameters:
description
-extension
-- Returns:
- the file filter
-
chooseFilenameWithConfirm
- Parameters:
comp
-fileChooser
-- Returns:
- filename chosen, or null if choose was cancelled for some reason
-
confirmOverwrite
-
setEnabledWithBackground
-
coerce
-
convertInteger
-
convertDouble
-
getInteger
-
getDouble
-
value
-
value
-
copyToClipboard
-
getFromClipboard
-
getContents
-
reportException
-
createButton
-
createButton
-