Package org.apache.batik.dom.util

Examples of org.apache.batik.dom.util.HashTable$Entry


                     n != null && n.getNodeType() != n.ELEMENT_NODE;
                     n = n.getNextSibling()) {
                    if (n instanceof StyleSheetProcessingInstruction) {
                        StyleSheetProcessingInstruction sspi;
                        sspi = (StyleSheetProcessingInstruction)n;
                        HashTable attrs = sspi.getPseudoAttributes();
                        final String title = (String)attrs.get("title");
                        String alt = (String)attrs.get("alternate");
                        if (title != null && "yes".equals(alt)) {
                            JRadioButtonMenuItem button;
                            button = new JRadioButtonMenuItem(title);

                            button.addActionListener
View Full Code Here


        while (child != null) {
            if (child.getNodeType() == child.PROCESSING_INSTRUCTION_NODE) {
                ProcessingInstruction pi
                    = (ProcessingInstruction)child;
               
                HashTable table = new HashTable();
                DOMUtilities.parseStyleSheetPIData(pi.getData(),
                                                   table);

                Object type = table.get(PSEUDO_ATTRIBUTE_TYPE);
                if (XSL_PROCESSING_INSTRUCTION_TYPE.equals(type)) {
                    Object href = table.get(PSEUDO_ATTRIBUTE_HREF);
                    if (href != null) {
                        return href.toString();
                    } else {
                        return null;
                    }
View Full Code Here

     * not trigger an <code>EventListener</code> designated to use
     * capture. 
     */
    public void addEventListener(String type, EventListener listener,
         boolean useCapture) {
  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);
  }
  if (!list.contains(listener)) {
      list.add(listener);
  }
    }
View Full Code Here

     * separately.  Removal of a capturing listener does not affect a
     * non-capturing version of the same listener, and vice versa. 
     */
    public void removeEventListener(String type, EventListener listener,
            boolean useCapture) {
  HashTable listeners;
  if (useCapture) {
      listeners = capturingListeners;
  } else {
      listeners = bubblingListeners;
  }
  if (listeners == null) {
      return;
  }
  EventListenerList list = (EventListenerList)listeners.get(type);
  if (list != null) {
      list.remove(listener);
            if (list.size() == 0) {
                listeners.remove(type);
            }
  }
    }
View Full Code Here

     * @param type the event type
     * @param useCapture
     */
    public EventListenerList getEventListeners(String type,
                 boolean useCapture) {
  HashTable listeners=(useCapture)?capturingListeners:bubblingListeners;
  if (listeners == null) {
      return null;
  } else {
      return (EventListenerList) listeners.get(type);
  }
    }
View Full Code Here

    /**
     * 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;
View Full Code Here

                     n != null && n.getNodeType() != Node.ELEMENT_NODE;
                     n = n.getNextSibling()) {
                    if (n instanceof StyleSheetProcessingInstruction) {
                        StyleSheetProcessingInstruction sspi;
                        sspi = (StyleSheetProcessingInstruction)n;
                        HashTable attrs = sspi.getPseudoAttributes();
                        final String title = (String)attrs.get("title");
                        String alt = (String)attrs.get("alternate");
                        if (title != null && "yes".equals(alt)) {
                            JRadioButtonMenuItem button;
                            button = new JRadioButtonMenuItem(title);

                            button.addActionListener
View Full Code Here

     * not trigger an <code>EventListener</code> designated to use
     * capture. 
     */
    public void addEventListener(String type, EventListener listener,
         boolean useCapture) {
  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);
  }
  if (!list.contains(listener)) {
      list.add(listener);
  }
    }
View Full Code Here

     * separately.  Removal of a capturing listener does not affect a
     * non-capturing version of the same listener, and vice versa. 
     */
    public void removeEventListener(String type, EventListener listener,
            boolean useCapture) {
  HashTable listeners;
  if (useCapture) {
      listeners = capturingListeners;
  } else {
      listeners = bubblingListeners;
  }
  if (listeners == null) {
      return;
  }
  EventListenerList list = (EventListenerList)listeners.get(type);
  if (list != null) {
      list.remove(listener);
            if (list.size() == 0) {
                listeners.remove(type);
            }
  }
    }
View Full Code Here

     * @param type the event type
     * @param useCapture
     */
    public EventListenerList getEventListeners(String type,
                 boolean useCapture) {
  HashTable listeners=(useCapture)?capturingListeners:bubblingListeners;
  if (listeners == null) {
      return null;
  } else {
      return (EventListenerList) listeners.get(type);
  }
    }
View Full Code Here

TOP

Related Classes of org.apache.batik.dom.util.HashTable$Entry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.