Class SwingUtil
java.lang.Object
org.locationtech.jtstest.testbuilder.ui.SwingUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic FileFilterstatic FileFilterstatic FileFilterstatic FileFilter -
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(String title, ImageIcon icon, String tip, ActionListener action) static JButtoncreateButton(String title, ImageIcon icon, String tip, ActionListener action, boolean isFocusable) 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 booleanstatic booleanstatic voidstatic voidsetAntiAlias(Graphics2D g, boolean isOn) static voidsetEnabledWithBackground(Component comp, boolean isEnabled) static voidshowTab(JTabbedPane tabPane, String tabName) static Objectstatic Stringvalue(JTextComponent txt)
-
Field Details
-
XML_FILE_FILTER
-
HTML_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
-
createButton
-
createButton
public static JButton createButton(String title, ImageIcon icon, String tip, ActionListener action, boolean isFocusable) -
isCtlKeyPressed
-
isShiftKeyPressed
-
showTab
-
setAntiAlias
-