Applies the given change to the gallery view.<p>

@param changeEvent the change event
482466
private void applyChangeToGalleryTree(CmsSitemapChangeEvent changeEvent) {

        CmsSitemapChange change = changeEvent.getChange();
        switch (change.getChangeType()) {
            case delete:
                CmsGalleryTreeItem deleteItem = m_galleryTreeItems.get(change.getEntryId());
                if (deleteItem != null) {
                    deleteItem.removeFromParent();
                }

                break;

            case undelete:
            case create:
                String typeName = m_controller.getGalleryType(
                    new Integer(change.getNewResourceTypeId())).getResourceType();
                if (typeName != null) {
                    CmsGalleryFolderEntry galleryFolder = new CmsGalleryFolderEntry();
                    galleryFolder.setSitePath(change.getSitePath());
                    galleryFolder.setResourceType(typeName);
                    galleryFolder.setStructureId(change.getEntryId());
                    galleryFolder.setOwnProperties(change.getOwnProperties());
                    galleryFolder.setIconClasses(
                        m_controller.getGalleryType(new Integer(change.getNewResourceTypeId())).getBigIconClasses());
                    CmsGalleryTreeItem folderItem = new CmsGalleryTreeItem(galleryFolder);
                    CmsSitemapHoverbar.installOn(m_controller, folderItem, galleryFolder.getStructureId());
                    m_galleryTypeItems.get(typeName).addChild(folderItem);
                    m_galleryTreeItems.put(galleryFolder.getStructureId(), folderItem);
                }
                break;

            case modify:
                CmsGalleryTreeItem changeItem = m_galleryTreeItems.get(change.getEntryId());
                if (changeItem != null) {
                    CmsListItemWidget widget = changeItem.getListItemWidget();
                    for (CmsPropertyModification mod : change.getPropertyChanges()) {
                        if (mod.getName().equals(CmsClientProperty.PROPERTY_TITLE)) {
                            widget.setTitleLabel(mod.getValue());
                        }
                    }
                    String oldPath = changeItem.getSitePath();
                    if ((change.getName() != null) && !oldPath.endsWith("/" + change.getName())) {
                        String newPath = CmsResource.getParentFolder(oldPath) + change.getName() + "/";
                        changeItem.updateSitePath(newPath);
                    }

                }
                break;
            case bumpDetailPage:
            case clipboardOnly:
            case remove:
            default:
                // nothing to do
        }
    }
985854
@Override
    @InterfaceAudience.Private
    public void changed(Database.ChangeEvent event) {
        final List<DocumentChange> changes = event.getChanges();
        supportExecutor.submit(new Runnable() {
            @Override
            public void run() {
                submitRevisions(changes);
            }
        });
    }
149205
void onFormatterChange(String formatterId) {

        m_formatter = formatterId;
        CmsFormatterConfig config = m_elementBean.getFormatters().get(m_containerId).get(formatterId);
        renderSettingsForm(config.getSettingConfig(), config.getNestedFormatterPrefixes());
    }
153471
private void addChangeListener(JavaScriptObject changeListener, String changeScope) {

        try {
            System.out.println("Adding native listener for scope " + changeScope);
            m_entityObserver.addEntityChangeListener(new CmsEntityChangeListenerWrapper(changeListener), changeScope);
        } catch (Exception e) {

            CmsDebugLog.getInstance().printLine("Exception occured during listener registration" + e.getMessage());
        }
    }
885421
@Override
	public void onMapViewChanged(MapViewChangedEvent event) {
		if (null != activeViewConfig && !event.isSameScaleLevel()) {
			renderViewConfig(activeViewConfig.getViewConfig());
		}
	}
1348141
public void propertyChange(final java.beans.PropertyChangeEvent evt)
    {
        super.propertyChange(evt);
        if (this.getDateParam().equalsIgnoreCase(evt.getPropertyName()))
            if (evt.getNewValue() instanceof Date)
        {
            Container container = this.getParent();
            if (container instanceof JCalendarDualField)
                container = container.getParent();
            if (container instanceof JTable)
            {   // Always
                JTable jtable = (JTable)container;
                int iRow = jtable.getSelectedRow();
                jtable.setValueAt(evt.getNewValue(), iRow, m_iColumn);
            }
        }
    }
