www.element4solution.com

e4s.html.navigation
Class E4MenuFrameset

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.FRAMESET
                      extended by e4s.html.navigation.E4MenuFrameset
All Implemented Interfaces:
E4HtmlElement_Intf

public class E4MenuFrameset
extends FRAMESET
implements E4HtmlElement_Intf

Provides a tab-layouted menu. Each menu item will be displayed as a property tab like style, consisting of elements of type e4s.html.

See Also:

Example_Menu.java

{@tutorial Example_MenuStyle}


Nested Class Summary
 
Nested classes/interfaces inherited from class e4s.html.FRAMESET
FRAMESET.E4FrameException
 
Field Summary
static E4FrameName FRAMENAME_CONTENT
           
static E4FrameName FRAMENAME_MENU
           
static int MENU_FRAME_HEIGHT
           
 
Fields inherited from class e4s.html.FRAMESET
_FRAMESET_COLS, _FRAMESET_ROWS, COLS, ROWS, TIMEOUT_KEEPALIVE_REFRESH
 
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
E4MenuFrameset(E4ID parent_id, java.lang.String persistantObjId, E4ServletImplementation_Intf servlet)
           
E4MenuFrameset(E4ID parent_id, java.lang.String persistantObjId, int style, E4ServletImplementation_Intf servlet)
           
E4MenuFrameset(int style, E4ServletImplementation_Intf servlet)
           
E4MenuFrameset(java.lang.String persistantObjId, E4ServletImplementation_Intf servlet)
           
E4MenuFrameset(java.lang.String persistantObjId, int style, 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)
          Add an menu item.
 int addMenuItem(E4Label_Intf label, A href, int id)
           
 int addMenuItem(E4Label_Intf label, E4Method mref)
           
 int addMenuItem(E4Label_Intf label, E4Method mref, E4Long id)
           
 int addMenuItem(E4Label_Intf label, E4Method mref, E4Permission_Intf perm)
           
 int addMenuItem(E4Label_Intf label, E4Method mref, int id)
           
 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)
          Add an menu item.
 int addMenuItem(java.lang.String label, E4Method mref, E4Long id)
           
 int addMenuItem(java.lang.String label, E4Method mref, E4Permission_Intf perm)
          Add an menu item.
 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 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.
 E4MenuItem findMenuElement(E4Method_Intf mref)
          Get the menu item by an method's alias.
 E4MenuItem findMenuElement(int id)
          Get the menu item by it's ID.
 E4CgiParams getAdditionalParams()
          Get additional parameters to be passed to every menu item.
 FRAME getContentFrame()
           
 E4Menu getE4MenuElement()
          Deprecated. Use getMenuElement() instead
 E4Menu getMenuElement()
          Get the internal menu element.
 FRAME getMenuFrame()
           
 int getRememberedID(E4ApplObj_Intf applobj)
           
 IMG[] getUserdefinedImages()
           
 void setAdditionalParams(E4CgiParams params)
          Add additional parameters to be passed to every menu item.
 void setClass_ActiveItem(CLASS_Name classname)
           
 void setClass_Baseline(CLASS_Name classname)
           
 void setClass_Body_MenuArea(CLASS_Name classname)
           
 void setClass_Items(CLASS_Name classname)
           
 void setColorBaseline(E4Color color)
           
 void setImageStyle(int style)
           
 void setRememberID()
          If called, the current active item ID will be stored in a E4UserValues with prefix e4s.html.navigation.E4MenuElement.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)
          General about FRAMES/FRAMESET: A FRAMESET is once derived from class HTML, the next FRAMESET can be derived from FRAMESET.
 
Methods inherited from class e4s.html.FRAMESET
_createKeepAliveScript, addKeepAliveScript, createEventHandler, createEventHandler, eventHandlers, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAMESET, FRAMESET, FRAMESET, FRAMESET, FRAMESET, getFrameborder, getFrameSize, getFramespacing, MenuFrameset, MenuFrameset, onLoad, onUnLoad, onUnLoad, setEventHandler, setFrameborder, setFramespacing, SmoothResize, SmoothResize, SmoothResize2
 
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, 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, 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
 
Methods inherited from interface e4s.html.E4HtmlElement_Intf
addScript, addScript, addScript, collectTranslationsForEditing, debugToString, findElement, findElement, getElements, getElementsVec, getField, getId, getStringContent, isContentClass, removeAll, removeElementById, removeElements, set_e4sID, setId, setReadOnly, setValue, toHtml_hidden, validate
 

Field Detail

MENU_FRAME_HEIGHT

public static final int MENU_FRAME_HEIGHT
See Also:
Constant Field Values

FRAMENAME_MENU

public static final E4FrameName FRAMENAME_MENU

FRAMENAME_CONTENT

public static final E4FrameName FRAMENAME_CONTENT
Constructor Detail

E4MenuFrameset

