Modifier and Type | Class and Description |
---|---|
static class |
UIFactory.IconType
The following enumeration contains the different icons that we can have.
|
static class |
UIFactory.TextStyle
The following enumeration contains the different text styles that we can
have.
|
Modifier and Type | Field and Description |
---|---|
static int |
BOTTOM_INSET_BACKGROUND
Specifies the bottom inset for the background image.
|
static int |
BOTTOM_INSET_PROGRESS_BAR
Specifies the left inset for the progress bar.
|
static int |
BOTTOM_INSET_SECONDARY_FIELD
Specifies the top inset for a secondary field.
|
static Color |
CHECKBOX_COLOR
Specifies the check box text color.
|
static Font |
CHECKBOX_FONT
Specifies the font for the check box text.
|
static Font |
CURRENT_STEP_FONT
Specifies the font for the step which is the current one in the steps panel.
|
static Color |
CURRENT_STEP_PANEL_BACKGROUND
Specifies the current step background color.
|
static Border |
CURRENT_STEP_PANEL_BORDER
Specifies the current step panel border.
|
static Color |
DEFAULT_BACKGROUND
Specifies the default background color.
|
static Color |
DEFAULT_LABEL_COLOR
Specifies the default label color.
|
static Border |
DIALOG_PANEL_BORDER
Specifies the dialog border.
|
static int |
DN_FIELD_SIZE
Specifies the number of columns of a text field for a dn.
|
static Font |
ERROR_DIALOG_FONT
Specifies the font for the text in the WebBrowserErrorDialog.
|
static int |
EXTRA_DIALOG_HEIGHT
Specifies the number of extra points that we add to the minimum size of the dialog.
|
static Color |
FIELD_INVALID_COLOR
Specifies the invalid field color.
|
static Color |
FIELD_VALID_COLOR
Specifies the valid field color.
|
static int |
HORIZONTAL_INSET_BETWEEN_BUTTONS
Specifies the horizontal insets between buttons.
|
static int |
HOST_FIELD_SIZE
Specifies the number of columns of a text field for a host name.
|
static String |
HTML_SEPARATOR
An HTML separator text that can be used in the progress panel.
|
static Color |
INLINE_HELP_COLOR
Specifies the in-line help text color.
|
static Font |
INLINE_HELP_FONT
Specifies the font for the text in the in-line help.
|
static Color |
INSTRUCTIONS_COLOR
Specifies the instructions text color.
|
static Font |
INSTRUCTIONS_FONT
Specifies the font for the instructions of the current panel.
|
static Font |
INSTRUCTIONS_MONOSPACE_FONT
Specifies the font for the instructions of the current panel.
|
static int |
LEFT_INSET_BACKGROUND
Specifies the left inset for the background image.
|
static int |
LEFT_INSET_BROWSE
Specifies the left inset for the browse button.
|
static int |
LEFT_INSET_COPY_BUTTON
Specifies the left inset for the copy url button.
|
static int |
LEFT_INSET_PRIMARY_FIELD
Specifies the left inset for the primary field.
|
static int |
LEFT_INSET_RADIO_SUBORDINATE
Specifies the left inset for radio subordinate panel.
|
static int |
LEFT_INSET_SECONDARY_FIELD
Specifies the left inset for the secondary field.
|
static int |
LEFT_INSET_STEP
Specifies the left inset for the steps.
|
static int |
LEFT_INSET_SUBPANEL_SUBORDINATE
Specifies the left inset for a subordinate subpanel.
|
static int |
LEFT_INSET_SUBSTEP
Specifies the extra left inset for the sub-steps.
|
static Font |
NOT_CURRENT_STEP_FONT
Specifies the font for the step which is not the current one in the steps panel.
|
static int |
NUMBER_ENTRIES_FIELD_SIZE
Specifies the number of columns of a text field for the number of entries.
|
static Color |
PANEL_BORDER_COLOR
Specifies the panel border color.
|
static Font |
PASSWORD_FIELD_FONT
Specifies the font for the password field text.
|
static int |
PASSWORD_FIELD_SIZE
Specifies the number of columns of a text field for a password.
|
static Color |
PASSWORDFIELD_COLOR
Specifies the password field text color.
|
static int |
PATH_FIELD_SIZE
Specifies the number of columns of a text field for a path.
|
static int |
PORT_FIELD_SIZE
Specifies the number of columns of a text field for a port.
|
static Font |
PRIMARY_FIELD_INVALID_FONT
Specifies the font for the primary invalid field.
|
static Font |
PRIMARY_FIELD_VALID_FONT
Specifies the font for the primary valid field.
|
static int |
PROGRESS_BAR_SIZE
Specifies the number of points for the width of the progress bar.
|
static Color |
PROGRESS_COLOR
Specifies the progress text color.
|
static Font |
PROGRESS_DONE_FONT
Specifies the font for the done text 'Done' in the progress panel.
|
static Font |
PROGRESS_ERROR_FONT
Specifies the font for the error messages in the progress panel.
|
static Font |
PROGRESS_FONT
Specifies the font for the progress text.
|
static Font |
PROGRESS_LOG_ERROR_FONT
Specifies the font for the error log messages in the progress panel.
|
static Font |
PROGRESS_LOG_FONT
Specifies the font for the log messages in the progress panel.
|
static Font |
PROGRESS_POINTS_FONT
Specifies the font for the points '....' in the progress panel.
|
static Font |
PROGRESS_WARNING_FONT
Specifies the font for the warning messages in the progress panel.
|
static Color |
READ_ONLY_COLOR
Specifies the read only text color.
|
static Font |
READ_ONLY_FONT
Specifies the font for read only text.
|
static int |
RELATIVE_PATH_FIELD_SIZE
Specifies the number of columns of a text field for a relative path.
|
static int |
RIGHT_INSET_BACKGROUND
Specifies the right inset for background image.
|
static Font |
SECONDARY_FIELD_INVALID_FONT
Specifies the font for the secondary invalid field.
|
static Font |
SECONDARY_FIELD_VALID_FONT
Specifies the font for the secondary valid field.
|
static Font |
SECONDARY_STATUS_FONT
Specifies the font for the secondary status field.
|
static Font |
STACK_FONT
Specifies the font for the stack trace in the progress panel.
|
static Border |
TEXT_AREA_BORDER
Specifies the text area border.
|
static Color |
TEXTFIELD_COLOR
Specifies the text field text color.
|
static Font |
TEXTFIELD_FONT
Specifies the font for the text field text.
|
static Font |
TITLE_FONT
Specifies the font for the title of the current panel.
|
static int |
TOP_INSET_BACKGROUND
Specifies the top inset for the background image.
|
static int |
TOP_INSET_BROWSE
Specifies the top inset for the browse button.
|
static int |
TOP_INSET_ERROR_MESSAGE
Specifies the top inset for the error message.
|
static int |
TOP_INSET_INPUT_SUBPANEL
Specifies the top inset for input subpanel.
|
static int |
TOP_INSET_INSTRUCTIONS_SUBPANEL
Specifies the top inset for the instructions sub panel.
|
static int |
TOP_INSET_PRIMARY_FIELD
Specifies the top inset for a primary field.
|
static int |
TOP_INSET_PROGRESS_BAR
Specifies the top inset for the progress bar.
|
static int |
TOP_INSET_PROGRESS_TEXTAREA
Specifies the top inset for the progress text area.
|
static int |
TOP_INSET_RADIO_SUBORDINATE
Specifies the top inset for a radio button subordinate panel.
|
static int |
TOP_INSET_RADIOBUTTON
Specifies the top inset for a radio button.
|
static int |
TOP_INSET_SECONDARY_FIELD
Specifies the top inset for a secondary field.
|
static int |
TOP_INSET_STEP
Specifies the top inset for the steps.
|
static int |
UID_FIELD_SIZE
Specifies the number of columns of a text field for a UID.
|
Constructor and Description |
---|
UIFactory() |
Modifier and Type | Method and Description |
---|---|
static String |
applyErrorBackgroundToHtml(String html)
Returns the html text passed as parameter with the error background applied
to it.
|
static String |
applyFontToHtml(String html,
Font font)
Returns a String that contains the html passed as parameter with a span
applied.
|
static String |
applyMargin(String html,
int top,
int right,
int bottom,
int left)
Returns the html text passed as parameter with some added margin.
|
static String |
applySuccessfulBackgroundToHtml(String html)
Returns the html text passed as parameter with the success background
applied to it.
|
static String |
applyWarningBackgroundToHtml(String html)
Returns the html text passed as parameter with the warning background
applied to it.
|
static JScrollPane |
createBorderLessScrollBar(Component comp)
Returns a JScrollPane that contains the provided component.
|
static Insets |
getButtonsPanelInsets()
Returns the insets to be used for the button panel.
|
static Insets |
getCurrentStepPanelInsets()
Returns the insets to be used for the current step panel.
|
static Insets |
getEmptyInsets()
Return empty insets.
|
static String |
getIconHtml(UIFactory.IconType iconType)
Returns the HTML string representing the provided IconType.
|
static ImageIcon |
getImageIcon(UIFactory.IconType iconType)
Returns an ImageIcon object for the provided IconType.
|
static Insets |
getStepsPanelInsets()
Returns the insets to be used for the steps panel.
|
static void |
initialize()
This method initialize the look and feel and UI settings specific to quick
setup.
|
static void |
initializeLookAndFeel()
This method initialize the look and feel.
|
static JEditorPane |
makeHtmlPane(LocalizableMessage text,
Font font)
Returns a read only JEditorPane containing the provided text with the
provided font.
|
static JButton |
makeJButton(LocalizableMessage label,
LocalizableMessage tooltip)
Creates a JButton with the given label and tooltip.
|
static JCheckBox |
makeJCheckBox(LocalizableMessage text,
LocalizableMessage tooltip,
UIFactory.TextStyle style)
Creates a JCheckBox with the given text, tooltip text and text style.
|
static JLabel |
makeJLabel(LabelFieldDescriptor desc)
Commodity method that returns a JLabel based on a LabelFieldDescriptor.
|
static JLabel |
makeJLabel(UIFactory.IconType iconName,
LocalizableMessage text,
UIFactory.TextStyle style)
Creates a JLabel with the given icon, text and text style.
|
static <T> JList<T> |
makeJList(UIFactory.TextStyle textStyle)
Creates a JList.
|
static JPanel |
makeJPanel()
Creates a new JPanel.
|
static JPasswordField |
makeJPasswordField(LocalizableMessage text,
LocalizableMessage tooltip,
int size,
UIFactory.TextStyle style)
Creates a JPasswordField with the given icon, tooltip text, size and text
style.
|
static JRadioButton |
makeJRadioButton(LocalizableMessage text,
LocalizableMessage tooltip,
UIFactory.TextStyle style)
Creates a JRadioButton with the given text, tooltip text and text style.
|
static JTextComponent |
makeJTextComponent(LabelFieldDescriptor desc,
String defaultValue)
Commodity method that returns a JTextComponent based on a
LabelFieldDescriptor.
|
static JTextField |
makeJTextField(LocalizableMessage text,
LocalizableMessage tooltip,
int size,
UIFactory.TextStyle style)
Creates a JTextField with the given icon, tooltip text, size and text
style.
|
static JEditorPane |
makeProgressPane(JScrollPane scroll)
Returns a JEditorPane that works with the provided scroll.
|
static JEditorPane |
makeTextPane(LocalizableMessage text,
UIFactory.TextStyle style)
Returns a read only JEditorPane containing the provided text with the
provided TextStyle.
|
static void |
setScrollIncrementUnit(JScrollPane scroll)
Sets the scroll increment unit for the scroll.
|
static void |
setTextStyle(JComponent l,
UIFactory.TextStyle style)
Sets the specified text style to the component passed as parameter.
|
public static final int HORIZONTAL_INSET_BETWEEN_BUTTONS
public static final int TOP_INSET_STEP
public static final int LEFT_INSET_STEP
public static final int LEFT_INSET_SUBSTEP
public static final int TOP_INSET_INSTRUCTIONS_SUBPANEL
public static final int TOP_INSET_INPUT_SUBPANEL
public static final int TOP_INSET_PRIMARY_FIELD
public static final int TOP_INSET_SECONDARY_FIELD
public static final int TOP_INSET_RADIOBUTTON
public static final int TOP_INSET_RADIO_SUBORDINATE
public static final int TOP_INSET_PROGRESS_BAR
public static final int TOP_INSET_PROGRESS_TEXTAREA
public static final int TOP_INSET_BACKGROUND
public static final int TOP_INSET_ERROR_MESSAGE
public static final int TOP_INSET_BROWSE
public static final int RIGHT_INSET_BACKGROUND
public static final int LEFT_INSET_PRIMARY_FIELD
public static final int LEFT_INSET_BROWSE
public static final int LEFT_INSET_RADIO_SUBORDINATE
public static final int LEFT_INSET_SECONDARY_FIELD
public static final int LEFT_INSET_BACKGROUND
public static final int LEFT_INSET_COPY_BUTTON
public static final int LEFT_INSET_SUBPANEL_SUBORDINATE
public static final int BOTTOM_INSET_PROGRESS_BAR
public static final int BOTTOM_INSET_BACKGROUND
public static final int BOTTOM_INSET_SECONDARY_FIELD
public static final int PATH_FIELD_SIZE
public static final int RELATIVE_PATH_FIELD_SIZE
public static final int HOST_FIELD_SIZE
public static final int UID_FIELD_SIZE
public static final int PORT_FIELD_SIZE
public static final int DN_FIELD_SIZE
public static final int PASSWORD_FIELD_SIZE
public static final int NUMBER_ENTRIES_FIELD_SIZE
public static final int PROGRESS_BAR_SIZE
public static final int EXTRA_DIALOG_HEIGHT
public static final Color DEFAULT_BACKGROUND
public static final Color CURRENT_STEP_PANEL_BACKGROUND
public static final Color DEFAULT_LABEL_COLOR
public static final Color FIELD_VALID_COLOR
public static final Color FIELD_INVALID_COLOR
public static final Color READ_ONLY_COLOR
public static final Color CHECKBOX_COLOR
public static final Color PROGRESS_COLOR
public static final Color INSTRUCTIONS_COLOR
public static final Color TEXTFIELD_COLOR
public static final Color PASSWORDFIELD_COLOR
public static final Color INLINE_HELP_COLOR
public static final Color PANEL_BORDER_COLOR
public static final Border CURRENT_STEP_PANEL_BORDER
public static final Border TEXT_AREA_BORDER
public static final Border DIALOG_PANEL_BORDER
public static final Font NOT_CURRENT_STEP_FONT
public static final Font CURRENT_STEP_FONT
public static final Font TITLE_FONT
public static final Font INSTRUCTIONS_FONT
public static final Font INSTRUCTIONS_MONOSPACE_FONT
public static final Font PRIMARY_FIELD_VALID_FONT
public static final Font SECONDARY_FIELD_VALID_FONT
public static final Font PRIMARY_FIELD_INVALID_FONT
public static final Font SECONDARY_FIELD_INVALID_FONT
public static final Font SECONDARY_STATUS_FONT
public static final Font READ_ONLY_FONT
public static final Font CHECKBOX_FONT
public static final Font PROGRESS_FONT
public static final Font TEXTFIELD_FONT
public static final Font PASSWORD_FIELD_FONT
public static final Font PROGRESS_POINTS_FONT
public static final Font PROGRESS_DONE_FONT
public static final Font PROGRESS_LOG_FONT
public static final Font PROGRESS_LOG_ERROR_FONT
public static final Font PROGRESS_ERROR_FONT
public static final Font PROGRESS_WARNING_FONT
public static final Font STACK_FONT
public static final Font ERROR_DIALOG_FONT
public static final Font INLINE_HELP_FONT
public static final String HTML_SEPARATOR
public UIFactory()
public static void initializeLookAndFeel() throws Throwable
Throwable
- if there is a problem initializing the look and feel.public static void initialize() throws Throwable
Throwable
- if there is a problem initializing the look and feel.public static JPanel makeJPanel()
public static JButton makeJButton(LocalizableMessage label, LocalizableMessage tooltip)
label
- the text of the button.tooltip
- the tooltip of the button.public static JLabel makeJLabel(LabelFieldDescriptor desc)
desc
- the LabelFieldDescriptor describing the JLabel.public static JLabel makeJLabel(UIFactory.IconType iconName, LocalizableMessage text, UIFactory.TextStyle style)
iconName
- the icon.text
- the label text.style
- the text style.public static JTextComponent makeJTextComponent(LabelFieldDescriptor desc, String defaultValue)
desc
- the LabelFieldDescriptor describing the JTextField.defaultValue
- the default value used to initialize the JTextComponent.public static JTextField makeJTextField(LocalizableMessage text, LocalizableMessage tooltip, int size, UIFactory.TextStyle style)
text
- the text.tooltip
- the tooltip text.size
- the number of columns of the JTextField.style
- the text style.public static JPasswordField makeJPasswordField(LocalizableMessage text, LocalizableMessage tooltip, int size, UIFactory.TextStyle style)
text
- the text.tooltip
- the tooltip text.size
- the number of columns of the JPasswordField.style
- the text style.public static JRadioButton makeJRadioButton(LocalizableMessage text, LocalizableMessage tooltip, UIFactory.TextStyle style)
text
- the text of the radio button.tooltip
- the tooltip text.style
- the text style.public static JCheckBox makeJCheckBox(LocalizableMessage text, LocalizableMessage tooltip, UIFactory.TextStyle style)
text
- the text of the radio button.tooltip
- the tooltip text.style
- the text style.public static <T> JList<T> makeJList(UIFactory.TextStyle textStyle)
T
- The type of the JList elementstextStyle
- the style to be used for the renderer.public static void setTextStyle(JComponent l, UIFactory.TextStyle style)
l
- the component to update.style
- the text style to use.public static String getIconHtml(UIFactory.IconType iconType)
iconType
- the IconType for which we want the HTML representation.public static ImageIcon getImageIcon(UIFactory.IconType iconType)
iconType
- the IconType for which we want to obtain the ImageIcon.public static JEditorPane makeProgressPane(JScrollPane scroll)
scroll
- the scroll that will contain the JEditorPane.ProgressJEditorPane
public static JEditorPane makeHtmlPane(LocalizableMessage text, Font font)
text
- the text to be used to initialize the JEditorPane contents.font
- the font to be used.public static JEditorPane makeTextPane(LocalizableMessage text, UIFactory.TextStyle style)
text
- the text to be used to initialize the JEditorPane contents.style
- the TextStyle to be used.public static JScrollPane createBorderLessScrollBar(Component comp)
comp
- the component contained in the scroll pane.public static void setScrollIncrementUnit(JScrollPane scroll)
scroll
- the scroll to be updated.public static Insets getEmptyInsets()
public static Insets getButtonsPanelInsets()
public static Insets getStepsPanelInsets()
public static Insets getCurrentStepPanelInsets()
public static String applyFontToHtml(String html, Font font)
html
- the original html text.font
- the font to be used to generate the new HTML.public static String applyErrorBackgroundToHtml(String html)
html
- the original html.public static String applyWarningBackgroundToHtml(String html)
html
- the original html.public static String applySuccessfulBackgroundToHtml(String html)
html
- the original html.public static String applyMargin(String html, int top, int right, int bottom, int left)
html
- the original html text.top
- the top margin.right
- the right margin.bottom
- the bottom margin.left
- the left margin.Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.