|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectse.datadosen.util.BeanBinder
public class BeanBinder
Utility class for synchronizing a Swing GUI with JavaBean properties. Also
synchronizes a bean with a property file or command line parameters.
Synchronization is performed when calling getProperties() and
setProperties(). Matching is done where the name of a property corresponds to
the name of a GUI element.
Copyright (c) 2005, David Ekholm Datadosen
| Constructor Summary | |
|---|---|
BeanBinder()
|
|
| Method Summary | |
|---|---|
static void |
debug(java.lang.Object bean,
java.lang.Object jComponentHolder)
|
static java.util.Properties |
getProperties(java.lang.Object bean)
Return a java.util.Property object representing the state of a JavaBean |
static java.util.Properties |
getProperties(java.lang.Object bean,
boolean nullProperties)
Return a java.util.Property object representing the state of a JavaBean |
static java.util.Properties |
getProperties(java.lang.Object bean,
boolean nullProperties,
java.util.Properties existing)
Return a java.util.Property object representing the state of a JavaBean |
static void |
getProperties(java.lang.Object bean,
java.lang.Object jComponentHolder)
Update a Swing GUI with the properties from a JavaBean. |
static void |
getProperties(java.lang.Object bean,
java.lang.Object[] holders)
|
static java.util.Properties |
getProperties(java.lang.Object bean,
java.util.Properties existing)
Return a java.util.Property object representing the state of a JavaBean |
static java.util.Properties |
parseArgsOptions(java.lang.String[] args)
Utility method to generate a Property object from command line parameters |
static void |
setProperties(java.lang.Object bean,
java.util.Map props)
Set JavaBean properties given a Map object |
static void |
setProperties(java.lang.Object bean,
java.lang.Object jComponentHolder)
Update a JavaBean from a Swing GUI. |
static void |
setProperties(java.lang.Object bean,
java.lang.Object[] source)
Update a JavaBean from a Swing GUI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BeanBinder()
| Method Detail |
|---|
public static void debug(java.lang.Object bean,
java.lang.Object jComponentHolder)
throws java.lang.Exception
java.lang.Exception
public static void getProperties(java.lang.Object bean,
java.lang.Object[] holders)
throws java.lang.Exception
java.lang.Exception
public static void getProperties(java.lang.Object bean,
java.lang.Object jComponentHolder)
bean - JavaBean to read properties fromjComponentHolder - object with GUI elements (public instances of JComponent
objects)
public static java.util.Properties getProperties(java.lang.Object bean)
throws java.lang.Exception
java.lang.Exception
public static java.util.Properties getProperties(java.lang.Object bean,
java.util.Properties existing)
throws java.lang.Exception
bean - JavaBean to read properties fromexisting - Existing properties object to add properties to
java.lang.Exception
public static java.util.Properties getProperties(java.lang.Object bean,
boolean nullProperties)
throws java.lang.Exception
bean - JavaBean to read properties fromnullProperties - if null-value properties are to be included
java.lang.Exception
public static java.util.Properties getProperties(java.lang.Object bean,
boolean nullProperties,
java.util.Properties existing)
throws java.lang.Exception
nullProperties - if null-value properties are to be includedexisting - existing Properties object to add properties to
java.lang.Exception
public static void setProperties(java.lang.Object bean,
java.util.Map props)
throws BeanBinderException
BeanBinderException
public static void setProperties(java.lang.Object bean,
java.lang.Object[] source)
bean - JavaBean to set properties onsource - objects with GUI elements (public instances of JComponent objects)
public static void setProperties(java.lang.Object bean,
java.lang.Object jComponentHolder)
throws BeanBinderException
bean - JavaBean to set properties onjComponentHolder - object with GUI elements (public instances of JComponent objects)
BeanBinderExceptionpublic static java.util.Properties parseArgsOptions(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||