/** Forbids setValid (false) on data object when there is an * opened editor. * * @param ev PropertyChangeEvent */ public void vetoableChange (PropertyChangeEvent ev) throws PropertyVetoException { if (Env.PROP_VALID.equals (ev.getPropertyName ())) { // do not check it if old value is not true if (Boolean.FALSE.equals (ev.getOldValue ())) return; if (env.isModified ()) { // if the object is modified CloneableOpenSupport os = support (); if (os != null && !os.canClose ()) { // is modified and has not been sucessfully closed throw new PropertyVetoException ( // [PENDING] this is not a very good detail message! "", ev // NOI18N ); } } } }
/** Forbids setValid (false) on data object when there is an * opened editor. * * @param ev PropertyChangeEvent */ public void vetoableChange (PropertyChangeEvent ev) throws PropertyVetoException { if (Env.PROP_VALID.equals (ev.getPropertyName ())) { // do not check it if old value is not true if (Boolean.FALSE.equals (ev.getOldValue ())) return; if (env.isModified ()) { // if the object is modified CloneableOpenSupport os = support (); if (os != null && !os.canClose ()) { // is modified and has not been sucessfully closed throw new PropertyVetoException ( // [PENDING] this is not a very good detail message! "", ev // NOI18N ); } } } }
/** Resolvable to connect to the right data object. This * method is used for connectiong CloneableTopComponents via * their CloneableTopComponent.Ref */ public Object readResolve () { CloneableOpenSupport os = support (); if (os == null) { // problem! no replace!? return this; } // use the editor support's CloneableTopComponent.Ref return os.allEditors; } }
/** Resolvable to connect to the right data object. This * method is used for connectiong CloneableTopComponents via * their CloneableTopComponent.Ref */ public Object readResolve () { CloneableOpenSupport os = support (); if (os == null) { // problem! no replace!? return this; } // use the editor support's CloneableTopComponent.Ref return os.allEditors; } }
/** Closes the support in AWT thread. */ public void run () { // loosing validity CloneableOpenSupport os = support (); if (os != null) { // mark the object as not being modified, so nobody // will ask for save env.unmarkModified (); os.close (false); } }
/** Closes the support in AWT thread. */ public void run () { // loosing validity CloneableOpenSupport os = support (); if (os != null) { // mark the object as not being modified, so nobody // will ask for save env.unmarkModified (); os.close (false); } }