Invoker(Node.Property prop, Object[] beans) { property = prop; this.beans = beans; propertyEnv = new ReusablePropertyEnv(); ReusablePropertyModel rpm = new ReusablePropertyModel(propertyEnv); rpm.setProperty(prop); propertyEnv.setNode(beans); // will unwrap as needed }
@Override public void removeNotify() { Node lastSel = null; if (pclistener != null) { //Save the last selection - if we're being transiently removed, //i.e. because of drag and drop, we'll want to reset it on the //next addNotify if it hasn't disappeared lastSel = pclistener.detach(); } doSetNodes(null); if (lastSel != null) { //Save the selected node in case we're re-added to a container storedNode = new WeakReference<Node>(lastSel); } super.removeNotify(); table.getReusablePropertyEnv().setBeans(null); table.getReusablePropertyEnv().setNode(null); table.getReusablePropertyModel().setProperty(null); }
/** Getter for the state of the property editor. The editor can be in * not valid states just if it implements the <link>ExPropertyEditor</link> * and changes state by the <code>setState</code> method of the <link>PropertyEnv</link> * environment. * <P> * @return <code>PropertyEnv.STATE_VALID</code> if the editor is not the <code>ExPropertyEditor</code> * one or other constant from <code>PropertyEnv.STATE_*</code> that was assigned to <code>PropertyEnv</code> * @since 2.20 */ public final Object getState () { if (displayer != null && displayer instanceof PropertyDisplayer_Editable) { return ((PropertyDisplayer_Editable) displayer).getPropertyEnv().getState(); } else { PropertyEditor ed = propertyEditor(); if (ed instanceof ExPropertyEditor) { //XXX until we kill ReusablePropertyModel, anyway ReusablePropertyEnv env = reusableEnv; reusableModel.setProperty(prop); ((ExPropertyEditor) ed).attachEnv(env); return env.getState(); } } return PropertyEnv.STATE_VALID; }
/** Getter for the state of the property editor. The editor can be in * not valid states just if it implements the <link>ExPropertyEditor</link> * and changes state by the <code>setState</code> method of the <link>PropertyEnv</link> * environment. * <P> * @return <code>PropertyEnv.STATE_VALID</code> if the editor is not the <code>ExPropertyEditor</code> * one or other constant from <code>PropertyEnv.STATE_*</code> that was assigned to <code>PropertyEnv</code> * @since 2.20 */ public final Object getState () { if (displayer != null && displayer instanceof PropertyDisplayer_Editable) { return ((PropertyDisplayer_Editable) displayer).getPropertyEnv().getState(); } else { PropertyEditor ed = propertyEditor(); if (ed instanceof ExPropertyEditor) { //XXX until we kill ReusablePropertyModel, anyway ReusablePropertyEnv env = reusableEnv; reusableModel.setProperty(prop); ((ExPropertyEditor) ed).attachEnv(env); return env.getState(); } } return PropertyEnv.STATE_VALID; }
/** Getter for the state of the property editor. The editor can be in * not valid states just if it implements the <link>ExPropertyEditor</link> * and changes state by the <code>setState</code> method of the <link>PropertyEnv</link> * environment. * <P> * @return <code>PropertyEnv.STATE_VALID</code> if the editor is not the <code>ExPropertyEditor</code> * one or other constant from <code>PropertyEnv.STATE_*</code> that was assigned to <code>PropertyEnv</code> * @since 2.20 */ public final Object getState() { if ((displayer != null) && displayer instanceof PropertyDisplayer_Editable) { return ((PropertyDisplayer_Editable) displayer).getPropertyEnv().getState(); } else { PropertyEditor ed = propertyEditor(); if (ed instanceof ExPropertyEditor) { //XXX until we kill ReusablePropertyModel, anyway ReusablePropertyEnv env = reusableEnv; reusableModel.setProperty(prop); ((ExPropertyEditor) ed).attachEnv(env); return env.getState(); } } return PropertyEnv.STATE_VALID; }
public void removeNotify() { Node lastSel = null; if (pclistener != null) { //Save the last selection - if we're being transiently removed, //i.e. because of drag and drop, we'll want to reset it on the //next addNotify if it hasn't disappeared lastSel = pclistener.detach(); } doSetNodes(null); if (lastSel != null) { //Save the selected node in case we're re-added to a container storedNode = new WeakReference(lastSel); } super.removeNotify(); table.getReusablePropertyEnv().setBeans(null); table.getReusablePropertyEnv().setNode(null); table.getReusablePropertyModel().setProperty(null); }
public void removeNotify() { Node lastSel = null; if (pclistener != null) { //Save the last selection - if we're being transiently removed, //i.e. because of drag and drop, we'll want to reset it on the //next addNotify if it hasn't disappeared lastSel = pclistener.detach(); } doSetNodes(null); if (lastSel != null) { //Save the selected node in case we're re-added to a container storedNode = new WeakReference(lastSel); } super.removeNotify(); table.getReusablePropertyEnv().setBeans(null); table.getReusablePropertyEnv().setNode(null); table.getReusablePropertyModel().setProperty(null); }
mdl.setProperty(prop); env.reset();
mdl.setProperty(prop); env.reset(); PropertyEditor editor = preparePropertyEditor (mdl, env);
mdl.setProperty(prop); env.reset(); PropertyEditor editor = preparePropertyEditor (mdl, env);