public class Utilities extends Object
| Constructor and Description |
|---|
Utilities() |
| Modifier and Type | Method and Description |
|---|---|
static void |
centerOnComponent(Window comp,
Component ref)
Center the component location of the ref component.
|
static void |
centerOnScreen(Component comp)
Center the component location based on its preferred size.
|
static JPanel |
createBrowseButtonPanel(JLabel lbl,
JTextComponent tf,
JButton but)
Creates a panel with a field and a browse button.
|
static boolean |
displayConfirmation(Component parent,
org.forgerock.i18n.LocalizableMessage msg,
org.forgerock.i18n.LocalizableMessage title)
Displays a confirmation message dialog.
|
static void |
displayError(Component parent,
org.forgerock.i18n.LocalizableMessage msg,
org.forgerock.i18n.LocalizableMessage title)
Displays an error message dialog.
|
static void |
displayInformationMessage(JFrame parent,
org.forgerock.i18n.LocalizableMessage msg,
org.forgerock.i18n.LocalizableMessage title)
Displays an information message dialog.
|
static void |
setFrameIcon(JFrame frame)
Sets a frames image icon to the standard OpenDS icon appropriate
for the running platform.
|
public static JPanel createBrowseButtonPanel(JLabel lbl, JTextComponent tf, JButton but)
lbl - JLabel for the fieldtf - JTextField for holding the browsed databut - JButton for invoking browse actionpublic static void setFrameIcon(JFrame frame)
frame - for which the icon will be setpublic static void centerOnScreen(Component comp)
comp - the component to be centered.public static void centerOnComponent(Window comp, Component ref)
comp - the component to be centered.ref - the component to be used as reference.public static boolean displayConfirmation(Component parent, org.forgerock.i18n.LocalizableMessage msg, org.forgerock.i18n.LocalizableMessage title)
parent - the parent frame of the confirmation dialog.msg - the confirmation message.title - the title of the dialog.true if the user confirms the message, or
false if not.public static void displayError(Component parent, org.forgerock.i18n.LocalizableMessage msg, org.forgerock.i18n.LocalizableMessage title)
parent - the parent component of the error dialog.msg - the error message.title - the title for the dialog.public static void displayInformationMessage(JFrame parent, org.forgerock.i18n.LocalizableMessage msg, org.forgerock.i18n.LocalizableMessage title)
parent - the parent frame of the information dialog.msg - the error message.title - the title for the dialog.Copyright © 2010-2020 Wren Security. All Rights Reserved.