net.sf.latexdraw.parsers.css
Class AbstractCSSParser

java.lang.Object
  extended by net.sf.latexdraw.parsers.CodeParser
      extended by net.sf.latexdraw.parsers.css.AbstractCSSParser
All Implemented Interfaces:
Parser
Direct Known Subclasses:
CSSStyleParser

public abstract class AbstractCSSParser
extends CodeParser

Defines an abstract CSS parser that contains functions to help the CSS parsing.
This file is part of LaTeXDraw
Copyright (c) 2005-2012 Arnaud BLOUIN

LaTeXDraw is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

LaTeXDraw is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

12/05/08

Since:
2.0.3
Version:
3.0
Author:
Arnaud BLOUIN

Field Summary
 
Fields inherited from class net.sf.latexdraw.parsers.CodeParser
codeCore, EOC
 
Constructor Summary
AbstractCSSParser(java.lang.String code)
          Creates and initialises the CSS parser.
 
Method Summary
 boolean isComment()
           
 boolean isWSP()
           
 java.lang.String skipComment()
          Skips the comment.
 void skipWSP()
          Skips the useless characters.
 
Methods inherited from class net.sf.latexdraw.parsers.CodeParser
getChar, getCharAt, getCode, getCodeCore, getLinePosition, getPosition, incLinePosition, initialise, isEOC, isEOL, nextChar, setCode, setCodeCore, setLinePosition, setPosition, skipWSPComments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.latexdraw.parsers.Parser
parse
 

Constructor Detail

AbstractCSSParser

public AbstractCSSParser(java.lang.String code)
Creates and initialises the CSS parser.

Parameters:
code - The code to parse.
Throws:
java.lang.IllegalArgumentException - If the given code is null.
Since:
2.0.3
Method Detail

isComment

public boolean isComment()
Specified by:
isComment in class CodeParser
Returns:
True if the current position points to a comment token.

skipComment

public java.lang.String skipComment()
Description copied from class: CodeParser
Skips the comment.

Specified by:
skipComment in class CodeParser
Returns:
The read comment.

isWSP

public boolean isWSP()
Specified by:
isWSP in class CodeParser
Returns:
True if the current character is a whitespace/ignorable character.

skipWSP

public void skipWSP()
Description copied from class: CodeParser
Skips the useless characters.

Specified by:
skipWSP in class CodeParser