|
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.navigation.E4Menu
public class E4Menu
Provides a tab-layouted menu. Each menu item will be displayed as a property tab like
style, consisting of elements of type e4s.html.
http://www.drweb.de/weblog/weblog/?p=531
E4MenuFrameset,
Example_Menu.java
| 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 | |
|---|---|
E4Menu(int style,
E4FrameName target,
E4ServletImplementation_Intf servlet)
|
|
E4Menu(java.lang.String persistantObjId,
E4FrameName target,
E4ServletImplementation_Intf servlet)
|
|
E4Menu(java.lang.String persistantObjId,
int style,
E4FrameName target,
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,
int id)
|
int |
addMenuItem(E4Label_Intf label,
E4Method mref)
|
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,
int id)
|
E4JavaScript |
buildScripting(E4ServletImplementation_Intf servlet)
|
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)
|
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)
|
E4MenuItem |
findMenuElement(int id)
Get the menu item by it's ID. |
static java.lang.StringBuffer |
formatLabel(java.lang.StringBuffer label,
boolean active)
|
E4MenuItem |
getActive()
Get the activated menu item. |
E4Color |
getActiveColor()
Get the color for active menu element. |
int |
getActiveId()
Get the ID of the activated menu item. |
E4CgiParams |
getAdditionalParams()
|
E4Color |
getBgColor()
Get the background color for the menu. |
CLASS_Name |
getClass_ActiveItem()
|
CLASS_Name |
getClass_Baseline()
|
CLASS_Name |
getClass_Body()
|
CLASS_Name |
getClass_Items()
|
E4Color |
getColorBaseline()
Get the color for the baseline of the menu. |
java.lang.String |
getJS_Name()
Get the name of the E4JavaScript for this menu. |
static E4Menu |
getMenu(java.lang.String persistantObjId,
E4ServletImplementation_Intf servlet)
Retrieves a menu object out of the persistant list of menu objects. |
java.lang.String |
getMenuID()
Get the identifier for this menu |
int |
getMenuStyle()
Get the basic layout style of the menu. |
int |
getRememberedID(E4ApplObj_Intf applobj)
|
boolean |
getRememberID()
|
static E4SelectValues |
getSelection4MenuStyle()
|
E4FrameName |
getTarget()
|
IMG[] |
getUserdefinedImages()
|
static IMG[] |
initImages(int style,
E4ApplObj_Intf applobj)
|
static IMG[] |
initImages(int style,
E4ServletImplementation_Intf servlet)
|
static boolean |
isHorizontal(int style)
Detect, weather a menu style is horizontal or not. |
static TABLE |
prepareContent_Horz(E4ID parent_id,
E4ServletImplementation_Intf servlet,
java.util.Vector menu_elements)
|
static TABLE |
prepareContent_Horz(E4ID parent_id,
E4ServletImplementation_Intf servlet,
java.util.Vector menu_elements,
boolean stretch_vertical,
E4MenuLayout_Intf menu)
|
static TABLE |
prepareContent_Horz(E4ID parent_id,
E4ServletImplementation_Intf servlet,
java.util.Vector menu_elements,
E4MenuLayout_Intf menu)
|
static TABLE |
prepareContent_Vert(E4ID parent_id,
E4ServletImplementation_Intf servlet,
java.util.Vector menu_elements,
E4Menu menu)
|
TABLE |
prepareContent(E4ServletImplementation_Intf servlet)
|
void |
setActiveColor(E4Color color)
Define the color for active menu element. |
void |
setAdditionalParams(E4CgiParams params)
|
void |
setBgColor(E4Color color)
Define the background color for the menu. |
void |
setClass_ActiveItem(CLASS_Name classname)
|
void |
setClass_Baseline(CLASS_Name classname)
|
void |
setClass_Body(CLASS_Name classname)
|
void |
setClass_Items(CLASS_Name classname)
|
void |
setColorBaseline(E4Color color)
Define the color for the baseline of the menu, this is a thick line below the menu items. |
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()
|
void |
setStyleText()
Set the basic layout style of the menu. |
void |
setUserdefinedImages(IMG[] images)
|
void |
toHtml(E4StringBufferHtml buf,
E4ServletImplementation_Intf servlet)
|
java.lang.String |
toString()
Debug capabilities only - do not use except debugging and tracing. |
| 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 |
| Field Detail |
|---|
public static final int MENU_STYLE_IMAGES_APPLICATION
public static final int MENU_STYLE_IMAGES_CLIENT
public static final int NO_MENU_REFRESH
public static final int MENU_STYLE_REPRESENTATION_GRAFICAL
setImageStyle(int),
getMenuStyle(),
MENU_STYLE_REPRESENTATION_TEXT,
Constant Field Valuespublic static final int MENU_STYLE_REPRESENTATION_TEXT
setImageStyle(int),
getMenuStyle(),
MENU_STYLE_REPRESENTATION_GRAFICAL,
Constant Field Valuespublic static final int MENU_STYLE_DIRECTION_HORIZONTAL
public static final int MENU_STYLE_DIRECTION_VERTICAL
public static final int MENU_STYLE_IMAGES_A
public static final int MENU_STYLE_IMAGES_B1
public static final int MENU_STYLE_IMAGES_B2
public static final int MENU_STYLE_IMAGES_B3
public static final int MENU_STYLE_IMAGES_B4
public static final int MENU_STYLE_IMAGES_C1
public static final int MENU_STYLE_IMAGES_C2
public static final int MENU_STYLE_IMAGES_C3
public static final int MENU_STYLE_IMAGES_D1
public static final int MENU_STYLE_IMAGES_D2
public static final int MENU_STYLE_IMAGES_E1
public static final int MENU_STYLE_IMAGES_E2
public static final java.lang.String PREFIX_USER_VAL_ID
public static int X_STARTING
public static int X_FIRST_ACTIVE
public static int X_FIRST_INACTIVE
public static int X_LEFT_ACTIVE
public static int X_LEFT_INACTIVE
public static int X_MIDDLE_ACTIVE
public static int X_MIDDLE_INACTIVE
public static int X_RIGHT_ACTIVE
public static int X_RIGHT_INACTIVE_INACTIVE
public static int X_RIGHT_INACTIVE_ACTIVE
public static int X_LAST_ACTIVE
public static int X_LAST_INACTIVE
public static int X_REMAINING
public E4FrameName m_target
| Constructor Detail |
|---|
public E4Menu(int style,
E4FrameName target,
E4ServletImplementation_Intf servlet)
public E4Menu(java.lang.String persistantObjId,
int style,
E4FrameName target,
E4ServletImplementation_Intf servlet)
public E4Menu(java.lang.String persistantObjId,
E4FrameName target,
E4ServletImplementation_Intf servlet)
| Method Detail |
|---|
public void setStyleText()
getMenuStyle()public void setStyleGrafic()
public void setImageStyle(int layout)
public int getMenuStyle()
getMenuStyle in interface E4MenuLayout_IntfMENU_STYLE_REPRESENTATION_GRAFICAL for the grafical representation or #STYLE_SIMPLE
for the simple (table like) representation.MENU_STYLE_REPRESENTATION_GRAFICAL,
#STYLE_SIMPLE,
setImageStyle(int)
public static E4Menu getMenu(java.lang.String persistantObjId,
E4ServletImplementation_Intf servlet)
persistantObjId - the identification of this menu objectservlet - the servlet context
e4s.servlet
public static IMG[] initImages(int style,
E4ServletImplementation_Intf servlet)
public static IMG[] initImages(int style,
E4ApplObj_Intf applobj)
public java.lang.String getJS_Name()
E4MenuItem.getJS_Name(java.lang.String)public E4JavaScript buildScripting(E4ServletImplementation_Intf servlet)
public int addMenuItem(java.lang.String label,
A href)
public int addMenuItem(java.lang.String label,
A href,
int id)
public int addMenuItem(E4Label_Intf label,
A href,
int id)
public int addMenuItem(E4Label_Intf label,
A href)
public int addMenuItem(A href)
public int addMenuItem(java.lang.String label,
E4Method mref,
int id)
public int addMenuItem(java.lang.String label,
E4Method mref)
public int addMenuItem(E4Label_Intf label,
E4Method mref)
public int addMenuItem(E4Label_Intf label,
E4Method mref,
int id)
public int addMenuItem(E4MenuItem item)
public java.lang.String getMenuID()
public boolean changeActive(int id)
menu_id - the menu-ID to be activated, use -1 to deactivate all menu items.
e4s.html.E4TabbedMenu#changeActive,
e4s.html.TabbedMenu_Item#getId(),
E4MenuElement.changeActive(int),
E4MenuFrameset.changeActive(int),
changeActive(e4s.html.E4Method_Intf)public boolean changeActive(E4Method_Intf mref)
mref - the associated method to be activated, use null to deactivate all menu items.
e4s.html.E4TabbedMenu#changeActive,
e4s.html.TabbedMenu_Item#getId(),
E4MenuElement.changeActive(e4s.html.E4Method_Intf),
E4MenuFrameset.changeActive(e4s.html.E4Method_Intf),
changeActive(int)public E4MenuItem findMenuElement(int id)
id - ID of the menu-item
public E4MenuItem getActive()
getActiveId(),
changeActive(int)public int getActiveId()
getActive(),
changeActive(int)
public void toHtml(E4StringBufferHtml buf,
E4ServletImplementation_Intf servlet)
throws java.lang.Exception
java.lang.Exceptionpublic TABLE prepareContent(E4ServletImplementation_Intf servlet)
public static TABLE prepareContent_Horz(E4ID parent_id,
E4ServletImplementation_Intf servlet,
java.util.Vector menu_elements)
public static TABLE prepareContent_Horz(E4ID parent_id,
E4ServletImplementation_Intf servlet,
java.util.Vector menu_elements,
E4MenuLayout_Intf menu)
public static TABLE prepareContent_Horz(E4ID parent_id,
E4ServletImplementation_Intf servlet,
java.util.Vector menu_elements,
boolean stretch_vertical,
E4MenuLayout_Intf menu)
public static TABLE prepareContent_Vert(E4ID parent_id,
E4ServletImplementation_Intf servlet,
java.util.Vector menu_elements,
E4Menu menu)
public static java.lang.StringBuffer formatLabel(java.lang.StringBuffer label,
boolean active)
public void setColorBaseline(E4Color color)
color - the baseline color, null if no baseline shall be drawn.getColorBaseline()public E4Color getColorBaseline()
getColorBaseline in interface E4MenuLayout_Intf#setColorBaseline()public void setBgColor(E4Color color)
color - the background color.setActiveColor(e4s.html.E4Color),
getBgColor()public E4Color getBgColor()
getBgColor in interface E4MenuLayout_IntfsetBgColor(e4s.html.E4Color)public void setActiveColor(E4Color color)
color - the color for the active item. In MENU_STYLE_REPRESENTATION_GRAFICAL mode only.getActiveColor(),
setBgColor(e4s.html.E4Color),
MENU_STYLE_REPRESENTATION_GRAFICALpublic E4Color getActiveColor()
getActiveColor in interface E4MenuLayout_IntfMENU_STYLE_REPRESENTATION_GRAFICAL mode only.setActiveColor(e4s.html.E4Color)public E4FrameName getTarget()
public java.lang.String toString()
toString in class E4Object
public void collectScripts(E4ScriptsVec v,
E4ServletImplementation_Intf servlet)
public void collectTranslationsForEditing(E4TranslationsVec v,
E4ServletImplementation_Intf servlet)
public void setClass_Items(CLASS_Name classname)
public void setClass_ActiveItem(CLASS_Name classname)
public CLASS_Name getClass_Items()
getClass_Items in interface E4MenuLayout_Intfpublic CLASS_Name getClass_ActiveItem()
getClass_ActiveItem in interface E4MenuLayout_Intfpublic void setClass_Baseline(CLASS_Name classname)
public CLASS_Name getClass_Baseline()
getClass_Baseline in interface E4MenuLayout_Intfpublic void setClass_Body(CLASS_Name classname)
public CLASS_Name getClass_Body()
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, e4s.html.style.STYLE_Name, boolean)public void setAdditionalParams(E4CgiParams params)
public void setUserdefinedImages(IMG[] images)
setUserdefinedImages in interface E4MenuLayout_Intfpublic IMG[] getUserdefinedImages()
getUserdefinedImages in interface E4MenuLayout_Intfpublic E4CgiParams getAdditionalParams()
public static E4SelectValues getSelection4MenuStyle()
public static boolean isHorizontal(int style)
MENU_STYLE_IMAGES_APPLICATION or
MENU_STYLE_IMAGES_CLIENT style is always horizontal, other styles depend of the MENU_STYLE_DIRECTION_HORIZONTAL
setting.
style - a style combination
public void setRememberID()
E4UserValues with prefix PREFIX_USER_VAL_ID.
PREFIX_USER_VAL_ID,
getRememberID()public boolean getRememberID()
setRememberID()public int getRememberedID(E4ApplObj_Intf applobj)
public static java.lang.String _getSVNVersionString()
E4Util.getRevisionCodeFromSVN(Class)
|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||