fi.hut.tml.xsmiles.mlfc.general
Class MediaQuery
java.lang.Object
fi.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
|
|
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 |
guiName
public static java.lang.String guiName
MediaQuery
public MediaQuery()
evalMedia
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.
- Parameters:
media - Media attribute as a stringguiconfig - XMLConfigurer describing the properties of the current GUI
- Returns:
- true if Media Queries evaluate to true, otherwise false
X-Smiles 1.2