www.element4solution.com

e4s.html.style
Class E4CssFile

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.html.style.E4CssFile

public class E4CssFile
extends E4Object

Implementation in memory of the contents of the .css file.

Since:
JDK 1.4
See Also:
E4ModuleImplementation.getCSS()

Field Summary
static int LEVEL_APPLICATION
           
static int LEVEL_CLIENT
           
static java.lang.String SESSION_PARAM_CSS
           
 
Fields inherited from class e4s.util.E4Object
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET
 
Constructor Summary
E4CssFile(CSS_Name name, int level)
           
 
Method Summary
static java.lang.String _getSVNVersionString()
           
 void addStyle(java.lang.String html_tag, CLASS_Name classname, java.lang.String definition)
           
 void addStyle(STYLE_Name name, java.lang.String definition)
           
 void addStyle(STYLE sd)
           
static E4CssFile[] getCSS(CSS_Name[] name, E4ApplObj_Intf applobj)
           
 java.lang.String getFilename(E4ApplObj_Intf applobj)
          Get the filename for the E4CSS file.
 int getLevel()
           
 CSS_Name getName()
           
 java.lang.String getPath(E4ApplObj_Intf applobj)
          Get the filename for the E4CSS file.
 STYLE getStyle(STYLE_Name styleName)
           
 void readCssFile(E4ApplObj_Intf applobj)
           
 java.lang.String toString()
           
 void updateStyle(STYLE_Name styleName, java.lang.String definition)
           
 void updateStyle(STYLE style)
           
 void writeCssFile(E4ApplObj_Intf applobj)
          Save the E4CSS file.
 void writeCssFile(java.io.File file)
           
 
Methods inherited from class e4s.util.E4Object
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SESSION_PARAM_CSS

public static final java.lang.String SESSION_PARAM_CSS
See Also:
Constant Field Values

LEVEL_APPLICATION

public static final int LEVEL_APPLICATION
See Also:
Constant Field Values

LEVEL_CLIENT

public static final int LEVEL_CLIENT
See Also:
Constant Field Values
Constructor Detail

E4CssFile

public E4CssFile(CSS_Name name,
                 int level)
Method Detail

getLevel

public int getLevel()

getName

public CSS_Name getName()

addStyle

public void addStyle(STYLE sd)

addStyle

public void addStyle(STYLE_Name name,
                     java.lang.String definition)

addStyle

public void addStyle(java.lang.String html_tag,
                     CLASS_Name classname,
                     java.lang.String definition)

updateStyle

public void updateStyle(STYLE style)

updateStyle

public void updateStyle(STYLE_Name styleName,
                        java.lang.String definition)

getStyle

public STYLE getStyle(STYLE_Name styleName)

writeCssFile

public void writeCssFile(E4ApplObj_Intf applobj)
                  throws java.lang.Exception
Save the E4CSS file. The file will be written to getName() + "." + CSS_Name.EXTENSION, and a backup file is saved using the extension .bak. Beside this, the version in the CSS_Name is incremented. This is because when style sheets will be edited online, the browser will not reload and so the old E4CSS is used. Older files are deleted.

Throws:
java.lang.Exception

writeCssFile

public void writeCssFile(java.io.File file)
                  throws java.lang.Exception
Throws:
java.lang.Exception

getFilename

public java.lang.String getFilename(E4ApplObj_Intf applobj)
                             throws java.lang.Exception
Get the filename for the E4CSS file. This is for information purpouse only.

Parameters:
applobj - an application object containing information about the client. Could be null.
Returns:
a DOS or UNC filename.
Throws:
java.lang.Exception
See Also:
#getPath(), e4s.util.E4Settings#getStylePath(), e4s.application.E4ApplObj_Intf#getClient_RootPath()

getPath

public java.lang.String getPath(E4ApplObj_Intf applobj)
                         throws java.lang.Exception
Get the filename for the E4CSS file. This is for information purpouse only.

Parameters:
applobj - an application object containing information about the client. Could be null.
Returns:
a DOS or UNC filename.
Throws:
java.lang.Exception
See Also:
#getFilename(), e4s.util.E4Settings#getStylePath(), e4s.application.E4ApplObj_Intf#getClient_RootPath()

readCssFile

public void readCssFile(E4ApplObj_Intf applobj)
                 throws java.lang.Exception
Throws:
java.lang.Exception

getCSS

public static E4CssFile[] getCSS(CSS_Name[] name,
                                 E4ApplObj_Intf applobj)
                          throws java.lang.Exception
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Overrides:
toString in class E4Object

_getSVNVersionString

public static java.lang.String _getSVNVersionString()

www.element4solution.com