congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Parser.parseMediaList
Code IndexAdd Tabnine to your IDE (free)

How to use
parseMediaList
method
in
org.apache.batik.css.parser.Parser

Best Java code snippets using org.apache.batik.css.parser.Parser.parseMediaList (Showing top 6 results out of 315)

origin: apache/batik

/**
 * Parses a media rule.
 */
protected void parseMediaRule() {
  if (current != LexicalUnits.IDENTIFIER) {
    reportError("identifier");
    return;
  }
  CSSSACMediaList ml = parseMediaList();
  try {
    documentHandler.startMedia(ml);
    if (current != LexicalUnits.LEFT_CURLY_BRACE) {
      reportError("left.curly.brace");
    } else {
      nextIgnoreSpaces();
      loop: for (;;) {
        switch (current) {
        case LexicalUnits.EOF:
        case LexicalUnits.RIGHT_CURLY_BRACE:
          break loop;
        default:
          parseRuleSet();
        }
      }
      nextIgnoreSpaces();
    }
  } finally {
    documentHandler.endMedia(ml);
  }
}
origin: org.apache.xmlgraphics/batik-css

/**
 * Parses a media rule.
 */
protected void parseMediaRule() {
  if (current != LexicalUnits.IDENTIFIER) {
    reportError("identifier");
    return;
  }
  CSSSACMediaList ml = parseMediaList();
  try {
    documentHandler.startMedia(ml);
    if (current != LexicalUnits.LEFT_CURLY_BRACE) {
      reportError("left.curly.brace");
    } else {
      nextIgnoreSpaces();
      loop: for (;;) {
        switch (current) {
        case LexicalUnits.EOF:
        case LexicalUnits.RIGHT_CURLY_BRACE:
          break loop;
        default:
          parseRuleSet();
        }
      }
      nextIgnoreSpaces();
    }
  } finally {
    documentHandler.endMedia(ml);
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Parses a media rule.
 */
protected void parseMediaRule() {
  if (current != LexicalUnits.IDENTIFIER) {
    reportError("identifier");
    return;
  }
  CSSSACMediaList ml = parseMediaList();
  try {
    documentHandler.startMedia(ml);
    if (current != LexicalUnits.LEFT_CURLY_BRACE) {
      reportError("left.curly.brace");
    } else {
      nextIgnoreSpaces();
      loop: for (;;) {
        switch (current) {
        case LexicalUnits.EOF:
        case LexicalUnits.RIGHT_CURLY_BRACE:
          break loop;
        default:
          parseRuleSet();
        }
      }
      nextIgnoreSpaces();
    }
  } finally {
    documentHandler.endMedia(ml);
  }
}
origin: org.apache.xmlgraphics/batik-css

/**
 * Parses an import rule. Assumes the current token is '@import'.
 */
protected void parseImportRule() {
  String uri = null;
  switch (current) {
  default:
    reportError("string.or.uri");
    return;
  case LexicalUnits.STRING:
  case LexicalUnits.URI:
    uri = scanner.getStringValue();
    nextIgnoreSpaces();
  }
  CSSSACMediaList ml;
  if (current != LexicalUnits.IDENTIFIER) {
    ml = new CSSSACMediaList();
    ml.append("all");
  } else {
    ml = parseMediaList();
  }
  documentHandler.importStyle(uri, ml, null);
  if (current != LexicalUnits.SEMI_COLON) {
    reportError("semicolon");
  } else {
    next();
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Parses an import rule. Assumes the current token is '@import'.
 */
protected void parseImportRule() {
  String uri = null;
  switch (current) {
  default:
    reportError("string.or.uri");
    return;
  case LexicalUnits.STRING:
  case LexicalUnits.URI:
    uri = scanner.getStringValue();
    nextIgnoreSpaces();
  }
  CSSSACMediaList ml;
  if (current != LexicalUnits.IDENTIFIER) {
    ml = new CSSSACMediaList();
    ml.append("all");
  } else {
    ml = parseMediaList();
  }
  documentHandler.importStyle(uri, ml, null);
  if (current != LexicalUnits.SEMI_COLON) {
    reportError("semicolon");
  } else {
    next();
  }
}
origin: apache/batik

/**
 * Parses an import rule. Assumes the current token is '@import'.
 */
protected void parseImportRule() {
  String uri = null;
  switch (current) {
  default:
    reportError("string.or.uri");
    return;
  case LexicalUnits.STRING:
  case LexicalUnits.URI:
    uri = scanner.getStringValue();
    nextIgnoreSpaces();
  }
  CSSSACMediaList ml;
  if (current != LexicalUnits.IDENTIFIER) {
    ml = new CSSSACMediaList();
    ml.append("all");
  } else {
    ml = parseMediaList();
  }
  documentHandler.importStyle(uri, ml, null);
  if (current != LexicalUnits.SEMI_COLON) {
    reportError("semicolon");
  } else {
    next();
  }
}
org.apache.batik.css.parserParserparseMediaList

Javadoc

Parses a media list.

Popular methods of Parser

  • parseStyleDeclaration
    Parses the given reader.
  • parseStyleSheet
    SAC: Implements org.w3c.css.sac.Parser#parseStyleSheet(InputSource).
  • createCSSParseException
    Creates a parse exception.
  • createScanner
    Creates a scanner, given an InputSource.
  • dimension
    Converts the current lexical unit to a dimension.
  • formatMessage
    Implements org.apache.batik.i18n.Localizable#formatMessage(String,Object[]).
  • hexcolor
    Converts a hash unit to a RGB color.
  • isPseudoElement
    Tells whether or not the given string represents a pseudo-element.
  • next
    Advances to the next token, ignoring comments.
  • nextIgnoreSpaces
    Advances to the next token and skip the spaces, ignoring comments.
  • number
    Converts the current lexical unit to a float.
  • parseAtRule
    Parses an unknown rule.
  • number,
  • parseAtRule,
  • parseExpression,
  • parseFontFaceRule,
  • parseFunction,
  • parseImportRule,
  • parseMediaRule,
  • parsePageRule,
  • parsePriorityInternal

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • getSystemService (Context)
  • setRequestProperty (URLConnection)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now