Class SwingUtil
java.lang.Object
org.locationtech.jtstest.testbuilder.ui.SwingUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringchooseFilenameWithConfirm(Component comp, JFileChooser fileChooser) static Objectstatic booleanconfirmOverwrite(Component comp, File file) static DoubleconvertDouble(String str) static IntegerconvertInteger(String str) static voidcopyToClipboard(Object o, boolean isFormatted) static JButtoncreateButton(String title, String tip, ActionListener action) static JButtoncreateButton(ImageIcon icon, String tip, ActionListener action) static FileFiltercreateFileFilter(String description, String extension) Example usage:static TransferablegetContents(Clipboard clipboard) static DoublegetDouble(JTextField txt, Double defaultVal) static Objectstatic IntegergetInteger(JTextField txt, Integer defaultVal) static voidstatic voidsetEnabledWithBackground(Component comp, boolean isEnabled) static Objectstatic Stringvalue(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
-