de.matthiasmann.twl.textarea
Class StyleSheet

java.lang.Object
  extended by de.matthiasmann.twl.textarea.StyleSheet
All Implemented Interfaces:
StyleSheetResolver

public class StyleSheet
extends java.lang.Object
implements StyleSheetResolver

A style sheet.

Each StyleSheet class contains the following rules:

pre {
    white-space: pre
}


Nested Class Summary
static class StyleSheet.AtRule
           
 
Constructor Summary
StyleSheet()
           
 
Method Summary
 StyleSheet.AtRule getAtRule(int idx)
           
 int getNumAtRules()
           
 void layoutFinished()
           
 void parse(java.io.Reader r)
           
 void parse(java.lang.String style)
           
 void parse(java.net.URL url)
           
 void registerFonts(FontMapper fontMapper, java.net.URL baseUrl)
           
 Style resolve(Style style)
           
 void startLayout()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StyleSheet

public StyleSheet()
Method Detail

parse

public void parse(java.net.URL url)
           throws java.io.IOException
Throws:
java.io.IOException

parse

public void parse(java.lang.String style)
           throws java.io.IOException
Throws:
java.io.IOException

parse

public void parse(java.io.Reader r)
           throws java.io.IOException
Throws:
java.io.IOException

getNumAtRules

public int getNumAtRules()

getAtRule

public StyleSheet.AtRule getAtRule(int idx)

registerFonts

public void registerFonts(FontMapper fontMapper,
                          java.net.URL baseUrl)

layoutFinished

public void layoutFinished()
Specified by:
layoutFinished in interface StyleSheetResolver

startLayout

public void startLayout()
Specified by:
startLayout in interface StyleSheetResolver

resolve

public Style resolve(Style style)
Specified by:
resolve in interface StyleSheetResolver