public E4MenuFrameset(int style,
                      E4ServletImplementation_Intf servlet)

E4MenuFrameset

public E4MenuFrameset(java.lang.String persistantObjId,
                      int style,
                      E4ServletImplementation_Intf servlet)

E4MenuFrameset

public E4MenuFrameset(E4ID parent_id,
                      java.lang.String persistantObjId,
                      int style,
                      E4ServletImplementation_Intf servlet)

E4MenuFrameset

public E4MenuFrameset(E4ID parent_id,
                      java.lang.String persistantObjId,
                      E4ServletImplementation_Intf servlet)

E4MenuFrameset

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

getContentFrame

public FRAME getContentFrame()

getMenuFrame

public FRAME getMenuFrame()

addMenuItem

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

addMenuItem

public int addMenuItem(E4Label_Intf label,
                       A href)
Add an menu item.

Parameters:
label - the text that will be displayed
href - the link to be involved
Returns:
the ID of the new created menu item

addMenuItem

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

addMenuItem

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

addMenuItem

public int addMenuItem(A href)

addMenuItem

public int addMenuItem(java.lang.String label,
                       E4Method mref)
Add an menu item.

Parameters:
label - the text that will be displayed
mref - the method to be involved
Returns:
the ID of the new created menu item

addMenuItem

public int addMenuItem(java.lang.String label,
                       E4Method mref,
                       E4Permission_Intf perm)
Add an menu item.

Parameters:
label - the text that will be displayed
mref - the method to be involved
perm - a permission required to execute this function
Returns:
the ID of the new created menu item

addMenuItem

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

addMenuItem

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

addMenuItem

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

addMenuItem

public int addMenuItem(E4Label_Intf label,
                       E4Method mref)

addMenuItem

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

addMenuItem

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

changeActive

public boolean changeActive(int 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(), 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(), changeActive(int)

setColorBaseline

public void setColorBaseline(E4Color color)

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:
E4MenuElement.setStyleGrafic(), E4Menu.setStyleGrafic(), E4Menu.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:
E4MenuElement.setStyleText(), E4Menu.setStyleText(), E4Menu.setStyleGrafic()

setImageStyle

public void setImageStyle(int style)

toHtml

public void toHtml(E4StringBufferHtml buf,
                   E4ServletImplementation_Intf servlet)
            throws java.lang.Exception
Description copied from class: FRAMESET
General about FRAMES/FRAMESET: A FRAMESET is once derived from class HTML, the next FRAMESET can be derived from FRAMESET. A FRAMESET consists of FRAME (which is a subclass of HTML) or again a FRAMESET. When a FRAME is used, when it is converted into Html using the FRAMESET.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) function, for each <FRAME>-tag a URL pattern is created, using the E4ServletImplementation_Intf.PARAM_PRESERVED with an generic unique ID (based on the time and m_random). Instead of printing out the content of the frame itself, a link is generated in the <FRAME SRC="..">-tag. The content of the frame is stored using the function E4ServletImplementation_Intf.writePreserved(String,E4HtmlElement_Intf). In the servlet main routine (typically the doPost() or doGet() method this code should be used to handle this URL requests: if (! servlet.writePreservedOut()) { // continue with execution }

Specified by:
toHtml in interface E4HtmlElement_Intf
Overrides:
toHtml in class FRAMESET
servlet - use the getServlet() to get the current servlet context
Throws:
java.lang.Exception

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_MenuArea

public void setClass_Body_MenuArea(CLASS_Name classname)

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(e4s.html.style.E4StylesHash, e4s.html.style.STYLE_Name, boolean)

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 FRAMESET
Parameters:
v - collect the names of all scripts
servlet - the servlet context
See Also:
E4JavaScript

setAdditionalParams

public void setAdditionalParams(E4CgiParams params)
Add additional parameters to be passed to every menu item.

Parameters:
params - the parameters to be added.
See Also:
getAdditionalParams()

getAdditionalParams

public E4CgiParams getAdditionalParams()
Get additional parameters to be passed to every menu item.

Returns:
the parameters to be added.
See Also:
setAdditionalParams(e4s.html.E4CgiParams)

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

findMenuElement

public E4MenuItem findMenuElement(E4Method_Intf mref)
Get the menu item by an method's alias.

Parameters:
mref - the method of the menu-item
Returns:
the menu item or null if not found
See Also:
findMenuElement(int), E4Method_Intf.getAlias()

setUserdefinedImages

public void setUserdefinedImages(IMG[] images)

getUserdefinedImages

public IMG[] getUserdefinedImages()

getE4MenuElement

public E4Menu getE4MenuElement()
Deprecated. Use getMenuElement() instead


getMenuElement

public E4Menu getMenuElement()
Get the internal menu element.


setRememberID

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


getRememberedID

public int getRememberedID(E4ApplObj_Intf applobj)

_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