Codota Logo
ImportRule
Code IndexAdd Codota to your IDE (free)

How to use
ImportRule
in
org.apache.batik.css.engine

Best Java code snippets using org.apache.batik.css.engine.ImportRule (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: org.apache.xmlgraphics/batik-css

/**
 * <b>SAC</b>: Implements {@link
 * DocumentHandler#importStyle(String,SACMediaList,String)}.
 */
public void importStyle(String       uri,
            SACMediaList media,
            String       defaultNamespaceURI)
  throws CSSException {
  ImportRule ir = new ImportRule();
  ir.setMediaList(media);
  ir.setParent(styleSheet);
  ParsedURL base = getCSSBaseURI();
  ParsedURL url;
  if (base == null) {
    url = new ParsedURL(uri);
  } else {
    url = new ParsedURL(base, uri);
  }
  ir.setURI(url);
  styleSheet.append(ir);
}
origin: org.netbeans.modules/org-netbeans-modules-visualweb-designer-cssengine

if (isMediaMatchingForDocument(doc, mr.getMediaList())) {
  URL url = mr.getURI();
  String urlString = mr.getRelativeUri();
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Parses and fills the given style-sheet.
 * @param ss The stylesheet to fill.
 * @param uri The base URI.
 */
protected void parseStyleSheet(StyleSheet ss, InputSource is, ParsedURL uri)
  throws IOException {
  parser.setSelectorFactory(CSSSelectorFactory.INSTANCE);
  parser.setConditionFactory(cssConditionFactory);
  try {
    cssBaseURI = uri;
    styleSheetDocumentHandler.styleSheet = ss;
    parser.setDocumentHandler(styleSheetDocumentHandler);
    parser.parseStyleSheet(is);
    // Load the imported sheets.
    int len = ss.getSize();
    for (int i = 0; i < len; i++) {
      Rule r = ss.getRule(i);
      if (r.getType() != ImportRule.TYPE) {
        // @import rules must be the first rules.
        break;
      }
      ImportRule ir = (ImportRule)r;
      parseStyleSheet(ir, ir.getURI());
    }
  } finally {
    cssBaseURI = null;
  }
}
origin: apache/batik

/**
 * Parses and fills the given style-sheet.
 * @param ss The stylesheet to fill.
 * @param uri The base URI.
 */
protected void parseStyleSheet(StyleSheet ss, InputSource is, ParsedURL uri)
  throws IOException {
  parser.setSelectorFactory(CSSSelectorFactory.INSTANCE);
  parser.setConditionFactory(cssConditionFactory);
  try {
    cssBaseURI = uri;
    styleSheetDocumentHandler.styleSheet = ss;
    parser.setDocumentHandler(styleSheetDocumentHandler);
    parser.parseStyleSheet(is);
    // Load the imported sheets.
    int len = ss.getSize();
    for (int i = 0; i < len; i++) {
      Rule r = ss.getRule(i);
      if (r.getType() != ImportRule.TYPE) {
        // @import rules must be the first rules.
        break;
      }
      ImportRule ir = (ImportRule)r;
      parseStyleSheet(ir, ir.getURI());
    }
  } finally {
    cssBaseURI = null;
  }
}
origin: apache/batik

/**
 * <b>SAC</b>: Implements {@link
 * DocumentHandler#importStyle(String,SACMediaList,String)}.
 */
public void importStyle(String       uri,
            SACMediaList media,
            String       defaultNamespaceURI)
  throws CSSException {
  ImportRule ir = new ImportRule();
  ir.setMediaList(media);
  ir.setParent(styleSheet);
  ParsedURL base = getCSSBaseURI();
  ParsedURL url;
  if (base == null) {
    url = new ParsedURL(uri);
  } else {
    url = new ParsedURL(base, uri);
  }
  ir.setURI(url);
  styleSheet.append(ir);
}
origin: org.apache.xmlgraphics/batik-css

/**
 * Parses and fills the given style-sheet.
 * @param ss The stylesheet to fill.
 * @param uri The base URI.
 */
protected void parseStyleSheet(StyleSheet ss, InputSource is, ParsedURL uri)
  throws IOException {
  parser.setSelectorFactory(CSSSelectorFactory.INSTANCE);
  parser.setConditionFactory(cssConditionFactory);
  try {
    cssBaseURI = uri;
    styleSheetDocumentHandler.styleSheet = ss;
    parser.setDocumentHandler(styleSheetDocumentHandler);
    parser.parseStyleSheet(is);
    // Load the imported sheets.
    int len = ss.getSize();
    for (int i = 0; i < len; i++) {
      Rule r = ss.getRule(i);
      if (r.getType() != ImportRule.TYPE) {
        // @import rules must be the first rules.
        break;
      }
      ImportRule ir = (ImportRule)r;
      parseStyleSheet(ir, ir.getURI());
    }
  } finally {
    cssBaseURI = null;
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * <b>SAC</b>: Implements {@link
 * DocumentHandler#importStyle(String,SACMediaList,String)}.
 */
public void importStyle(String       uri,
            SACMediaList media,
            String       defaultNamespaceURI)
  throws CSSException {
  ImportRule ir = new ImportRule();
  ir.setMediaList(media);
  ir.setParent(styleSheet);
  ParsedURL base = getCSSBaseURI();
  ParsedURL url;
  if (base == null) {
    url = new ParsedURL(uri);
  } else {
    url = new ParsedURL(base, uri);
  }
  ir.setURI(url);
  styleSheet.append(ir);
}
org.apache.batik.css.engineImportRule

Javadoc

This class represents a @import CSS rule.

Most used methods

  • getURI
    Returns the URI of the imported stylesheet.
  • <init>
  • setMediaList
  • setParent
  • setURI
    Sets the URI of the imported stylesheet.
  • getMediaList
  • getRelativeUri

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getContentResolver (Context)
  • onCreateOptionsMenu (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Reference (javax.naming)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now