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