|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecte4s.util.E4Object
e4s.html.E4HtmlObject
e4s.html.E4HtmlElementGeneral
public abstract class E4HtmlElementGeneral
General class for HTML elements. This base class defines some of the function necessary to handle HTML elements throught the e4s environment, hold and build their sub-elements, Java-Script and E4CSS elements.
E4HtmlElement,
E4HtmlContent,
E4HtmlContentElement| Field Summary | |
|---|---|
protected E4ElementsVec |
m_elements
Vector of all subelements of the rs.html classes. |
protected E4ScriptsVec |
m_needed_scripts
Vector containing all Java scripts defined. |
| Fields inherited from class e4s.html.E4HtmlObject |
|---|
m_parent_e4sID |
| Fields inherited from class e4s.util.E4Object |
|---|
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET |
| Constructor Summary | |
|---|---|
E4HtmlElementGeneral()
|
|
E4HtmlElementGeneral(E4HtmlElementGeneral e)
|
|
E4HtmlElementGeneral(E4ID parent_id)
|
|
| Method Summary | |
|---|---|
void |
addScript(E4HtmlElement_Intf element,
E4ServletImplementation_Intf servlet)
Add the E4JavaScript entries of the specified element
to the current element. |
void |
addScript(E4JavaScript_Intf jscript)
Add this E4JavaScript to the scripts Vector. |
void |
addScript(E4JavaScript_Intf jscript,
boolean force_replace)
|
void |
addStyleForEditing(E4StylesHash v,
E4ServletImplementation_Intf servlet,
STYLE_Name style_name)
|
void |
addTranslationForEditing(E4TranslationsVec v,
E4ServletImplementation_Intf servlet,
E4Label trans)
|
protected void |
buildStyleAttribute(E4StringBufferHtml buf)
Appends the styles to the buffer (... style="..."...) |
protected void |
buildStyleClassReference(E4StringBufferHtml buf)
Create the CLASS=.. element in the HTML output buffer. |
void |
collectScripts(E4ScriptsVec v,
E4ServletImplementation_Intf servlet)
Get a vector of used scripts from all subelements. |
void |
collectStylesForEditing(E4StylesHash v,
E4ServletImplementation_Intf servlet)
Build a list (Vector) with style definitions used so far during display of this page. |
void |
collectStylesForEditing(E4StylesHash v,
E4ServletImplementation_Intf servlet,
STYLE_Name style_name,
boolean subclasses)
Build a list (Vector) with style definitions used so far during display of this page. |
static void |
collectStylesForEditing(E4StylesHash v,
E4ServletImplementation_Intf servlet,
STYLE_Name style_name,
java.lang.Class clazz)
|
void |
collectTranslationsForEditing(E4TranslationsVec v,
E4ServletImplementation_Intf servlet)
Build a list (Vector) with translation texts used so far during display of this page. |
void |
collectTranslationsForEditing(E4TranslationsVec v,
E4ServletImplementation_Intf servlet,
E4Label_Intf trans,
boolean subclasses)
Add a label and build a list (Vector) with translation texts used so far during display of this page. |
E4JavaScript |
createScript()
Creates a E4JavaScript, given a generic name, and adds it to the scripts Vector. |
E4JavaScript |
createScript(java.lang.String jscript_name)
Creates a E4JavaScript by the given name and adds it to the scripts Vector. |
java.lang.String |
debugToString(int n)
|
E4HtmlElement_Intf |
findElement(java.lang.Class clazz)
Find any element in the element vector by the given clazz. |
E4HtmlElement_Intf |
findElement(java.lang.Class clazz,
boolean deeper)
Find any element in the element vector by the given clazz. |
E4HtmlElement_Intf |
findElement(int id)
Find an element in the element vector by the given id, but do not look in sub-elements. |
E4HtmlElement_Intf |
findElement(int id,
boolean deeper)
Find an element in the element vector by the given id. |
java.util.Enumeration |
getElements()
Deprecated. |
E4ElementsVec |
getElementsVec()
The elements Vector. |
E4InputField_Intf |
getField(E4InputFieldName_Intf fieldname)
Get the associated object for the specified field. |
int |
getId()
Returns the unique identification id for this element. |
E4HtmlElement_Intf |
getLastElement()
Get the last element of direct related sub elements. |
java.lang.String |
getStringContent()
|
java.lang.String |
getStyle()
|
STYLE_Name |
getSTYLE()
|
java.lang.String |
getStyle(java.lang.String style_name)
|
boolean |
hasScripts()
Test, if scripts have been added or created. |
boolean |
hasSTYLE()
|
boolean |
isContentClass()
This function returns false always, except for the collecting class E4HtmlContent which is a special case. |
static boolean |
isE4InputField_Intf(java.lang.Object obj)
Check, if given object implements the E4InputField_Intf interface. |
void |
openTag(java.lang.String tag,
E4StringBufferHtml buf)
Create a StringBuffer to be used at HTML output, include any E4CSS class tag. |
void |
removeAll()
Remove all elements |
void |
removeElementById(int id)
Remove an element by it's ID |
void |
removeElements()
Remove all elements. |
void |
removeElements(java.lang.Class clazz)
Remove all elements after and including a specified class. |
void |
removeStyle(java.lang.String style)
|
void |
setId(int id)
Sets a unique identification id for this element. |
void |
setReadOnly(boolean displayonly)
Run throught all child elements recursivly, and if those elements implement interface E4InputField_Intf then
set them to read-only state. |
void |
setStyle(java.lang.String style,
int value)
|
void |
setStyle(java.lang.String style,
java.lang.String value)
|
void |
setSTYLE(STYLE_Name style)
|
void |
setValue(E4CgiParams params)
Run throught all child elements recursivly, and if those elements implement interface E4InputField_Intf then
store the parameter. |
E4StyleAttributes |
Style()
Get the attributes for that element. |
protected E4StyleAttributes |
Style(boolean create)
Get the attributes for that element. |
void |
toHtml_hidden(E4StringBufferHtml buf,
E4ServletImplementation_Intf servlet)
|
void |
toHtml(E4StringBufferHtml buf,
E4ServletImplementation_Intf servlet)
|
boolean |
validate(E4CgiParams params,
E4ServletImplementation_Intf servlet)
Run throught all child elements recursivly, and if those elements implement interface E4InputField_Intf then
store the parameter and execute the E4InputField_Intf.validate() function. |
| Methods inherited from class e4s.html.E4HtmlObject |
|---|
_getSVNVersionString, E4ID, E4ID, set_e4sID |
| 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 |
|---|
protected E4ElementsVec m_elements
protected E4ScriptsVec m_needed_scripts
| Constructor Detail |
|---|
public E4HtmlElementGeneral()
public E4HtmlElementGeneral(E4HtmlElementGeneral e)
public E4HtmlElementGeneral(E4ID parent_id)
| Method Detail |
|---|
public boolean hasScripts()
E4JavaScript is existing in
this current object, not checking sub-related objects.#addScript(),
createScript(),
E4JavaScriptpublic E4HtmlElement_Intf getLastElement()
public void removeAll()
public void collectScripts(E4ScriptsVec v,
E4ServletImplementation_Intf servlet)
E4JavaScriptpublic void addScript(E4JavaScript_Intf jscript)
E4JavaScript to the scripts Vector.
jscript - the script to add. Note, that a script with the same name can only be added once.createScript( String )public E4JavaScript createScript(java.lang.String jscript_name)
E4JavaScript by the given name and adds it to the scripts Vector.
jscript_name - the name of the script to be created and added.#addScript( E4JavaScript ),
createScript()public E4JavaScript createScript()
E4JavaScript, given a generic name, and adds it to the scripts Vector.
#addScript( E4JavaScript ),
createScript( String )
public void addScript(E4HtmlElement_Intf element,
E4ServletImplementation_Intf servlet)
E4JavaScript entries of the specified element
to the current element. This normally happens automatically, as long as
HTML elements are linked together using the E4HtmlElement.addElement(e4s.html.E4HtmlElement_Intf)
function. But in some cases, this might not be the case but scripts are required
in the above element.
element - element where the scripts shall be taken from#addScript(e4s.html.E4JavaScript),
e4s.html.E4HtmlElement_Intf#collectScripts...
public void addScript(E4JavaScript_Intf jscript,
boolean force_replace)
public void toHtml(E4StringBufferHtml buf,
E4ServletImplementation_Intf servlet)
throws java.lang.Exception
java.lang.Exception
public void toHtml_hidden(E4StringBufferHtml buf,
E4ServletImplementation_Intf servlet)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String debugToString(int n)
public java.util.Enumeration getElements()
getElementsVec()public E4ElementsVec getElementsVec()
public void removeElements()
public void removeElementById(int id)
id - the ID of the element.setId(int)public void removeElements(java.lang.Class clazz)
clazz - the class to be removedremoveElements()
public E4HtmlElement_Intf findElement(int id,
boolean deeper)
id - the unique id to look for. Note that most elements
have a value of -1 if undefined, and that there could be
multiple elements having the same id (in this case, the first
one is returned).deeper - also search in sub-elements
getId(),
setId(int),
findElement(int),
#findElement(Class,int)public E4HtmlElement_Intf findElement(int id)
id - the unique id to look for. Note that most elements
have a value of -1 if undefined, and that there could be
multiple elements having the same id (in this case, the first
one is returned).
getId(),
setId(int),
findElement(int,boolean),
findElement(Class)public E4HtmlElement_Intf findElement(java.lang.Class clazz)
clazz - the class of the element to look for
findElement(int),
findElement(Class,boolean)
public E4HtmlElement_Intf findElement(java.lang.Class clazz,
boolean deeper)
throws java.lang.Exception
clazz - the class of the element to look fordeeper - true: run throught the whole hirachy, false only the current level of child elements
java.lang.ExceptionfindElement(int,boolean),
findElement(Class)public void setId(int id)
id - the unique identificatin idfindElement(int),
getId()public int getId()
findElement(int),
setId(int)public boolean isContentClass()
public void setSTYLE(STYLE_Name style)
public void openTag(java.lang.String tag,
E4StringBufferHtml buf)
tag - the HTML tag, e.g. "BODY"setSTYLE(e4s.html.style.STYLE_Name),
getSTYLE(),
#buildStyleClassReference(StringBuffer),
STYLE_Name,
e4s.servlet.E4ServletImplementation_Intf#toHtmlprotected void buildStyleClassReference(E4StringBufferHtml buf)
buf - the buffer to write in. This may not be null, it typically starts with the
tag, e.g. "See Also:setSTYLE(e4s.html.style.STYLE_Name),
getSTYLE(),
#createTag(String),
STYLE_Name,
e4s.servlet.E4ServletImplementation_Intf#toHtmlprotected void buildStyleAttribute(E4StringBufferHtml buf)
buf - a valid output bufferpublic STYLE_Name getSTYLE()
public boolean hasSTYLE()
public void collectStylesForEditing(E4StylesHash v,
E4ServletImplementation_Intf servlet)
E4StyleUsage.
v - the Vector where the styles will be collected, may not be nullE4ServletImplementation_Intf.sessionCanEditStyles(),
#collectStylesForEditing(e4s.html.style.E4StylesHash, STYLE_Name, boolean)
public void collectStylesForEditing(E4StylesHash v,
E4ServletImplementation_Intf servlet,
STYLE_Name style_name,
boolean subclasses)
E4StyleUsage.
v - the Vector where the styles will be collected, may not be nullstyle_name - style to be addedsubclasses - collect sublasses as wellE4ServletImplementation_Intf.sessionCanEditStyles(),
#collectStylesForEditing(e4s.html.style.E4StylesHash)
public static void collectStylesForEditing(E4StylesHash v,
E4ServletImplementation_Intf servlet,
STYLE_Name style_name,
java.lang.Class clazz)
public void addStyleForEditing(E4StylesHash v,
E4ServletImplementation_Intf servlet,
STYLE_Name style_name)
public void collectTranslationsForEditing(E4TranslationsVec v,
E4ServletImplementation_Intf servlet)
E4Label.
v - the Vector where the styles will be collected, may not be nullservlet - the current servlet instanceE4Label_Intf
public void collectTranslationsForEditing(E4TranslationsVec v,
E4ServletImplementation_Intf servlet,
E4Label_Intf trans,
boolean subclasses)
E4Label.
v - the Vector where the styles will be collected, may not be nulltrans - to be addedservlet - the current servlet instancesubclasses - collect sublasses as wellE4ServletImplementation_Intf.sessionCanEditTranslations()
public void addTranslationForEditing(E4TranslationsVec v,
E4ServletImplementation_Intf servlet,
E4Label trans)
public void setValue(E4CgiParams params)
E4InputField_Intf then
store the parameter.
params - the current cgi parametersE4InputField_Intf.setValue(e4s.html.E4CgiParams),
#validate(e4s.html.E4CgiParams)public E4InputField_Intf getField(E4InputFieldName_Intf fieldname)
fieldname - the name of the field
public boolean validate(E4CgiParams params,
E4ServletImplementation_Intf servlet)
throws java.lang.Exception
E4InputField_Intf then
store the parameter and execute the E4InputField_Intf.validate() function. In any case, you can use
this function as well to set values out of the E4CgiParams to the E4InputField_Intf objects.
params - the current cgi parameters
java.lang.ExceptionE4InputField_Intf.validate(),
setValue(e4s.html.E4CgiParams),
e4s.html.input.extended.E4InputField#validate(e4s.html.E4CgiParams)public void setReadOnly(boolean displayonly)
E4InputField_Intf then
set them to read-only state.
displayonly - true sets the display-only modeE4InputField_Intf.setReadOnly()public static boolean isE4InputField_Intf(java.lang.Object obj)
E4InputField_Intf interface.
obj - the Object to be checked
public java.lang.String getStringContent()
public void removeStyle(java.lang.String style)
public void setStyle(java.lang.String style,
int value)
public void setStyle(java.lang.String style,
java.lang.String value)
public java.lang.String getStyle()
public java.lang.String getStyle(java.lang.String style_name)
protected E4StyleAttributes Style(boolean create)
create - create style attributes only if true
public E4StyleAttributes Style()
|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||