www.element4solution.com

e4s.html.navigation
Class E4MenuItem

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

public class E4MenuItem
extends E4HtmlElementGeneral
implements E4HtmlElement_Intf

Defines the single elements for a tabbed style menu.

See Also:
e4s.html

Field Summary
static java.lang.String SCRIPTNAME
           
 
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
E4MenuItem()
           
E4MenuItem(java.lang.String objId)
           
E4MenuItem(java.lang.String objId, int id)
           
 
Method Summary
static java.lang.String _getSVNVersionString()
           
 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.
 A getA()
          The normal case is, that a method-reclection is beeing used.
 CLASS_Name getClass_A()
           
 CLASS_Name getClass_A(boolean active)
           
 E4HtmlElement_Intf getElement()
           
 IMG getImage()
          Get the image defined.
static java.lang.String getJS_Name(java.lang.String objId)
           
 E4Label_Intf getLabel()
          Get the label (text to be displayed) for this menu item.
 boolean isActive()
          Get the active state of this menu item.
 void setActive()
          Sets this menu item to the active state.
 void setActive(boolean active)
          Sets this menu item to the state provided by parameter active.
 void setClass_A(CLASS_Name classname, boolean active)
           
 void setElement(E4HtmlElement_Intf element)
           
 void setImage(IMG img)
          Define an image which will be displayed in front of the label.
 void setInActive()
          Sets this menu item to the IN-active state.
 void setLabel(E4Label_Intf label)
          Set the label (text to be displayed) for this menu item.
 void setLabel(java.lang.String label)
          Set the label (text to be displayed) for this menu item.
 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.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
 

Field Detail

SCRIPTNAME

public static final java.lang.String SCRIPTNAME
See Also:
Constant Field Values
Constructor Detail

E4MenuItem

public E4MenuItem(java.lang.String objId,
                  int id)

E4MenuItem

public E4MenuItem(java.lang.String objId)

E4MenuItem

public E4MenuItem()
Method Detail

setLabel

public void setLabel(java.lang.String label)
Set the label (text to be displayed) for this menu item.

Parameters:
label - the label
See Also:
setLabel(E4Label_Intf), getLabel()

setLabel

public void setLabel(E4Label_Intf label)
Set the label (text to be displayed) for this menu item.

Parameters:
label - the label
See Also:
setLabel(E4Label_Intf), getLabel()

getLabel

public E4Label_Intf getLabel()
Get the label (text to be displayed) for this menu item.

Returns:
the label
See Also:
setLabel(java.lang.String)

setActive

public void setActive()
Sets this menu item to the active state.

See Also:
setInActive(), setActive( boolean ), isActive()

setInActive

public void setInActive()
Sets this menu item to the IN-active state.

See Also:
setActive(), setActive( boolean ), isActive()

setActive

public void setActive(boolean active)
Sets this menu item to the state provided by parameter active.

Parameters:
active - the new state.
See Also:
setActive(), setInActive(), isActive()

isActive

public boolean isActive()
Get the active state of this menu item. Note, typically a tab set will be displayed and only one of those tags can become active a time.

Returns:
the activation status of this menu item
See Also:
setActive(), setInActive(), setActive(boolean)

setElement

public void setElement(E4HtmlElement_Intf element)

getElement

public E4HtmlElement_Intf getElement()

getA

public A getA()
The normal case is, that a method-reclection is beeing used. In this case, the menu-item consists of an A which can be retrieved using this function, e.g. to add parameters.

Returns:
null if this menu item is not based on an E4Method.

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

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

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

getClass_A

public CLASS_Name getClass_A()

getClass_A

public CLASS_Name getClass_A(boolean active)

setClass_A

public void setClass_A(CLASS_Name classname,
                       boolean active)

setImage

public void setImage(IMG img)
Define an image which will be displayed in front of the label.

Parameters:
img - the image
See Also:
getImage(), #setLabel()

getImage

public IMG getImage()
Get the image defined.

Returns:
the image if defined, or null
See Also:
#setImage()

getJS_Name

public static final java.lang.String getJS_Name(java.lang.String objId)

collectStylesForEditing

public void collectStylesForEditing(E4StylesHash v,
                                    E4ServletImplementation_Intf servlet)
Description copied from class: E4HtmlElementGeneral
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, STYLE_Name, boolean)

_getSVNVersionString

public static java.lang.String _getSVNVersionString()

www.element4solution.com