www.element4solution.com

e4s.html.navigation
Class E4MenuElement

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.html.E4HtmlObject
          extended by e4s.html.E4HtmlElementGeneral
              extended by e4s.html.E4HtmlElement
                  extended by e4s.html.navigation.E4MenuElement
All Implemented Interfaces:
E4HtmlElement_Intf

public class E4MenuElement
extends E4HtmlElement
implements E4HtmlElement_Intf

Menu element (interface between HTML content and menu items)

See Also:
E4MenuFrameset, E4Menu, E4ModuleMenuHandling

Field Summary
 
Fields inherited from class e4s.html.E4HtmlElementGeneral
m_elements, m_needed_scripts
 
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
E4MenuElement(E4Menu menu)
           
E4MenuElement(E4Menu menu, E4ApplObj_Intf ap)
           
E4MenuElement(java.lang.String persistantObjId, E4ServletImplementation_Intf servlet)
           
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
 int addMenuItem(A href)
           
 int addMenuItem(E4Label_Intf label, A href)
           
 int addMenuItem(E4Label_Intf label, A href, E4Permission_Intf perm)
           
 int addMenuItem(E4Label_Intf label, A href, E4Permission_Intf perm, int id)
           
 int addMenuItem(E4Label_Intf label, A href, int id)
           
 int addMenuItem(E4Label_Intf label, E4Method mref)
           
 int addMenuItem(E4Label_Intf label, E4Method mref, E4Permission_Intf perm)
           
 int addMenuItem(E4Label_Intf label, E4Method mref, int id)
           
 int addMenuItem(E4MenuItem item)
           
 int addMenuItem(java.lang.String label, A href)
           
 int addMenuItem(java.lang.String label, A href, int id)
           
 int addMenuItem(java.lang.String label, E4Method mref)
           
 int addMenuItem(java.lang.String label, E4Method mref, E4Permission_Intf perm)
           
 int addMenuItem(java.lang.String label, E4Method mref, int id)
           
 boolean changeActive(E4Method_Intf mref)
          Active the menu item with the given id and de-activate all others.
 boolean changeActive(int menu_id)
          Active the menu item with the given id and de-activate all others.
 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 collectTranslationsForEditing(E4TranslationsVec v, E4ServletImplementation_Intf servlet)
          Build a list (Vector) with translation texts used so far during display of this page.
 E4MenuItem findMenuElement(int id)
          Get the menu item by it's ID.
 E4MenuItem getActive()
           
 int getActiveId()
           
 E4CgiParams getAdditionalParams()
           
 CLASS_Name getClass_Body()
           
 java.util.Vector getDebugVec()
           
 E4Menu getMenu()
           
 java.lang.String getMenuID()
          Get the identifier for this menu
 int getRememberedID(E4ApplObj_Intf applobj)
           
 boolean getRememberID()
           
 IMG[] getUserdefinedImages()
           
 void setAdditionalParams(E4CgiParams params)
           
 void setClass_ActiveItem(CLASS_Name classname)
           
 void setClass_Baseline(CLASS_Name classname)
           
 void setClass_Body(CLASS_Name classname)
           
 void setClass_Body(STYLE_Name style)
           
 void setClass_Items(CLASS_Name classname)
           
 void setColorBaseline(E4Color color)
           
 void setImageStyle(int layout)
           
 void setRememberID()
          If called, the current active item ID will be stored in a E4UserValues with prefix #PREFIX_USER_VAL_ID.
 void setStyleGrafic()
          Set the basic layout style of the menu.
 void setStyleText()
          Set the basic layout style of the menu.
 void setUserdefinedImages(IMG[] images)
           
 void toHtml(E4StringBufferHtml buf, E4ServletImplementation_Intf servlet)
          Create the HTML output for this element.
 java.lang.String toString()
          Debug capabilities only - do not use except debugging and tracing.
 
Methods inherited from class e4s.html.E4HtmlElement
addElement, addElement, addElement, copyElements, print
 
Methods inherited from class e4s.html.E4HtmlElementGeneral
addScript, addScript, addScript, addStyleForEditing, addTranslationForEditing, buildStyleAttribute, buildStyleClassReference, collectStylesForEditing, collectStylesForEditing, collectTranslationsForEditing, createScript, createScript, debugToString, findElement, findElement, findElement, findElement, getElements, getElementsVec, getField, getId, getLastElement, getStringContent, getStyle, getSTYLE, getStyle, hasScripts, hasSTYLE, isContentClass, isE4InputField_Intf, openTag, removeAll, removeElementById, removeElements, removeElements, removeStyle, setId, setReadOnly, setStyle, setStyle, setSTYLE, setValue, Style, Style, toHtml_hidden, validate
 
Methods inherited from class e4s.html.E4HtmlObject
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, 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
 
Methods inherited from interface e4s.html.E4HtmlElement_Intf
addScript, addScript, addScript, debugToString, findElement, findElement, getElements, getElementsVec, getField, getId, getStringContent, isContentClass, removeAll, removeElementById, removeElements, set_e4sID, setId, setReadOnly, setValue, toHtml_hidden, validate
 

Constructor Detail

E4MenuElement

public E4MenuElement(E4Menu menu,
                     E4ApplObj_Intf ap)

E4MenuElement

public E4MenuElement(E4Menu menu)

E4MenuElement

public E4MenuElement(java.lang.String persistantObjId,
                     E4ServletImplementation_Intf servlet)
Method Detail

getMenu

public E4Menu getMenu()

setRememberID

public void setRememberID()
If called, the current active item ID will be stored in a E4UserValues with prefix #PREFIX_USER_VAL_ID.

See Also:
#PREFIX_USER_VAL_ID, getRememberID()

getRememberedID

public int getRememberedID(E4ApplObj_Intf applobj)

getRememberID

public boolean getRememberID()
See Also:
setRememberID()

collectScripts

public void collectScripts(E4ScriptsVec v,
                           E4ServletImplementation_Intf servlet)
Description copied from class: E4HtmlElementGeneral
Get a vector of used scripts from all subelements.

Specified by:
collectScripts in interface E4HtmlElement_Intf
Overrides:
collectScripts in class E4HtmlElementGeneral
Parameters:
v - collect the names of all scripts
servlet - the servlet context
See Also:
E4JavaScript

toHtml

public void toHtml(E4StringBufferHtml buf,
                   E4ServletImplementation_Intf servlet)
            throws java.lang.Exception
Description copied from interface: E4HtmlElement_Intf
Create the HTML output for this element. Also run throught all child elements, and call their E4HtmlElement_Intf.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) function to generate output of those objects which becomes appended. Normally, there is no need to call this function anyway, and this also might result in side effects of too-early relasing of objects in some cases. This function is called by E4ServletImplementation_Intf.write(e4s.html.E4HtmlElement) on the top level HTML element (common this is a HTML or BODY element) and branches down to all child elements.

Specified by:
toHtml in interface E4HtmlElement_Intf
Overrides:
toHtml in class E4HtmlElementGeneral
servlet - the servlet environment currently running in
Throws:
java.lang.Exception

addMenuItem

public int addMenuItem(java.lang.String label,
                       A href)

addMenuItem

public int addMenuItem(java.lang.String label,
                       A href,
                       int id)

addMenuItem

public int addMenuItem(E4Label_Intf label,
                       A href,
                       int id)

addMenuItem

public int addMenuItem(E4Label_Intf label,
                       A href,
                       E4Permission_Intf perm)

addMenuItem

public int addMenuItem(E4Label_Intf label,
                       A href,
                       E4Permission_Intf perm,
                       int id)
                throws java.lang.Exception
Throws:
java.lang.Exception

addMenuItem

public int addMenuItem(E4Label_Intf label,
                       A href)

addMenuItem

public int addMenuItem(A href)

addMenuItem

public int addMenuItem(java.lang.String label,
                       E4Method mref,
                       E4Permission_Intf perm)

addMenuItem

public int addMenuItem(E4Label_Intf label,
                       E4Method mref,
                       E4Permission_Intf perm)

addMenuItem

public int addMenuItem(java.lang.String label,
                       E4Method mref)

addMenuItem

public int addMenuItem(java.lang.String label,
                       E4Method mref,
                       int id)

addMenuItem

public int addMenuItem(E4Label_Intf label,
                       E4Method mref,
                       int id)

addMenuItem

public int addMenuItem(E4Label_Intf label,
                       E4Method mref)

