protected void editableChanged(Node node) { if (node != null) { getModelNotifier().editableChanged(node); } }
public void aboutToReinitializeModel() { XMLModelNotifier notifier = getModelNotifier(); notifier.cancelPending(); super.aboutToReinitializeModel(); }
/** */ protected void documentTypeChanged() { if (this.refresh) return; // unlike 'resfresh', 'reinitialize' finishes loop // and flushes remaining notification que before // actually reinitializing. // ISSUE: should reinit be used instead of handlerefresh? // this.setReinitializeNeeded(true); if (this.active != null || getModelNotifier().isChanging()) return; // defer handleRefresh(); }
/** * This API allows clients to declare that they are about to make a * "large" change to the model. This change might be in terms of content * or it might be in terms of the model id or base location. * * Note that in the case of embedded calls, notification to listners is * sent only once. * * Note that the client who is making these changes has the responsibility * to restore the models state once finished with the changes. See * getMemento and restoreState. * * The method isModelStateChanging can be used by a client to determine if * the model is already in a change sequence. */ public void aboutToChangeModel() { super.aboutToChangeModel(); // technically, no need to call beginChanging so often, // since aboutToChangeModel can be nested. // but will leave as is for this release. // see modelChanged, and be sure stays coordinated there. getModelNotifier().beginChanging(); }
/** */ protected void startTagChanged(Element element) { if (element == null) return; if (getActiveParser() == null) { XMLModelUpdater updater = getModelUpdater(); setActive(updater); updater.initialize(); updater.changeStartTag(element); setActive(null); } getModelNotifier().startTagChanged(element); }
/** */ protected void endTagChanged(Element element) { if (element == null) return; if (getActiveParser() == null) { XMLModelUpdater updater = getModelUpdater(); setActive(updater); updater.initialize(); updater.changeEndTag(element); setActive(null); } getModelNotifier().endTagChanged(element); }
/** * valueChanged method * * @param node * org.w3c.dom.Node */ protected void valueChanged(Node node) { if (node == null) return; if (getActiveParser() == null) { XMLModelUpdater updater = getModelUpdater(); setActive(updater); updater.initialize(); updater.changeValue(node); setActive(null); } getModelNotifier().valueChanged(node); }
/** * childReplaced method * * @param parentNode * org.w3c.dom.Node * @param newChild * org.w3c.dom.Node * @param oldChild * org.w3c.dom.Node */ protected void childReplaced(Node parentNode, Node newChild, Node oldChild) { if (parentNode == null) return; if (getActiveParser() == null) { XMLModelUpdater updater = getModelUpdater(); setActive(updater); updater.initialize(); updater.replaceChild(parentNode, newChild, oldChild); setActive(null); } getModelNotifier().childReplaced(parentNode, newChild, oldChild); }
getModelNotifier().endChanging();
/** * attrReplaced method * * @param element * org.w3c.dom.Element * @param newAttr * org.w3c.dom.Attr * @param oldAttr * org.w3c.dom.Attr */ protected void attrReplaced(Element element, Attr newAttr, Attr oldAttr) { if (element == null) return; if (getActiveParser() == null) { XMLModelUpdater updater = getModelUpdater(); setActive(updater); updater.initialize(); updater.replaceAttr(element, newAttr, oldAttr); setActive(null); } getModelNotifier().attrReplaced(element, newAttr, oldAttr); }
XMLModelNotifier notifier = getModelNotifier(); boolean isChanging = notifier.isChanging(); getModelNotifier().beginChanging(true); XMLModelParser parser = getModelParser(); setActive(parser); setActive(null); if (!isChanging) { getModelNotifier().endChanging();
/** */ private void handleRefresh() { if (!this.refresh) return; XMLModelNotifier notifier = getModelNotifier(); boolean isChanging = notifier.isChanging(); if (!isChanging) notifier.beginChanging(true); XMLModelParser parser = getModelParser(); setActive(parser); this.document.removeChildNodes(); try { parser.replaceStructuredDocumentRegions(getStructuredDocument().getRegionList(), null); } catch (Exception ex) { Logger.logException(ex); } finally { setActive(null); if (!isChanging) notifier.endChanging(); this.refresh = false; } }
XMLModelNotifier notifier = getModelNotifier(); boolean isChanging = notifier.isChanging(); if (!isChanging)
XMLModelNotifier notifier = getModelNotifier(); boolean isChanging = notifier.isChanging(); if (!isChanging)
XMLModelNotifier notifier = getModelNotifier(); boolean isChanging = notifier.isChanging(); if (!isChanging)