Package org.apache.batik.dom.util

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


     * Creates a stylesheet from the data of an xml-stylesheet
     * processing instruction or throws a DOMException when it is not possible
     * to create the given stylesheet.
     */
    public StyleSheet createStyleSheet(Node n, String data) {
        HashTable attrs = new HashTable();
        attrs.put("alternate", "no");
        attrs.put("media", "all");
        DOMUtilities.parseStyleSheetPIData(data, attrs);

        String type = (String)attrs.get("type");

        if ("text/css".equals(type)) {
            try {
                String title = (String)attrs.get("title");
                String media = (String)attrs.get("media");
                String href  = (String)attrs.get("href");

                SVGOMDocument doc = (SVGOMDocument)n.getOwnerDocument();
                URL url = new URL(doc.getURLObject(), href);

                CSSOMStyleSheet ss = new CSSOMStyleSheet
View Full Code Here


    return setNamedItem(arg);
      }
      checkNode(arg);

      if (tableNS == null) {
    tableNS = new HashTable();
      }
      NamedNodeHashMap attr = (NamedNodeHashMap)tableNS.get(nsURI);
      if (attr == null) {
    tableNS.put(nsURI, attr = new NamedNodeHashMap());
    attr.namespaceURI = nsURI;
View Full Code Here

                for (Node n = tw.nextNode(); n != null; n = tw.nextNode()) {
                    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

                     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

     */
    public void registerCustomElementFactory(String namespaceURI,
                                             String localName,
                                             ElementFactory factory) {
        if (customFactories == null) {
            customFactories = new HashTable();
        }
        HashTable ht = (HashTable)customFactories.get(namespaceURI);
        if (ht == null) {
            customFactories.put(namespaceURI, ht = new HashTable());
        }
        ht.put(localName, factory);
    }
View Full Code Here

            }
            return ef.create(DOMUtilities.getPrefix(qualifiedName), this);
        }
        if (namespaceURI != null) {
            if (customFactories != null) {
                HashTable ht = (HashTable)customFactories.get(namespaceURI);
                if (ht != null) {
                    String name = DOMUtilities.getLocalName(qualifiedName);
                    // System.out.println("Name: " + name);
                    ElementFactory cef = (ElementFactory)ht.get(name);
                    if (cef != null) {
                        return cef.create(DOMUtilities.getPrefix(qualifiedName), this);
                    }
                }
            }
View Full Code Here

     * Creates a stylesheet from the data of an xml-stylesheet
     * processing instruction or throws a DOMException when it is not possible
     * to create the given stylesheet.
     */
    public StyleSheet createStyleSheet(Node n, String data) {
        HashTable attrs = new HashTable();
        attrs.put("alternate", "no");
        attrs.put("media", "all");
        DOMUtilities.parseStyleSheetPIData(data, attrs);

        String type = (String)attrs.get("type");

        if ("text/css".equals(type)) {
            try {
                String title = (String)attrs.get("title");
                String media = (String)attrs.get("media");
                String href  = (String)attrs.get("href");

                SVGOMDocument doc = (SVGOMDocument)n.getOwnerDocument();
                URL url = new URL(doc.getURLObject(), href);

                CSSOMStyleSheet ss = new CSSOMStyleSheet
View Full Code Here

    /**
     * Creates a stylesheet from the data of an xml-stylesheet
     * processing instruction or return null.
     */
    public StyleSheet createStyleSheet(Node n, String data) {
        HashTable attrs = new HashTable();
        attrs.put("alternate", "no");
        attrs.put("media", "all");
        DOMUtilities.parseStyleSheetPIData(data, attrs);

        String type = (String)attrs.get("type");

        if ("text/css".equals(type)) {
            try {
                String title = (String)attrs.get("title");
                String media = (String)attrs.get("media");
                String href  = (String)attrs.get("href");

                SVGOMDocument doc = (SVGOMDocument)n.getOwnerDocument();
                URL url = new URL(doc.getURLObject(), href);

                CSSOMStyleSheet ss = new CSSOMStyleSheet
View Full Code Here

                     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

TOP

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

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.