Examples of ODOMChangeListener


Examples of com.volantis.mcs.eclipse.common.odom.ODOMChangeListener

        // this listener will be registered with the policy definition
        // associated with this page. This is required as the
        // PolicyDefinitionSection allows a policies type to be modified, if
        // the policy type is changed the controls that allow the master value
        // to be edited need to be disposed of and re-createated
        structureUpdateListener = new ODOMChangeListener() {
            // javadoc inherited
            public void changed(ODOMObservable node,
                ODOMChangeEvent event) {
                // The PolicyDefinitionSection modifies the policies by
                // detaching the old element and adding a new one. We
View Full Code Here

Examples of com.volantis.mcs.eclipse.common.odom.ODOMChangeListener

            }
        };

        attributesComposite.addPropertyChangeListener(ipropertyChangeListener);

        odomChangeListener = new ODOMChangeListener() {
            // javadoc inherited
            public void changed(ODOMObservable node, ODOMChangeEvent event) {
                // Make sure we don't try updating if the widget has been
                // disposed (we often get updates to selection during
                // closure of a window)
View Full Code Here

Examples of com.volantis.mcs.eclipse.common.odom.ODOMChangeListener

        // manager
        selectionManager.addSelectionListener(deviceSelectionListener,
                DEVICE_FILTER);

        // we want to update the tree whenever a hierarchy element is modified
        ODOMChangeListener rootElementListener = new ODOMChangeListener() {
            public void changed(ODOMObservable node,
                                ODOMChangeEvent event) {
                // simply refresh the tree to reflect any change
                treeViewer.refresh();
            }
View Full Code Here

Examples of com.volantis.mcs.eclipse.common.odom.ODOMChangeListener

            xmlValidator =
                    new AsynchronousXMLValidator(contextXMLValidator);

            validationChangeListener =
                    new ODOMChangeListener() {
                        public void changed(ODOMObservable node,
                                            ODOMChangeEvent event) {
                            validate();
                        }
                    };
View Full Code Here

Examples of com.volantis.mcs.eclipse.common.odom.ODOMChangeListener

                return matched;
            }
        };

        // this listener will listen for updates to the managed element
        elementListener = new ODOMChangeListener() {
            // javadoc inherited
            public void changed(ODOMObservable node,
                                ODOMChangeEvent event) {
                // three types of changes can occur.
                // 1. The managed element could be deleted. We need to handle
                //    this by removing the listener from the element.
                // 2. The managed element could be modified. If this occurs
                //    then we might need to add a standard element.
                // 3. The managed element could be created. This will never
                //    happen as this listener will not be registered when the
                //    managed element does not exist.
                if (event.getOldValue() == parent &&
                        event.getNewValue() == null &&
                        event.getSource() == element) {
                    // the managed element has been delelted
                    // unregister this listener with the element
                    // Note: we don't remove the parentListener from the
                    // parent element as this
                    element.removeChangeListener(elementListener);

                } else if(event.getSource().getName().
                        equals(DeviceRepositorySchemaConstants.
                        STANDARD_ELEMENT_NAME) &&
                        event.getNewValue()==null) {
                    // Here we have the content of the standard element
                    // being removed. This can only happen here if an
                    // undo/redo is in progresss. In this case the
                    // standard element is no longer relevant and is
                    // about to be deleted itself.
                    element.removeChangeListener(elementListener);
                } else {
                    // the managed element has been modified. See if it has
                    // a standard element
                    if (findStandardElement(element) == null) {
                        // this is the first time the element has changed so
                        // we need to add the standard element to the managed
                        // element
                        ((ODOMElement) element.getParent()).
                                removeChangeListener(parentListener,
                                        ChangeQualifier.HIERARCHY);
                        element.removeChangeListener(elementListener);
                        element.getChildren().add(
                                createStandardElement(originalElement));
                        element.addChangeListener(elementListener);
                        ((ODOMElement) element.getParent()).
                                addChangeListener(parentListener,
                                        ChangeQualifier.HIERARCHY);
                    }
                }
            }
        };


        // This will listen for the creation of the managed element.
        parentListener = new ODOMChangeListener() {
            // javadoc inherited
            public void changed(ODOMObservable node,
                                ODOMChangeEvent event) {
                // only interested if the element does not exist and the event
                // indicates a node has been added
View Full Code Here

Examples of com.volantis.mcs.eclipse.common.odom.ODOMChangeListener

        trackedElements = new HashSet();
        undoableUOWs = new LinkedList();
        redoableUOWs = new LinkedList();

        changeListener = new ODOMChangeListener() {
            public void changed(ODOMObservable node, ODOMChangeEvent event) {
                UndoRedoManager.this.changed(node, event);
            }
        };
    }
View Full Code Here

Examples of com.volantis.mcs.eclipse.common.odom.ODOMChangeListener

            }
        };
        // register the listener with the list builder
        listValueBuilder.addModifyListener(listBuilderListener);

        odomChangeListener = new ODOMChangeListener() {
            // javadoc inherited
            public void changed(ODOMObservable node,
                                ODOMChangeEvent event) {
                // update the lisBuilder to reflect the change
                updateListBuilder();
View Full Code Here

Examples of com.volantis.mcs.eclipse.common.odom.ODOMChangeListener

        // create this forms display area
        createDisplayArea(TITLE, MESSAGE);

        // Will respond to changes to the policy definition element in order
        // to update the controls
        odomChangeListener = new ODOMChangeListener() {
            // javadoc inherited
            public void changed(ODOMObservable node,
                                ODOMChangeEvent event) {
                // Only update the attribute controls if the event is not
                // a detach.
View Full Code Here

Examples of com.volantis.mcs.eclipse.common.odom.ODOMChangeListener

        private void updateODOMAttributes(PropertyChangeEvent changeEvent) {
            String name = changeEvent.getProperty();
            Object newValue = changeEvent.getNewValue();
            if (newValue != null) {
                ProxyElement odomElement = getOdomElement();
                ODOMChangeListener odomChangeListener = getOdomChangeListener();

                odomElement.removeChangeListener(odomChangeListener);
                odomElement.setAttribute(name, newValue.toString());
                odomElement.addChangeListener(odomChangeListener);
            }
View Full Code Here

Examples of com.volantis.mcs.eclipse.common.odom.ODOMChangeListener

        treeViewer.setInput(rootElement);
        treeViewer.expandToLevel(2);

        // Add an ODOMChangeListener to the root element to allow us to
        // update/refresh the table as appropriate.
        context.addChangeListener(new ODOMChangeListener() {
            public void changed(ODOMObservable node,
                                ODOMChangeEvent event) {

                final ODOMElement contextRootElement = context.getRootElement();
                if (rootElement == null && contextRootElement != null ||
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.