450112
public void addEntityChangeListener(I_CmsEntityChangeListener changeListener, String changeScope) {

        if (m_observerdEntity == null) {
            throw new RuntimeException("The Observer has been cleared, no listener registration possible.");
        }
        if (!m_changeListeners.containsKey(changeScope)) {
            m_changeListeners.put(changeScope, new ArrayList<I_CmsEntityChangeListener>());
            // if changeScope==null, it is a global change listener, and we don't need a scope value
            if (changeScope != null) {
                // save the current change scope value
                m_scopeValues.put(changeScope, CmsContentDefinition.getValueForPath(m_observerdEntity, changeScope));
            }
        }
        m_changeListeners.get(changeScope).add(changeListener);
    }
860300
protected void fireValueChange(boolean force) {

        String currentValue = getValue();
        if (force || !currentValue.equals(m_previousValue)) {
            m_previousValue = currentValue;
            ValueChangeEvent.fire(this, currentValue);
        }

    }
714915
protected void fireValueChange() {
		if (this.listeners != null) {
			final ProgressionEvent event = new ProgressionEvent(this, isRootModel());
			for (final ProgressionListener listener : this.listeners.getListeners(ProgressionListener.class)) {
				listener.onProgressionValueChanged(event);
			}
		}
	}
555027
protected void applyChange(CmsSitemapChange change) {

        // update the clip board data
        if (change.getClipBoardData() != null) {
            getData().getClipboardData().setDeletions(change.getClipBoardData().getDeletions());
            getData().getClipboardData().setModifications(change.getClipBoardData().getModifications());
        }
        switch (change.getChangeType()) {
            case bumpDetailPage:
                CmsDetailPageTable detailPageTable = getData().getDetailPageTable();
                if (detailPageTable.contains(change.getEntryId())) {
                    detailPageTable.bump(change.getEntryId());
                }
                break;
            case clipboardOnly:
                // nothing to do
                break;
            case remove:
                CmsClientSitemapEntry entry = getEntryById(change.getEntryId());
                entry.setInNavigation(false);
                CmsPropertyModification propMod = new CmsPropertyModification(
                    entry.getId(),
                    CmsClientProperty.PROPERTY_NAVTEXT,
                    null,
                    true);
                executePropertyModification(propMod);
                propMod = new CmsPropertyModification(entry.getId(), CmsClientProperty.PROPERTY_NAVTEXT, null, true);
                executePropertyModification(propMod);
                entry.normalizeProperties();
                break;
            case undelete:
                updateEntry(change.getParentId());
                break;
            case create:
                CmsClientSitemapEntry newEntry = change.getUpdatedEntry();
                getEntryById(change.getParentId()).insertSubEntry(newEntry, change.getPosition(), this);
                newEntry.initializeAll(this);
                if (isDetailPage(newEntry)) {
                    CmsDetailPageInfo info = getDetailPageInfo(newEntry.getId());
                    if (info == null) {
                        info = new CmsDetailPageInfo(
                            newEntry.getId(),
                            newEntry.getSitePath(),
                            newEntry.getDetailpageTypeName(),
                            newEntry.getVfsModeIcon());
                    }
                    addDetailPageInfo(info);
                }
                break;
            case delete:
                removeEntry(change.getEntryId(), change.getParentId());
                break;
            case modify:
                if (change.hasNewParent() || change.hasChangedPosition()) {
                    CmsClientSitemapEntry moved = getEntryById(change.getEntryId());
                    String oldSitepath = moved.getSitePath();
                    CmsClientSitemapEntry sourceParent = getEntry(CmsResource.getParentFolder(oldSitepath));
                    sourceParent.removeSubEntry(moved.getId());
                    CmsClientSitemapEntry destParent = change.hasNewParent()
                    ? getEntryById(change.getParentId())
                    : sourceParent;
                    if (change.getPosition() < destParent.getSubEntries().size()) {
                        destParent.insertSubEntry(moved, change.getPosition(), this);
                    } else {
                        // inserting as last entry of the parent list
                        destParent.addSubEntry(moved, this);
                    }
                    if (change.hasNewParent()) {
                        cleanupOldPaths(oldSitepath, destParent.getSitePath());
                    }
                }
                if (change.hasChangedName()) {
                    CmsClientSitemapEntry changed = getEntryById(change.getEntryId());
                    String oldSitepath = changed.getSitePath();
                    String parentPath = CmsResource.getParentFolder(oldSitepath);
                    String newSitepath = CmsStringUtil.joinPaths(parentPath, change.getName());
                    changed.updateSitePath(newSitepath, this);
                    cleanupOldPaths(oldSitepath, newSitepath);
                }
                if (change.hasChangedProperties()) {
                    for (CmsPropertyModification modification : change.getPropertyChanges()) {
                        executePropertyModification(modification);
                    }
                    getEntryById(change.getEntryId()).normalizeProperties();
                }
                if (change.getUpdatedEntry() != null) {
                    CmsClientSitemapEntry oldEntry = getEntryById(change.getEntryId());
                    CmsClientSitemapEntry parent = getEntry(CmsResource.getParentFolder(oldEntry.getSitePath()));
                    removeEntry(change.getEntryId(), parent.getId());
                    parent.insertSubEntry(change.getUpdatedEntry(), oldEntry.getPosition(), this);
                    change.getUpdatedEntry().initializeAll(this);
                }
                break;
            default:
        }
        if (change.getChangeType() != ChangeType.delete) {
            recomputeProperties();
        }
        m_eventBus.fireEventFromSource(new CmsSitemapChangeEvent(change), this);
    }
