/** * Creates a PropertyEnv instance for given feature descriptor (property) * and beans (nodes). To be used for initializing property editors not * managed by the property sheet classes. * @param fd Feature descritor that describes the property. * @param beans Objects that the edited property belongs to (typically its node). * @return the created PropertyEnv instance * @since 6.39 */ public static PropertyEnv create(FeatureDescriptor fd, Object... beans) { PropertyEnv env = new PropertyEnv(); env.setFeatureDescriptor(fd); env.setBeans(beans); return env; }
private void detachFromEnv(PropertyEnv env) { // System.err.println(" detachFromEnv - " + env); env.removeVetoableChangeListener(getEnvListener()); env.addPropertyChangeListener(getEnvListener()); env.setBeans(null); attachedEnv = null; }
private void detachFromEnv(PropertyEnv env) { // System.err.println(" detachFromEnv - " + env); env.removeVetoableChangeListener(getEnvListener()); env.addPropertyChangeListener(getEnvListener()); env.setBeans(null); attachedEnv = null; }
private void detachFromEnv(PropertyEnv env) { // System.err.println(" detachFromEnv - " + env); env.removeVetoableChangeListener(getEnvListener()); env.addPropertyChangeListener(getEnvListener()); env.setBeans(null); attachedEnv = null; }
/** Factory method that returns an appropriate inplace * editor for an object. Special handling is provided for * instances of Node.Property which can provide hints or * even their own legacy inplace editor implementation. * <P>The returned instance will be connected to the * object (the component provided by getComponent() will * render the property object correctly with no additional * intervention needed. If <code>newInstance</code> is * true, will create a new instance of the inplace editor * component (for use with PropertyPanel and other cases * where multiple inplace esditors can be displayed at the * same time); otherwise a shared instance will be configured * and returned.<P> Note that for the case of unknown object * types (non Node.Property objects), the returned InplaceEditor * will have no way of knowing how to update the object with * a new value, and client code must listen for actions on * the InplaceEditor and do this manually - the update method * of the InplaceEditor will do nothing. */ public InplaceEditor getInplaceEditor(Property p, boolean newInstance) { PropertyEnv env = new PropertyEnv(); env.setBeans(reusableEnv.getBeans()); return getInplaceEditor(p, env, newInstance); }
/** Factory method that returns an appropriate inplace * editor for an object. Special handling is provided for * instances of Node.Property which can provide hints or * even their own legacy inplace editor implementation. * <P>The returned instance will be connected to the * object (the component provided by getComponent() will * render the property object correctly with no additional * intervention needed. If <code>newInstance</code> is * true, will create a new instance of the inplace editor * component (for use with PropertyPanel and other cases * where multiple inplace esditors can be displayed at the * same time); otherwise a shared instance will be configured * and returned.<P> Note that for the case of unknown object * types (non Node.Property objects), the returned InplaceEditor * will have no way of knowing how to update the object with * a new value, and client code must listen for actions on * the InplaceEditor and do this manually - the update method * of the InplaceEditor will do nothing. */ public InplaceEditor getInplaceEditor (Property p, boolean newInstance) { PropertyEnv env = new PropertyEnv(); env.setBeans (reusableEnv.getBeans()); return getInplaceEditor(p, env, newInstance); }
/** Factory method that returns an appropriate inplace * editor for an object. Special handling is provided for * instances of Node.Property which can provide hints or * even their own legacy inplace editor implementation. * <P>The returned instance will be connected to the * object (the component provided by getComponent() will * render the property object correctly with no additional * intervention needed. If <code>newInstance</code> is * true, will create a new instance of the inplace editor * component (for use with PropertyPanel and other cases * where multiple inplace esditors can be displayed at the * same time); otherwise a shared instance will be configured * and returned.<P> Note that for the case of unknown object * types (non Node.Property objects), the returned InplaceEditor * will have no way of knowing how to update the object with * a new value, and client code must listen for actions on * the InplaceEditor and do this manually - the update method * of the InplaceEditor will do nothing. */ public InplaceEditor getInplaceEditor (Property p, boolean newInstance) { PropertyEnv env = new PropertyEnv(); env.setBeans (reusableEnv.getBeans()); return getInplaceEditor(p, env, newInstance); }
private void attachToEnv(PropertyEnv env) { env.addPropertyChangeListener(getEnvListener()); env.addVetoableChangeListener(getEnvListener()); env.setBeans(EditorPropertyDisplayer.findBeans(this)); }
private void attachToEnv(PropertyEnv env) { env.addPropertyChangeListener(getEnvListener()); env.addVetoableChangeListener(getEnvListener()); env.setBeans(EditorPropertyDisplayer.findBeans(this)); }
private void attachToEnv(PropertyEnv env) { if (attachedEnv == env) { return; } // System.err.println(" attachToEnv - " + env); env.addVetoableChangeListener(getEnvListener()); env.addPropertyChangeListener(getEnvListener()); env.setBeans(findBeans(this)); }
private void attachToEnv(PropertyEnv env) { env.addPropertyChangeListener(getEnvListener()); env.addVetoableChangeListener(getEnvListener()); env.setBeans(EditorPropertyDisplayer.findBeans(this)); }
private void attachToEnv(PropertyEnv env) { if (attachedEnv == env) { return; } // System.err.println(" attachToEnv - " + env); env.addVetoableChangeListener(getEnvListener()); env.addPropertyChangeListener(getEnvListener()); env.setBeans(findBeans(this)); }
private void attachToEnv(PropertyEnv env) { if (attachedEnv == env) { return; } // System.err.println(" attachToEnv - " + env); env.addVetoableChangeListener(getEnvListener()); env.addPropertyChangeListener(getEnvListener()); env.setBeans(findBeans(this)); }
env.setBeans(invoker.getReusablePropertyEnv().getBeans());
env.setBeans(invoker.getReusablePropertyEnv().getBeans());
env.setBeans(invoker.getReusablePropertyEnv().getBeans());