/** * Creates an EventException. Overrides this method if you need to * create your own RangeException subclass. * @param code the exception code * @param key the resource key * @param args arguments to use when formatting the message */ protected EventException createEventException(short code, String key, Object[] args) { try { AbstractDocument doc = (AbstractDocument) node.getOwnerDocument(); return new EventException(code, doc.formatMessage(key, args)); } catch (Exception e) { return new EventException(code, key); } }
/** * Creates an EventException. Overrides this method if you need to * create your own RangeException subclass. * @param code the exception code * @param key the resource key * @param args arguments to use when formatting the message */ protected EventException createEventException(short code, String key, Object[] args) { try { AbstractDocument doc = (AbstractDocument) node.getOwnerDocument(); return new EventException(code, doc.formatMessage(key, args)); } catch (Exception e) { return new EventException(code, key); } }
/** * Creates an EventException. Overrides this method if you need to * create your own RangeException subclass. * @param code the exception code * @param key the resource key * @param args arguments to use when formatting the message */ protected EventException createEventException(short code, String key, Object[] args) { try { AbstractDocument doc = (AbstractDocument) node.getOwnerDocument(); return new EventException(code, doc.formatMessage(key, args)); } catch (Exception e) { return new EventException(code, key); } }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#setTextContent(String)}. */ public void setTextContent(String s) throws DOMException { if (isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { new Integer(getNodeType()), getNodeName() }); } if (getNodeType() != DOCUMENT_TYPE_NODE) { while (getFirstChild() != null) { removeChild(getFirstChild()); } appendChild(getOwnerDocument().createTextNode(s)); } }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#setTextContent(String)}. */ public void setTextContent(String s) throws DOMException { if (isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] {(int) getNodeType(), getNodeName() }); } if (getNodeType() != DOCUMENT_TYPE_NODE) { while (getFirstChild() != null) { removeChild(getFirstChild()); } appendChild(getOwnerDocument().createTextNode(s)); } }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#setTextContent(String)}. */ public void setTextContent(String s) throws DOMException { if (isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] {(int) getNodeType(), getNodeName() }); } if (getNodeType() != DOCUMENT_TYPE_NODE) { while (getFirstChild() != null) { removeChild(getFirstChild()); } appendChild(getOwnerDocument().createTextNode(s)); } }