Package jsky.util

Examples of jsky.util.ReplacementEvent


                    "old=" + getObjectIdString(oldObject) + ",new=" + getObjectIdString(newObject));
            replaceIndent = replaceIndent + "  ";
        }

        try {
            ReplacementEvent evt = new ReplacementEvent(oldObject, newObject);

            for (i = 0; i < localListeners.length; i++) {
                target = localListeners[i];
                if (trace) {
                    writeDebug(replaceIndent, getObjectIdString(target));
                }
                notifyEventMonitors(target, evt);
                target.replaceObject(evt);
            }
        } catch (ReplacementVetoException ex) {
            writeDebug(this,
                    "ReplacementVetoException trapped in replaceObject, from " +
                            target.toString());

            try {
                ReplacementEvent reverseEvt = new ReplacementEvent(newObject, oldObject);
                for (int j = i - 1; j >= 0; j--) {
                    target = localListeners[j];
                    if (target != null) {
                        notifyEventMonitors(target, reverseEvt);
                        target.replaceObject(reverseEvt);
View Full Code Here


                Iterator newKids = ((ScienceObjectNodeModel) newObject).getChildren().iterator();
                while (oldKids.hasNext() && newKids.hasNext()) {
                    ScienceObjectModel oldC = (ScienceObjectModel) oldKids.next();
                    // I dont want to hear from this kid anymore
                    oldC.removePropertyChangeListener(this);
                    oldC.replaceObject(new ReplacementEvent(oldC,
                                                            (ScienceObjectModel) newKids.next()));
                }
            } catch (ClassCastException ee) {
            } // ok wasnt a node, cant have kids, no problem
View Full Code Here

TOP

Related Classes of jsky.util.ReplacementEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.