addMenuItem

public int addMenuItem(E4MenuItem item)

setColorBaseline

public void setColorBaseline(E4Color color)

changeActive

public boolean changeActive(int menu_id)
Active the menu item with the given id and de-activate all others.

Parameters:
menu_id - the menu-ID to be activated, use -1 to deactivate all menu items.
Returns:
true if this ID was found within the menu
See Also:
e4s.html.E4TabbedMenu#changeActive, e4s.html.TabbedMenu_Item#getId(), E4Menu.changeActive(int), changeActive(e4s.html.E4Method_Intf)

changeActive

public boolean changeActive(E4Method_Intf mref)
Active the menu item with the given id and de-activate all others.

Parameters:
mref - the associated method to be activated, use null to deactivate all menu items.
Returns:
true if this method was found within the menu
See Also:
e4s.html.E4TabbedMenu#changeActive, e4s.html.TabbedMenu_Item#getId(), E4Menu.changeActive(e4s.html.E4Method_Intf), changeActive(int)

getActiveId

public int getActiveId()

getActive

public E4MenuItem getActive()

findMenuElement

public E4MenuItem findMenuElement(int id)
Get the menu item by it's ID.

Parameters:
id - ID of the menu-item
Returns:
the menu item or null if not found

setStyleGrafic

public void setStyleGrafic()
Set the basic layout style of the menu. This can either be grafical (the menu items are surrounded by images) or a simple table with a border.

See Also:
E4Menu.setStyleGrafic(), setStyleText()

setStyleText

public void setStyleText()
Set the basic layout style of the menu. This can either be grafical (the menu items are surrounded by images) or a simple table with a border.

See Also:
E4Menu.setStyleGrafic(), setStyleGrafic()

setImageStyle

public void setImageStyle(int layout)

toString

public java.lang.String toString()
Debug capabilities only - do not use except debugging and tracing.

Overrides:
toString in class E4Object

collectTranslationsForEditing

public void collectTranslationsForEditing(E4TranslationsVec v,
                                          E4ServletImplementation_Intf servlet)
Description copied from class: E4HtmlElementGeneral
Build a list (Vector) with translation texts used so far during display of this page. Run throught all subclasses elements and collect their texts as well. Note, that a text will only be added one time. The Vector contains elements of class E4Label.

Specified by:
collectTranslationsForEditing in interface E4HtmlElement_Intf
Overrides:
collectTranslationsForEditing in class E4HtmlElementGeneral
Parameters:
v - the Vector where the styles will be collected, may not be null
servlet - the current servlet instance
See Also:
E4Label_Intf

setClass_Items

public void setClass_Items(CLASS_Name classname)

setClass_ActiveItem

public void setClass_ActiveItem(CLASS_Name classname)

setClass_Baseline

public void setClass_Baseline(CLASS_Name classname)

setClass_Body

public void setClass_Body(CLASS_Name classname)

setClass_Body

public void setClass_Body(STYLE_Name style)

getClass_Body

public CLASS_Name getClass_Body()

collectStylesForEditing

public void collectStylesForEditing(E4StylesHash v,
                                    E4ServletImplementation_Intf servlet)
Build a list (Vector) with style definitions used so far during display of this page. Run throught all subclasses elements and collect their styles as well. Note, that a style will only be added one time. The Vector contains elements of class E4StyleUsage.

Specified by:
collectStylesForEditing in interface E4HtmlElement_Intf
Overrides:
collectStylesForEditing in class E4HtmlElementGeneral
Parameters:
v - the Vector where the styles will be collected, may not be null
servlet - the servlet context
See Also:
E4ServletImplementation_Intf.sessionCanEditStyles(), #collectStylesForEditing(Vector, STYLE_Name, boolean)

setAdditionalParams

public void setAdditionalParams(E4CgiParams params)

setUserdefinedImages

public void setUserdefinedImages(IMG[] images)

getUserdefinedImages

public IMG[] getUserdefinedImages()

getAdditionalParams

public E4CgiParams getAdditionalParams()

getMenuID

public java.lang.String getMenuID()
Get the identifier for this menu


_getSVNVersionString

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

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

getDebugVec

public java.util.Vector getDebugVec()

www.element4solution.com