|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.javaprog.ui.wizard.DefaultDataLookup
public class DefaultDataLookup
Default implementation for DataLookup using reflection. This is how you would register a text field with a data model using this default implementation:
DataModel dataModel; JTextField textField; ... Method method = null; try { method = textField.getClass().getMethod("getText", null); } catch (NoSuchMethodException nsme) {} DataLookup dataLookup = new DefaultDataLookup(textField, method, null); dataModel.registerDataLookup("MyTextField", dataLookup);
DataModel
Field Summary | |
---|---|
protected Method |
lookupMethod
|
protected Object |
object
|
protected Object[] |
parameterList
|
Constructor Summary | |
---|---|
DefaultDataLookup(Object object,
Method lookupMethod,
Object[] arguments)
Creates a new data lookup mechanism using the given method on the specified object passing the given parameters. |
|
DefaultDataLookup(Object object,
PropertyDescriptor property)
Creates a new data lookup mechanism using the given property on the specified object. |
|
DefaultDataLookup(Object object,
String property)
Creates a new data lookup mechanism using the given property on the specified object. |
Method Summary | |
---|---|
Object |
lookupData()
Returns the value of the data source this object is registered with. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Method lookupMethod
protected Object[] parameterList
protected Object object
Constructor Detail |
---|
public DefaultDataLookup(Object object, Method lookupMethod, Object[] arguments)
object
- the object on which the given method will be invokedlookupMethod
- the method that should be invoked on the given
objectarguments
- the arguments that should be passed when invoking
the given method on the given objectpublic DefaultDataLookup(Object object, PropertyDescriptor property)
object
- the object of which the given property will be queriedproperty
- the property that will be queried of the given objectpublic DefaultDataLookup(Object object, String property) throws IntrospectionException
object
- the object of which the given property will be queriedproperty
- the property that will be queried of the given object
IntrospectionException
Method Detail |
---|
public Object lookupData()
DataLookup
lookupData
in interface DataLookup
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |