/** Creates a new instance of ModelProperty */ private ModelProperty(PropertyModel pm) { super (pm.getPropertyType()); this.mdl = pm; //System.err.println( //"Created ModelProperty wrapper for mystery PropertyModel " + pm); }
/** Attach listeners to an instance of PropertyModel */ private final void attachToModel() { if (model != null) { model.addPropertyChangeListener(getListener()); } }
public PropertyEditor getPropertyEditor() { if (mdl.getPropertyEditorClass() != null) { try { //System.err.println("ModelProperty creating a " //+ mdl.getPropertyEditorClass()); Constructor c = mdl.getPropertyEditorClass().getConstructor(); c.setAccessible(true); return (PropertyEditor) c.newInstance(new Object[0]); } catch (Exception e) { Exceptions.printStackTrace(e); return new PropUtils.NoPropertyEditorEditor(); } } return super.getPropertyEditor(); }
result = ((ReusablePropertyModel) pm).getPropertyEditor(); } else { Class c = pm.getPropertyEditorClass(); Object mdlValue = pm.getValue(); Object edValue = result.getValue(); result.setValue(pm.getValue()); result = PropUtils.getPropertyEditor(pm.getPropertyType()); result.setValue(pm.getValue()); } catch (InvocationTargetException ite) { result = new ExceptionPropertyEditor(ite);
public void setValue(Object val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { //System.err.println("Setting value on ModelProperty to " + val + " forwarding to " + mdl); mdl.setValue(val); valueSet = true; }
public Object getValue() throws IllegalAccessException, InvocationTargetException { return mdl.getValue(); }
/** Detach listeners from an instance of PropertyModel */ private final void detachFromModel() { if (model != null) { model.removePropertyChangeListener(getListener()); } }
result = ((ReusablePropertyModel) pm).getPropertyEditor(); } else { Class c = pm.getPropertyEditorClass(); if (c != null) { try { result = (PropertyEditor) c.newInstance(); Object mdlValue = pm.getValue(); Object edValue = result.getValue(); if (edValue != mdlValue) { result.setValue (pm.getValue()); (pm.getPropertyType()); try { result.setValue (pm.getValue()); } catch (InvocationTargetException ite) { result = new ExceptionPropertyEditor(ite);
public void setValue(Object val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { //System.err.println("Setting value on ModelProperty to " + val + " forwarding to " + mdl); mdl.setValue(val); valueSet = true; }
public Object getValue() throws IllegalAccessException, InvocationTargetException { return mdl.getValue(); }
/** Detach listeners from an instance of PropertyModel */ private final void detachFromModel() { if (model != null) { model.removePropertyChangeListener(getListener()); } }
result = ((ReusablePropertyModel) pm).getPropertyEditor(); } else { Class c = pm.getPropertyEditorClass(); if (c != null) { try { result = (PropertyEditor) c.newInstance(); Object mdlValue = pm.getValue(); Object edValue = result.getValue(); if (edValue != mdlValue) { result.setValue (pm.getValue()); (pm.getPropertyType()); try { result.setValue (pm.getValue()); } catch (InvocationTargetException ite) { result = new ExceptionPropertyEditor(ite);
/** Creates a new instance of ModelProperty */ private ModelProperty(PropertyModel pm) { super (pm.getPropertyType()); this.mdl = pm; //System.err.println( //"Created ModelProperty wrapper for mystery PropertyModel " + pm); }
public void setValue(Object val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { //System.err.println("Setting value on ModelProperty to " + val + " forwarding to " + mdl); mdl.setValue(val); valueSet = true; }
public Object getValue() throws IllegalAccessException, InvocationTargetException { return mdl.getValue(); }
public PropertyEditor getPropertyEditor() { if (mdl.getPropertyEditorClass() != null) { try { //System.err.println("ModelProperty creating a " //+ mdl.getPropertyEditorClass()); Constructor c = mdl.getPropertyEditorClass().getConstructor(null); c.setAccessible(true); return (PropertyEditor) c.newInstance(new Object[0]); } catch (Exception e) { ErrorManager.getDefault().notify(e); return new PropUtils.NoPropertyEditorEditor(); } } return super.getPropertyEditor(); }
/** Attach listeners to an instance of PropertyModel */ private final void attachToModel() { if (model != null) { model.addPropertyChangeListener(getListener()); } }