|
||||||||||
| 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
| Constructor Summary | |
|---|---|
FormUtils()
|
|
| Method Summary | |
|---|---|
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 JButton |
newOKButton()
Get Default OK Button from LookAndFeel (like JOptionPane) |
static void |
setBold(JLabel label)
Make font of JLabel bold |
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 |
| 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||