987659
public void valueChanged( ListSelectionEvent e ) {
        if( !e.getValueIsAdjusting() ) {

            // We need to install this new value into the value model, but
            // we don't want to propogate it back down to the adapted selection
            // model (since we are responding to a change in that model).
            skipSelectionModelUpdate = true;
            setValue(getSelectedRows());
            skipSelectionModelUpdate = false;
        }
    }
1342819
protected void firePropertyChange(PropertyKey propertyKey, Object oldValue, Object newValue)
    {
        // No change support instance means no listeners
        if (_changeSupport == null)
            return;

        _changeSupport.firePropertyChange(propertyKey.getPropertyName(), oldValue, newValue);
    }
1258837
public void firePropertyChange(PropertyChangeEvent evt) {
		Object oldValue = evt.getOldValue();
		Object newValue = evt.getNewValue();
		if (ObjectUtils.nullSafeEquals(oldValue, newValue)) {
			return;
		}

		String propertyName = evt.getPropertyName();
		PropertyChangeSupport child = null;
		if (children != null) {
			if (children != null && propertyName != null) {
				child = (PropertyChangeSupport) children.get(propertyName);
			}
		}

		if (listeners != null) {
			Object[] listenerList = listeners.getListenerList();
			for (int i = 0; i <= listenerList.length - 2; i += 2) {
				if (listenerList[i] == PropertyChangeListener.class) {
					((PropertyChangeListener) listenerList[i + 1]).propertyChange(evt);
				}
			}
		}

		if (child != null) {
			child.firePropertyChange(evt);
		}
	}
187716
public void updateTreeContent(List<CmsGalleryTreeEntry> galleryTreeEntries, List<String> selectedGalleries) {

        clearList();
        m_selectedGalleries = selectedGalleries;
        if (!galleryTreeEntries.isEmpty()) {
            m_itemIterator = new TreeItemGenerator(galleryTreeEntries);
            loadMoreItems();
        } else {
            showIsEmptyLabel();
        }
        onContentChange();
    }
472837
protected void fireValueChangeEvent(Object oldValue, Object newValue) {
        if (logger.isDebugEnabled()) {
            logger.debug("Firing value changed event. Old value='" + oldValue + "' new value='" + newValue + "'");
        }
        final PropertyChangeListener[] propertyChangeListeners = getPropertyChangeListeners(VALUE_PROPERTY);
        if (propertyChangeListeners.length > 0) {
            final Object listenerToSkip = listenerToSkipHolder.get();
            final PropertyChangeEvent propertyChangeEvent = new PropertyChangeEvent(this, VALUE_PROPERTY, oldValue,
                    newValue);
            for (PropertyChangeListener listener : propertyChangeListeners) {
                if (listener != listenerToSkip) {
                    listener.propertyChange(propertyChangeEvent);
                }
            }
        }
    }
1371490
public void propertyChange(PropertyChangeEvent evt) {
		originalValue = getValue();
		if (deliverValueChangeEvents) {
			mediatedValueHolder.setValue(originalValue);
			updateDirtyState();
		}
	}
588331
@SuppressWarnings("WeakerAccess")
    public void addChangeListener(@NonNull ControllerChangeListener changeListener) {
        if (!changeListeners.contains(changeListener)) {
            changeListeners.add(changeListener);
        }
    }