|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.ui.painter.def.DefMenuItemPainter
This class is used to create the menu java script elements
Field Summary | |
private PainterContext |
ctx
The painter context |
Constructor Summary | |
DefMenuItemPainter(PainterContext ctx)
Constructor |
Method Summary | |
void |
appendItemsToScript(java.lang.String scope,
java.lang.StringBuffer buf,
MenuItem[] items,
ImageMap images)
Appends the menu item script |
protected java.lang.String |
encodeMenuState(int menuState)
|
static ImageModel |
getItemImage(MenuItem item,
ImageMap images)
Retrieves the image for the given menu item |
static java.lang.String |
getItemImageSrc(PainterContext ctx,
MenuItem item,
ImageMap images)
Retrieves the image source for the given menu item |
static java.lang.String |
getItemText(PainterContext ctx,
MenuItem item)
Retrieves the (localized) text for the given item |
static java.util.Locale |
getLocale(PainterContext ctx,
MenuItem item)
Retrieves the locale to use for a given menu item |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private PainterContext ctx
Constructor Detail |
public DefMenuItemPainter(PainterContext ctx)
ctx
- the painter contextMethod Detail |
public void appendItemsToScript(java.lang.String scope, java.lang.StringBuffer buf, MenuItem[] items, ImageMap images)
scope
- JavaScript scope namebuf
- the script bufferitems
- items to addimages
- the image map for image translationprotected java.lang.String encodeMenuState(int menuState)
public static java.lang.String getItemText(PainterContext ctx, MenuItem item)
ctx
- painter contextitem
- the menu item
public static java.lang.String getItemImageSrc(PainterContext ctx, MenuItem item, ImageMap images)
ctx
- painter contextitem
- the menu itemimages
- the image map
null
public static ImageModel getItemImage(MenuItem item, ImageMap images)
item
- the menu itemimages
- the image map
null
public static java.util.Locale getLocale(PainterContext ctx, MenuItem item)
ctx
- painter contextitem
- Panel item
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |