public class GUIUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.awt.Color |
DEFAULT_COLOR |
static java.awt.Color |
FOCUSED_COLOR |
Constructor and Description |
---|
GUIUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
configureJComboBox(javax.swing.JComboBox<?> field) |
static void |
configureSeparator(javax.swing.JComponent appendSeparator)
This method configure a separator build with the
DefaultFormBuilder.appendSeparator(String) method. |
static void |
configureSeparatorWithoutLine(javax.swing.JComponent appendSeparator)
This method configure a separator build with the
DefaultFormBuilder.appendSeparator(String) method. |
static javax.swing.JLabel |
fromHTMLToJLabel(java.lang.String htmlFile)
This method can be used to generate a
JLabel initialized with the
content of n HTML file. |
static javax.swing.JPanel |
getSubtitle(java.lang.String subtitle) |
static javax.swing.ImageIcon |
loadIcon(java.lang.String filename)
This method can be used to load an icon from a filename
|
static javax.swing.JLabel |
prepareLabel(java.lang.String s)
This method creates a new JLabel correctly formatted
|
static javax.swing.JLabel |
prepareLabel(java.lang.String s,
int alignment)
This method creates a new JLabel correctly formatted
|
static javax.swing.JLabel |
prepareTitle(java.lang.String s)
This method creates a new JLabel correctly formatted in order to be a
frame title
|
public static java.awt.Color DEFAULT_COLOR
public static java.awt.Color FOCUSED_COLOR
public static void configureJComboBox(javax.swing.JComboBox<?> field)
field
- public static javax.swing.JPanel getSubtitle(java.lang.String subtitle)
subtitle
- public static void configureSeparator(javax.swing.JComponent appendSeparator)
DefaultFormBuilder.appendSeparator(String)
method.appendSeparator
- public static void configureSeparatorWithoutLine(javax.swing.JComponent appendSeparator)
DefaultFormBuilder.appendSeparator(String)
method. This method
hides the horizontal line.appendSeparator
- public static javax.swing.JLabel prepareLabel(java.lang.String s)
s
- the string to be inserted into the labelpublic static javax.swing.JLabel prepareLabel(java.lang.String s, int alignment)
s
- the string to be inserted into the labelalignment
- the alignmentpublic static javax.swing.JLabel prepareTitle(java.lang.String s)
s
- the string to be inserted into the labelpublic static javax.swing.JLabel fromHTMLToJLabel(java.lang.String htmlFile)
JLabel
initialized with the
content of n HTML file.htmlFile
- the path of the HTML fileJLabel
public static javax.swing.ImageIcon loadIcon(java.lang.String filename)
filename
- the filename