/** * Returns the local name of elements this definition will bind. */ public String getElementLocalName() { String qname = getAttributeNS(null, "element"); return DOMUtilities.getLocalName(qname); } }
/** * Returns the local name of elements this definition will bind. */ public String getElementLocalName() { String qname = getAttributeNS(null, "element"); return DOMUtilities.getLocalName(qname); } }
/** * Returns the local name of elements this definition will bind. */ public String getElementLocalName() { String qname = getAttributeNS(null, "element"); return DOMUtilities.getLocalName(qname); } }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#getLocalName()}. */ public String getLocalName() { return (getNamespaceURI() == null) ? null : DOMUtilities.getLocalName(getNodeName()); }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#getLocalName()}. */ public String getLocalName() { return (getNamespaceURI() == null) ? null : DOMUtilities.getLocalName(getNodeName()); }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#getLocalName()}. */ public String getLocalName() { return (getNamespaceURI() == null) ? null : DOMUtilities.getLocalName(getNodeName()); }
/** * Removes the scripting listeners from the given element. */ protected void removeScriptingListenersOn(Element elt) { String eltNS = elt.getNamespaceURI(); String eltLN = elt.getLocalName(); if (SVGConstants.SVG_NAMESPACE_URI.equals(eltNS) && SVG12Constants.SVG_HANDLER_TAG.equals(eltLN)) { // For this 'handler' element, remove the handler for the given // event type. AbstractElement tgt = (AbstractElement) elt.getParentNode(); String eventType = elt.getAttributeNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, XMLConstants.XML_EVENTS_EVENT_ATTRIBUTE); String eventNamespaceURI = XMLConstants.XML_EVENTS_NAMESPACE_URI; if (eventType.indexOf(':') != -1) { String prefix = DOMUtilities.getPrefix(eventType); eventType = DOMUtilities.getLocalName(eventType); eventNamespaceURI = elt.lookupNamespaceURI(prefix); } EventListener listener = (EventListener) handlerScriptingListeners.put (eventNamespaceURI, eventType, elt, null); tgt.removeEventListenerNS (eventNamespaceURI, eventType, listener, false); } super.removeScriptingListenersOn(elt); }
/** * Removes the scripting listeners from the given element. */ protected void removeScriptingListenersOn(Element elt) { String eltNS = elt.getNamespaceURI(); String eltLN = elt.getLocalName(); if (SVGConstants.SVG_NAMESPACE_URI.equals(eltNS) && SVG12Constants.SVG_HANDLER_TAG.equals(eltLN)) { // For this 'handler' element, remove the handler for the given // event type. AbstractElement tgt = (AbstractElement) elt.getParentNode(); String eventType = elt.getAttributeNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, XMLConstants.XML_EVENTS_EVENT_ATTRIBUTE); String eventNamespaceURI = XMLConstants.XML_EVENTS_NAMESPACE_URI; if (eventType.indexOf(':') != -1) { String prefix = DOMUtilities.getPrefix(eventType); eventType = DOMUtilities.getLocalName(eventType); eventNamespaceURI = ((AbstractElement) elt).lookupNamespaceURI(prefix); } EventListener listener = (EventListener) handlerScriptingListeners.put (eventNamespaceURI, eventType, elt, null); tgt.removeEventListenerNS (eventNamespaceURI, eventType, listener, false); } super.removeScriptingListenersOn(elt); }
/** * Implements the behavior of Document.createElementNS() for this * DOM implementation. */ public Element createElementNS(AbstractDocument document, String namespaceURI, String qualifiedName) { if (SVGConstants.SVG_NAMESPACE_URI.equals(namespaceURI)) { String name = DOMUtilities.getLocalName(qualifiedName); ElementFactory ef = (ElementFactory)factories.get(name); if (ef != null) return ef.create(DOMUtilities.getPrefix(qualifiedName), document); throw document.createDOMException (DOMException.NOT_FOUND_ERR, "invalid.element", new Object[] { namespaceURI, qualifiedName }); } return super.createElementNS(document, namespaceURI, qualifiedName); }
/** * Implements the behavior of Document.createElementNS() for this * DOM implementation. */ public Element createElementNS(AbstractDocument document, String namespaceURI, String qualifiedName) { if (SVGConstants.SVG_NAMESPACE_URI.equals(namespaceURI)) { String name = DOMUtilities.getLocalName(qualifiedName); ElementFactory ef = factories.get(name); if (ef != null) return ef.create(DOMUtilities.getPrefix(qualifiedName), document); throw document.createDOMException (DOMException.NOT_FOUND_ERR, "invalid.element", new Object[] { namespaceURI, qualifiedName }); } return super.createElementNS(document, namespaceURI, qualifiedName); }
/** * Implements the behavior of Document.createElementNS() for this * DOM implementation. */ public Element createElementNS(AbstractDocument document, String namespaceURI, String qualifiedName) { if (namespaceURI != null && namespaceURI.length() == 0) { namespaceURI = null; } if (namespaceURI == null) return new GenericElement(qualifiedName.intern(), document); if (customFactories != null) { String name = DOMUtilities.getLocalName(qualifiedName); ElementFactory cef; cef = (ElementFactory)customFactories.get(namespaceURI, name); if (cef != null) { return cef.create(DOMUtilities.getPrefix(qualifiedName), document); } } return new GenericElementNS(namespaceURI.intern(), qualifiedName.intern(), document); }
/** * Implements the behavior of Document.createElementNS() for this * DOM implementation. */ public Element createElementNS(AbstractDocument document, String namespaceURI, String qualifiedName) { if (namespaceURI != null && namespaceURI.length() == 0) { namespaceURI = null; } if (namespaceURI == null) return new GenericElement(qualifiedName.intern(), document); if (customFactories != null) { String name = DOMUtilities.getLocalName(qualifiedName); ElementFactory cef; cef = (ElementFactory)customFactories.get(namespaceURI, name); if (cef != null) { return cef.create(DOMUtilities.getPrefix(qualifiedName), document); } } return new GenericElementNS(namespaceURI.intern(), qualifiedName.intern(), document); }
/** * Implements the behavior of Document.createElementNS() for this * DOM implementation. */ public Element createElementNS(AbstractDocument document, String namespaceURI, String qualifiedName) { if (namespaceURI != null && namespaceURI.length() == 0) { namespaceURI = null; } if (namespaceURI == null) return new GenericElement(qualifiedName.intern(), document); if (customFactories != null) { String name = DOMUtilities.getLocalName(qualifiedName); ElementFactory cef; cef = (ElementFactory)customFactories.get(namespaceURI, name); if (cef != null) { return cef.create(DOMUtilities.getPrefix(qualifiedName), document); } } return new GenericElementNS(namespaceURI.intern(), qualifiedName.intern(), document); }
if (eventType.indexOf(':') != -1) { String prefix = DOMUtilities.getPrefix(eventType); eventType = DOMUtilities.getLocalName(eventType); eventNamespaceURI = ((AbstractElement) elt).lookupNamespaceURI(prefix);
public void actionPerformed(ActionEvent e) { if (getMode() == VIEW_MODE) { enterEditMode(); } // Find the contextElement Element contextElement = clonedElement; if (getMode() == ADD_NEW_ELEMENT) { contextElement = previewElement; } DefaultTableModel model = (DefaultTableModel) attributesTable.getModel(); int[] selectedRows = attributesTable.getSelectedRows(); for (int i = 0; i < selectedRows.length; i++) { String attrName = (String) model.getValueAt(selectedRows[i], 0); if (attrName != null) { String prefix = DOMUtilities.getPrefix(attrName); String localName = DOMUtilities.getLocalName(attrName); String namespaceURI = getNamespaceURI(prefix); contextElement.removeAttributeNS(namespaceURI, localName); } } shouldProcessUpdate = false; updateAttributesTable(contextElement); shouldProcessUpdate = true; updateNodeXmlArea(contextElement); } }
public void actionPerformed(ActionEvent e) { if (getMode() == VIEW_MODE) { enterEditMode(); } // Find the contextElement Element contextElement = clonedElement; if (getMode() == ADD_NEW_ELEMENT) { contextElement = previewElement; } DefaultTableModel model = (DefaultTableModel) attributesTable.getModel(); int[] selectedRows = attributesTable.getSelectedRows(); for (int selectedRow : selectedRows) { String attrName = (String) model.getValueAt(selectedRow, 0); if (attrName != null) { String prefix = DOMUtilities.getPrefix(attrName); String localName = DOMUtilities.getLocalName(attrName); String namespaceURI = getNamespaceURI(prefix); contextElement.removeAttributeNS(namespaceURI, localName); } } shouldProcessUpdate = false; updateAttributesTable(contextElement); shouldProcessUpdate = true; updateNodeXmlArea(contextElement); } }
return new GenericElement(qualifiedName.intern(), document); String name = DOMUtilities.getLocalName(qualifiedName); String prefix = DOMUtilities.getPrefix(qualifiedName); if (SVG12Constants.SVG_NAMESPACE_URI.equals(namespaceURI)) {
return new GenericElement(qualifiedName.intern(), document); String name = DOMUtilities.getLocalName(qualifiedName); String prefix = DOMUtilities.getPrefix(qualifiedName); if (SVG12Constants.SVG_NAMESPACE_URI.equals(namespaceURI)) {
/** * Implements the behavior of Document.createElementNS() for this * DOM implementation. */ public Element createElementNS(AbstractDocument document, String namespaceURI, String qualifiedName) { if (SVGConstants.SVG_NAMESPACE_URI.equals(namespaceURI)) { String name = DOMUtilities.getLocalName(qualifiedName); ElementFactory ef = (ElementFactory)factories.get(name); if (ef != null) return ef.create(DOMUtilities.getPrefix(qualifiedName), document); throw document.createDOMException (DOMException.NOT_FOUND_ERR, "invalid.element", new Object[] { namespaceURI, qualifiedName }); } return super.createElementNS(document, namespaceURI, qualifiedName); }
return new GenericElement(qualifiedName.intern(), document); String name = DOMUtilities.getLocalName(qualifiedName); String prefix = DOMUtilities.getPrefix(qualifiedName); if (SVG12Constants.SVG_NAMESPACE_URI.equals(namespaceURI)) {