Class MediaQuery

  extended byfi.hut.tml.xsmiles.mlfc.general.MediaQuery

public class MediaQuery
extends java.lang.Object

A class to evaluate media queries defined by the "media" attribute in xml-stylesheet processing instructions or xhtml css link elements. This class has been programmed according to Media Queries Working Draft, 23 Jan. 2002. See the individual methods how X-Smiles handles the media features, for instance "monochrome".

Field Summary
static java.lang.String guiName
Constructor Summary
Method Summary
static boolean evalMedia(java.lang.String media, XMLConfigurer guiconfig)
          Evaluate media attribute according to the Media Queries spec.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static java.lang.String guiName
Constructor Detail


public MediaQuery()
Method Detail


public static boolean evalMedia(java.lang.String media,
                                XMLConfigurer guiconfig)
Evaluate media attribute according to the Media Queries spec. If this method returns true, it is ok to use the stylesheet.

This method is static, so it can be called from where ever people want to call it. The only requirement is that XMLConfigurer is known.

media - Media attribute as a string
guiconfig - XMLConfigurer describing the properties of the current GUI
true if Media Queries evaluate to true, otherwise false

X-Smiles 1.2