Class GuiUtils
java.lang.Object
org.apache.jorphan.gui.GuiUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JComponentcreateLabelCombo(String label, JComboBox comboBox) Create a GUI component JLabel + JComboBox with a left and right margin (5px)static voidfixSize(TableColumn column, JTable table) Fix the size of a column according to the header text.static StringGet pasted text from clipboardstatic voidmakeScrollableMenu(JMenu menu) Make menu scrollablestatic JScrollPanemakeScrollPane(Component comp) Create a scroll panel that sets its preferred size to its minimum size.static voidstopTableEditing(JTable table) Stop any editing that is currently being done on the table.
-
Constructor Details
-
GuiUtils
public GuiUtils()
-
-
Method Details
-
makeScrollPane
Create a scroll panel that sets its preferred size to its minimum size. Explicitly for scroll panes that live inside other scroll panes, or within containers that stretch components to fill the area they exist in. Use this for any component you would put in a scroll pane (such as TextAreas, tables, JLists, etc). It is here for convenience and to avoid duplicate code. JMeter displays best if you follow this custom.- Parameters:
comp- the component which should be placed inside the scroll pane- Returns:
- a JScrollPane containing the specified component
-
fixSize
Fix the size of a column according to the header text.- Parameters:
column- to be resizedtable- containing the column
-
createLabelCombo
Create a GUI component JLabel + JComboBox with a left and right margin (5px)- Parameters:
label- the labelcomboBox- the combo box- Returns:
- the JComponent (margin+JLabel+margin+JComboBox)
-
stopTableEditing
Stop any editing that is currently being done on the table. This will save any changes that have already been made.- Parameters:
table- the table to stop on editing
-
getPastedText
Get pasted text from clipboard- Returns:
- String Pasted text
- Throws:
UnsupportedFlavorException- if the clipboard data can not be get as aStringIOException- if the clipboard data is no longer available
-
makeScrollableMenu
-