|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.joseluismartin.gui.form.FormUtils
public abstract class FormUtils
Static utility library for use in Swing Forms
| Field Summary | |
|---|---|
static Icon |
CANCEL_ICON
|
static Icon |
OK_ICON
|
| Constructor Summary | |
|---|---|
FormUtils()
|
|
| Method Summary | |
|---|---|
static Border |
createEmptyBorder(int size)
Creates empty border |
static Border |
createTitledBorder(String name)
Create Titled Border |
static List<Object> |
getComboModelList(ComboBoxModel model)
Return a List of Objects from a ComboBoxModel |
static Icon |
getIcon(Icon icon,
String url)
Load icon if icon = null, else return icon. |
static Icon |
getIcon(String url)
Load Icon from url |
static void |
link(JComboBox primary,
JComboBox dependent,
String propertyName)
|
static void |
link(JComboBox primary,
JComboBox dependent,
String propertyName,
boolean addNull)
Add a link on primary and dependent JComboBoxes by property name. |
static JButton |
newCancelButton()
Get Default OK Button from LookAndFeel (like JOptionPane) |
static JComboBox |
newCombo(int chars)
|
static JDialog |
newDialog(Component component)
Creates a new JDialog with default accept/cancel buttons |
static JDialog |
newDialog(Window owner,
Component component)
Creates a new JDialog with default accept/cancel buttons |
static JLabel |
newLabelForBox(String message)
|
static JButton |
newOKButton()
Get Default OK Button from LookAndFeel (like JOptionPane) |
static void |
setBold(JLabel label)
Make font of JLabel bold |
static void |
showError(Component parent,
String message)
Show error message |
static void |
showError(String message)
Show error message |
static JMenu |
toMenu(List<Action> actions)
Make a JMenu from an Action List |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Icon CANCEL_ICON
public static final Icon OK_ICON
| Constructor Detail |
|---|
public FormUtils()
| Method Detail |
|---|
public static void link(JComboBox primary,
JComboBox dependent,
String propertyName)
public static void link(JComboBox primary,
JComboBox dependent,
String propertyName,
boolean addNull)
primary - JComboBox when selection changesdependent - JComboBox that are filled with collectionpropertyName - the property name for get the collection from primary selected itemaddNull - if true, add a null as first combobox itempublic static List<Object> getComboModelList(ComboBoxModel model)
model - ComboBoxModel
public static JComboBox newCombo(int chars)
public static void setBold(JLabel label)
label - JLabel to make boldpublic static Border createTitledBorder(String name)
name - the title
public static JButton newOKButton()
public static JButton newCancelButton()
public static Icon getIcon(String url)
url -
public static Icon getIcon(Icon icon,
String url)
icon - icon to loadurl - String with url
public static JMenu toMenu(List<Action> actions)
actions - the Action List
public static JLabel newLabelForBox(String message)
message -
public static void showError(String message)
message - message to show
public static void showError(Component parent,
String message)
parent - component parentmessage - message to showpublic static JDialog newDialog(Component component)
component - to show in
public static JDialog newDialog(Window owner,
Component component)
owner - owner windowcomponent - component to show in
public static Border createEmptyBorder(int size)
size - border size
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||