Search in sources :

Example 6 with MediaQuery

use of com.gargoylesoftware.css.parser.media.MediaQuery in project LoboEvolution by LoboEvolution.

the class MediaListImpl method getMediaText.

/**
 * <p>getMediaText.</p>
 *
 * @return the media text
 */
public String getMediaText() {
    final StringBuilder sb = new StringBuilder();
    boolean isNotFirst = false;
    for (final MediaQuery mediaQuery : mediaQueries_) {
        if (isNotFirst) {
            sb.append(", ");
        } else {
            isNotFirst = true;
        }
        sb.append(mediaQuery.toString());
    }
    return sb.toString();
}
Also used : MediaQuery(com.gargoylesoftware.css.parser.media.MediaQuery)

Example 7 with MediaQuery

use of com.gargoylesoftware.css.parser.media.MediaQuery in project LoboEvolution by LoboEvolution.

the class MediaListImpl method equalsMedia.

private boolean equalsMedia(final MediaListImpl ml) {
    if ((ml == null) || (getLength() != ml.getLength())) {
        return false;
    }
    int i = 0;
    for (final MediaQuery mediaQuery : mediaQueries_) {
        final String m1 = mediaQuery.getMedia();
        final String m2 = ml.mediaQuery(i).getMedia();
        if (!LangUtils.equals(m1, m2)) {
            return false;
        }
        i++;
    }
    return true;
}
Also used : MediaQuery(com.gargoylesoftware.css.parser.media.MediaQuery)

Aggregations

MediaQuery (com.gargoylesoftware.css.parser.media.MediaQuery)7 CSSParseException (com.gargoylesoftware.css.parser.CSSParseException)2 Property (com.gargoylesoftware.css.dom.Property)1 CSSOMParser (com.gargoylesoftware.css.parser.CSSOMParser)1 MediaQueryList (com.gargoylesoftware.css.parser.media.MediaQueryList)1 IOException (java.io.IOException)1