|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wings.style.CSSStyleSheet
public class CSSStyleSheet
| Constructor Summary | |
|---|---|
CSSStyleSheet()
Constructs an empty style sheet. |
|
CSSStyleSheet(InputStream in)
Constructs a new style sheet instance by parsing the passed input stream into read(java.io.InputStream). |
|
| Method Summary | |
|---|---|
static String |
getAttribute(Color color)
|
static CSSAttributeSet |
getAttributes(Color color,
CSSProperty cssProperty)
|
static CSSAttributeSet |
getAttributes(Insets insets)
|
static CSSAttributeSet |
getAttributes(SFont font)
|
static Color |
getBackground(CSSAttributeSet a)
Takes a set of attributes and turn it into a background color specification. |
static SFont |
getFont(CSSAttributeSet a)
Fetches the font to use for the given set of attributes. |
static Color |
getForeground(CSSAttributeSet a)
Takes a set of attributes and turn it into a foreground color specification. |
static Insets |
getInsets(CSSAttributeSet a)
|
static float |
getLength(String value)
|
static URL |
getURL(URL base,
String cssString)
|
void |
importStyleSheet(URL url)
Reads and imports a style sheet file accessible via the passed URL. |
boolean |
isFinal()
Declares if this style sheet is final or may change during runtime. |
void |
putStyle(Style style)
Register a Style in the style sheet. |
void |
read(InputStream inStream)
Creates styles by parsing an input stream. |
Set<Style> |
styles()
The Styles definitions contained in this style sheet. |
void |
write(Device out)
Write each style in set to the device. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CSSStyleSheet()
public CSSStyleSheet(InputStream in)
throws IOException
read(java.io.InputStream).
in - Input stream containing a valid CSS style sheet file.
IOException| Method Detail |
|---|
public void putStyle(Style style)
StyleSheetStyle in the style sheet.
putStyle in interface StyleSheetpublic Set<Style> styles()
StyleSheetStyles definitions contained in this style sheet.
styles in interface StyleSheetStyles contained in this style sheet
public void write(Device out)
throws IOException
write in interface RenderableIOException
public void read(InputStream inStream)
throws IOException
inStream - Stream containing style sheet source
IOExceptionpublic void importStyleSheet(URL url)
url - The url of the style sheet file.public boolean isFinal()
StyleSheet
isFinal in interface StyleSheettrue if the content of this style sheet will never change, false otherwise.public static SFont getFont(CSSAttributeSet a)
public static Insets getInsets(CSSAttributeSet a)
public static CSSAttributeSet getAttributes(Insets insets)
public static float getLength(String value)
public static Color getForeground(CSSAttributeSet a)
a - the set of attributes
public static Color getBackground(CSSAttributeSet a)
a - the set of attributes
public static URL getURL(URL base,
String cssString)
public static CSSAttributeSet getAttributes(SFont font)
public static CSSAttributeSet getAttributes(Color color,
CSSProperty cssProperty)
public static String getAttribute(Color color)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||