public final class GuiUtils
extends java.lang.Object
| Constructor and Description |
|---|
GuiUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
cancelEditing(javax.swing.JTable table)
cancel any editing that is currently being done on the table.
|
static void |
copyTextToClipboard(java.lang.String text)
Copy text to clipboard
|
static javax.swing.JComponent |
createLabelCombo(java.lang.String label,
javax.swing.JComboBox<?> comboBox)
Create a GUI component JLabel + JComboBox with a left and right margin (5px)
|
static void |
fixSize(javax.swing.table.TableColumn column,
javax.swing.JTable table)
Fix the size of a column according to the header text.
|
static java.lang.String |
getPastedText()
Get pasted text from clipboard
|
static void |
makeScrollableMenu(javax.swing.JMenu menu)
Make menu scrollable
|
static javax.swing.JScrollPane |
makeScrollPane(java.awt.Component comp)
Create a scroll panel that sets its preferred size to its minimum size.
|
static void |
stopTableEditing(javax.swing.JTable table)
Stop any editing that is currently being done on the table.
|
public static javax.swing.JScrollPane makeScrollPane(java.awt.Component comp)
comp - the component which should be placed inside the scroll panepublic static void fixSize(javax.swing.table.TableColumn column,
javax.swing.JTable table)
column - to be resizedtable - containing the columnpublic static javax.swing.JComponent createLabelCombo(java.lang.String label,
javax.swing.JComboBox<?> comboBox)
label - the labelcomboBox - the combo boxpublic static void stopTableEditing(javax.swing.JTable table)
table - the table to stop on editingpublic static void cancelEditing(javax.swing.JTable table)
table - the table to cancel on editingpublic static java.lang.String getPastedText()
throws java.awt.datatransfer.UnsupportedFlavorException,
java.io.IOException
java.awt.datatransfer.UnsupportedFlavorException - if the clipboard data can not be get as a Stringjava.io.IOException - if the clipboard data is no longer availablepublic static void makeScrollableMenu(javax.swing.JMenu menu)
menu - JMenupublic static final void copyTextToClipboard(java.lang.String text)
text - Text to copyCopyright © 1998-2018 Apache Software Foundation. All Rights Reserved.