www.element4solution.com

e4s.util
Class E4JavaScriptLibrary

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.util.E4JavaScriptLibrary

public abstract class E4JavaScriptLibrary
extends E4Object

This module is a collection of common used standard scripts in E4S. They are covered in the Java source code to easily add them to elements but also to access them in other scripts via the E4JavaScript.getName() function.


Field Summary
static E4JavaScriptReference JS_TRACE
           
 
Fields inherited from class e4s.util.E4Object
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET
 
Constructor Summary
E4JavaScriptLibrary()
           
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
static E4JavaScript getWindowHeight()
           
static E4JavaScript getWindowHeight(E4HtmlElement_Intf e)
           
static E4JavaScript getWindowWidth()
           
static E4JavaScript getWindowWidth(E4HtmlElement_Intf e)
           
static E4JavaScript getX()
          Create a java script that gets the offsetLeft of a specified element by recursively going up the DOM.
static E4JavaScript getX(E4HtmlElement_Intf e)
          Create a java script that gets the offsetLeft of a specified element by recursively going up the DOM.
static E4JavaScript getXUntilAbsolute()
           
static E4JavaScript getXUntilAbsolute(E4HtmlElement_Intf e)
           
static E4JavaScript getY()
          Create a java script that gets the offsetTop of a specified element by recursively going up the DOM.
static E4JavaScript getY(E4HtmlElement_Intf e)
          Create a java script that gets the offsetTop of a specified element by recursively going up the DOM.
static E4JavaScript getYUntilAbsolute()
           
static E4JavaScript getYUntilAbsolute(E4HtmlElement_Intf e)
           
static E4JavaScript toInt()
          Create a java script that gets an int value out of strings that are in the form "9999px".
static E4JavaScript toInt(E4HtmlElement_Intf e)
          Create a java script that gets an int value out of strings that are in the form "9999px".
 
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, toString, 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

JS_TRACE

public static final E4JavaScriptReference JS_TRACE
Constructor Detail

E4JavaScriptLibrary

public E4JavaScriptLibrary()
Method Detail

getX

public static E4JavaScript getX()
Create a java script that gets the offsetLeft of a specified element by recursively going up the DOM. This script uses one parameter which is a DOM element.

Returns:
the created script
See Also:
getY(),
    var d = document.getElementById("XY");
    var x = getX(d);
    

getX

public static E4JavaScript getX(E4HtmlElement_Intf e)
Create a java script that gets the offsetLeft of a specified element by recursively going up the DOM. This script uses one parameter which is a DOM element.

Parameters:
e - if not null, adds the script directly to that E4S element.
Returns:
the created script
See Also:
getX(),
    var d = document.getElementById("XY");
    var x = getX(d);
    

getXUntilAbsolute

public static E4JavaScript getXUntilAbsolute()

getXUntilAbsolute

public static E4JavaScript getXUntilAbsolute(E4HtmlElement_Intf e)

getYUntilAbsolute

public static E4JavaScript getYUntilAbsolute()

getYUntilAbsolute

public static E4JavaScript getYUntilAbsolute(E4HtmlElement_Intf e)

getY

public static E4JavaScript getY()
Create a java script that gets the offsetTop of a specified element by recursively going up the DOM. This script uses one parameter which is a DOM element.

Parameters:
e - if not null, adds the script directly to that E4S element.
Returns:
the created script
See Also:
#getY(E4HtmlElement_Intf)),
    var d = document.getElementById("XY");
    var y = getY(d);
    

getY

public static E4JavaScript getY(E4HtmlElement_Intf e)
Create a java script that gets the offsetTop of a specified element by recursively going up the DOM. This script uses one parameter which is a DOM element.

Parameters:
e - if not null, adds the script directly to that E4S element.
Returns:
the created script
See Also:
getY(),
    var d = document.getElementById("XY");
    var y = getY(d);
    

toInt

public static E4JavaScript toInt()
Create a java script that gets an int value out of strings that are in the form "9999px". This script uses one parameter which is width or height string.

Parameters:
e - if not null, adds the script directly to that E4S element.
Returns:
the created script
See Also:
#toInt(E4HtmlElement_Intf))
    var d = document.getElementById("XY");
    var width = toInt(d.style.width);
    

toInt

public static E4JavaScript toInt(E4HtmlElement_Intf e)
Create a java script that gets an int value out of strings that are in the form "9999px". This script uses one parameter which is width or height string.

Parameters:
e - if not null, adds the script directly to that E4S element.
Returns:
the created script
See Also:
    var d = document.getElementById("XY");
    var width = toInt(d.style.width);
    

getWindowWidth

public static E4JavaScript getWindowWidth()

getWindowWidth

public static E4JavaScript getWindowWidth(E4HtmlElement_Intf e)

getWindowHeight

public static E4JavaScript getWindowHeight()

getWindowHeight

public static E4JavaScript getWindowHeight(E4HtmlElement_Intf e)

_getSVNVersionString

public static java.lang.String _getSVNVersionString()
Get version info string from subversion.

Returns:
the version info string.
See Also:
E4Util.getRevisionCodeFromSVN(Class)

www.element4solution.com