/** * Registers a DOM feature. */ protected void registerFeature(String name, Object value) { features.put(name.toLowerCase(), value); }
/** * Registers a new EventFactory object. */ public void registerEventFactory(String eventType, EventFactory factory) { eventFactories.put(eventType.toLowerCase(), factory); }
/** * Returns the pseudo attributes in a table. */ public HashTable getPseudoAttributes() { if (pseudoAttributes == null) { pseudoAttributes = new HashTable(); pseudoAttributes.put("alternate", "no"); pseudoAttributes.put("media", "all"); DOMUtilities.parseStyleSheetPIData(data, pseudoAttributes); } return pseudoAttributes; }
/** * Creates a mapping in the table on the top of the stack. */ public String put(String s, String v) { if (current.pushCount != 0) { current.pushCount--; current = new Link(current); } if (s.length() == 0) current.defaultStr = v; return (String)current.table.put(s, v); }
/** * Returns an array of EventListeners that match the given namespace URI. */ public Entry[] getEventListeners(String namespaceURI) { if (namespaceURI == null) { return getEventListeners(); } Entry[] ls = (Entry[]) listenersNS.get(namespaceURI); if (ls != null) { return ls; } int count = counts.get(namespaceURI); if (count == 0) { return null; } ls = new Entry[count]; listenersNS.put(namespaceURI, ls); int i = 0; for (Entry e = head; i < count; e = e.next) { if (namespaceURI.equals(e.namespaceURI)) { ls[i++] = e; } } return ls; }
"Wrong xml-stylesheet data: " + data); table.put(ident.toString().intern(), value.toString()); i++;
/** * Registers an event listener that will not be stopped by the usual * XBL stopping. */ public void addImplementationEventListenerNS(String namespaceURI, String type, EventListener listener, boolean useCapture) { HashTable listeners; if (useCapture) { if (capturingImplementationListeners == null) { capturingImplementationListeners = new HashTable(); } listeners = capturingImplementationListeners; } else { if (bubblingImplementationListeners == null) { bubblingImplementationListeners = new HashTable(); } listeners = bubblingImplementationListeners; } EventListenerList list = (EventListenerList) listeners.get(type); if (list == null) { list = new EventListenerList(); listeners.put(type, list); } list.addListener(namespaceURI, null, listener); }
/** * Registers an event listener for the given namespaced event type * in the specified group. */ public void addEventListenerNS(String namespaceURI, String type, EventListener listener, boolean useCapture, Object group) { HashTable listeners; if (useCapture) { if (capturingListeners == null) { capturingListeners = new HashTable(); } listeners = capturingListeners; } else { if (bubblingListeners == null) { bubblingListeners = new HashTable(); } listeners = bubblingListeners; } EventListenerList list = (EventListenerList) listeners.get(type); if (list == null) { list = new EventListenerList(); listeners.put(type, list); } list.addListener(namespaceURI, group, listener); }