public class ViewUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
ViewUtil.BugFixTextSelector |
(package private) static class |
ViewUtil.ColumnResizer |
class |
ViewUtil.TextBoxChanger
Allows text to be changed in a text box.
|
(package private) static class |
ViewUtil.TextSelector |
Modifier and Type | Field and Description |
---|---|
static org.apache.log4j.Logger |
log
Used for logging.
|
Constructor and Description |
---|
ViewUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addBasicEditingPopupToComponent(java.awt.Component component)
Adds a basic editing pop-up to a component.
|
static void |
addBasicEditingReadOnlyPopupToComponent(java.awt.Component component)
Adds a basic read-only editing pop-up to a component.
|
static void |
adjustTableColumnWidths(javax.swing.JTable table)
Adjusts the column widths on a JTable to hold the widest values.
|
static void |
centerScrollPositionForSelectedText(javax.swing.text.JTextComponent textComponent)
Centers the scroll view on the screen for the currently selected text.
|
static void |
exportProxySession(java.awt.Component component,
HTTPSession proxySession) |
static javax.swing.JPopupMenu |
getBasicEditingPopup()
Gets the basic editing popup.
|
static javax.swing.JPopupMenu |
getBasicEditingReadOnlyPopup()
Gets the basic editing popup for read-only text fields.
|
static java.awt.Point |
getCenteredPoint(java.awt.Component component)
This method returns the point a component, like a dialog, should be placed on the screen based on the components length and width so that it is centerd.
|
static int |
getTabIndexForName(java.lang.String name,
javax.swing.JTabbedPane pane)
Gets the index of a tab, given its name.
|
static void |
packColumn(javax.swing.JTable table,
int vColIndex,
int margin)
Sets the preferred width of the visible column specified by vColIndex.
|
static int |
promptReplaceImportObject(java.lang.String objectName,
java.lang.String objectType)
Prompts the user to replace an object that already exists, when importing.
|
static void |
selectTextInTextBox(javax.swing.text.JTextComponent textComponent,
java.lang.String textToSelect,
boolean isCaseSensitive) |
static void |
showMessageDialog(java.lang.String title,
java.lang.String message)
Displays a generic message dialog box.
|
public static javax.swing.JPopupMenu getBasicEditingPopup()
JPopupMenu
.public static javax.swing.JPopupMenu getBasicEditingReadOnlyPopup()
JPopupMenu
.public static void addBasicEditingPopupToComponent(java.awt.Component component)
component
- The Component
to which the pop-up should be added.public static void selectTextInTextBox(javax.swing.text.JTextComponent textComponent, java.lang.String textToSelect, boolean isCaseSensitive)
textComponent
- A JTextComponent
.textToSelect
- The text to select.isCaseSensitive
- Whether or not the selection should be case sensitive.public static void centerScrollPositionForSelectedText(javax.swing.text.JTextComponent textComponent)
textComponent
- The JTextComponent
.public static void addBasicEditingReadOnlyPopupToComponent(java.awt.Component component)
component
- The Component
to which the pop-up should be added.public static void adjustTableColumnWidths(javax.swing.JTable table)
table
- The JTable.public static void packColumn(javax.swing.JTable table, int vColIndex, int margin)
table
- The table to be adjusted.vColIndex
- The index of the column to be adjusted.margin
- The amount of padding to use.public static int promptReplaceImportObject(java.lang.String objectName, java.lang.String objectType)
objectName
- The name of the object that already exists.objectType
- The type of the object to import.public static void showMessageDialog(java.lang.String title, java.lang.String message)
title
- The title of the box.message
- The message to be displayed.public static int getTabIndexForName(java.lang.String name, javax.swing.JTabbedPane pane)
name
- The name of the tab we seek.pane
- A JTabbedPane
.public static java.awt.Point getCenteredPoint(java.awt.Component component)
component
- Component to find the centerd location for.public static void exportProxySession(@Nullable java.awt.Component component, @NotNull HTTPSession proxySession)