|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.ug2t.unifiedGui.CSSTools
public class CSSTools
A simple CSS file handling class. Reading, writing, querying of css values.
| Nested Class Summary | |
|---|---|
class |
CSSTools.MoCSSData
A small inner class to act as the model for a css element. |
| Field Summary | |
|---|---|
(package private) java.util.Hashtable |
__CSS
Contains the element matchings to a name, each element is stored as a MoCSSData element. |
(package private) java.lang.String |
__fileName
The current file name of the loaded CSS data. |
| Constructor Summary | |
|---|---|
CSSTools()
|
|
| Method Summary | |
|---|---|
void |
commit()
Writes the file that was loaded with the load(String)
method out. |
void |
commit(java.lang.String xNewFile)
Writes the CSS data out to a new file at the given location by the variable. |
static CSSTools |
getTool(java.lang.String xFileName)
|
java.lang.String |
getValue(java.lang.String xClass,
java.lang.String xAttr)
Obtains the value match for the given css element class and the given attribute key, or an emtpy string ("") when there is NO match. |
java.lang.String |
getValue(java.lang.String xClass,
java.lang.String xAttr,
java.lang.String xDef)
Obtains the value match for the given css element class and the given attribute key, or an emtpy string ("") when there is NO match. |
boolean |
hasCSS(java.lang.String xClass)
Simple boolean check to see if the given css element class is stored in memory (ie in the loaded file). |
void |
load(java.lang.String xFileName)
This method will load the given CSS file into memory for use.l |
void |
remove(java.lang.String xClass)
Removes a full css element from memory. |
void |
remove(java.lang.String xClass,
java.lang.String xAttr)
Removes a css attribute from memory that matches the given css element classs name and attribute name. |
void |
set(java.lang.String xClass,
java.lang.String xAttr,
java.lang.String xValue)
Sets or enters a new css element-attribute key-value match to memory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
java.util.Hashtable __CSS
java.lang.String __fileName
| Constructor Detail |
|---|
public CSSTools()
| Method Detail |
|---|
public void load(java.lang.String xFileName)
throws java.io.IOException
xFileName - the absolute file name (path) to the css file.
java.io.IOException - if one occurs.
public static CSSTools getTool(java.lang.String xFileName)
throws java.lang.Exception
java.lang.Exception
public void commit()
throws java.io.IOException
load(String)
method out.
java.io.IOExceptionout again.
public void commit(java.lang.String xNewFile)
throws java.io.IOException
xNewFile - the new location (file name and path)
java.io.IOException - if an IO exception occurs.
public void set(java.lang.String xClass,
java.lang.String xAttr,
java.lang.String xValue)
xClass - the css elementxAttr - the attribute namexValue - the value.
public void remove(java.lang.String xClass,
java.lang.String xAttr)
xClass - css class to remove fromxAttr - the property to remove from memory.public void remove(java.lang.String xClass)
xClass - css element to remove.
public java.lang.String getValue(java.lang.String xClass,
java.lang.String xAttr,
java.lang.String xDef)
xClass - css element that the value is needed forxAttr - the attribute whose value is neededxDef - default value
public java.lang.String getValue(java.lang.String xClass,
java.lang.String xAttr)
xClass - css element that the value is needed forxAttr - the attribute whose value is needed
public boolean hasCSS(java.lang.String xClass)
xClass - Css element that may be stored.
|
WidgetServer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||