com.cc.framework.ui.painter.def
Class DefMenuPainter

java.lang.Object
  extended bycom.cc.framework.ui.painter.ControlPainter
      extended bycom.cc.framework.ui.painter.def.DefPainterBase
          extended bycom.cc.framework.ui.painter.def.DefMenuPainter
Direct Known Subclasses:
DefMenuMainPainter, DefMenuSidebarPainter, DefMenuToolsPainter

public abstract class DefMenuPainter
extends DefPainterBase

Base Class for menu controls

Since:
1.0
Version:
$Revision: 1.31 $
Author:
Gernot Schulz

Field Summary
 
Fields inherited from class com.cc.framework.ui.painter.ControlPainter
log
 
Constructor Summary
DefMenuPainter(PainterContext painterContext, MenuControl ctrl)
          Constructor
 
Method Summary
protected  org.apache.ecs.ConcreteElement createMenuAnchor(MenuItem item, ImageMap imageMap, boolean selected)
          Creates the Menu Anchor
protected  MenuControl getCtrl()
          Retrieves the control for this painter
protected  MenuDesignModel getDesignModel()
          Returns the DesignModel
protected  ImageModel getItemImage(MenuItem item, ImageMap images)
          Retrieves the image for the given menu item
protected  java.util.Locale getLocale(MenuItem item)
          Retrieves the locale to use for a given menu item
 
Methods inherited from class com.cc.framework.ui.painter.def.DefPainterBase
createHelpElement, createHelpElement, doCreateHelpButton, doCreateHelpIcon, getElementClass
 
Methods inherited from class com.cc.framework.ui.painter.ControlPainter
ajaxPaint, attr, attr, attr, beginPaint, createActionPainter, createActionPainter, createElement, createImage, createImage, createImage, createInput, createInput, createSpacer, createSpacer, createSpacer, decorateURL, doAddDecorationsToRow, doAddDecorationsToRow, doAfterCreate, doAttachDecorations, doBeforeCreate, doCreateElement, encodeURL, endPaint, forceControlName, getAsString, getAwtColor, getColor, getContextPath, getControlName, getDecorationsOnce, getElementName, getFramePainter, getFrameworkString, getFrameworkString, getImage, getImage, getImage, getImageSrc, getImageSrc, getImageSrc, getLocale, getPageContext, getPainterContext, getPrincipal, getRequest, getResponse, getSession, getSmartCaption, getSmartDetail, getSource, getSource, getStringResource, getStyleId, html, html, html, init, isRunAtClient, localize, localize, localize, paint, removeHtml, removeHtml, request, response, session, showComments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefMenuPainter

public DefMenuPainter(PainterContext painterContext,
                      MenuControl ctrl)
Constructor

Parameters:
painterContext - The PainterContext
ctrl - The Control to render
Method Detail

getCtrl

protected MenuControl getCtrl()
Retrieves the control for this painter

Returns:
Control

getDesignModel

protected MenuDesignModel getDesignModel()
Returns the DesignModel

Returns:
MenuDesignModel

createMenuAnchor

protected org.apache.ecs.ConcreteElement createMenuAnchor(MenuItem item,
                                                          ImageMap imageMap,
                                                          boolean selected)
Creates the Menu Anchor

Parameters:
item - MenuItemDesignModel
imageMap - ImageMap
selected - Selected Flag
Returns:
ConcreteElement

getLocale

protected java.util.Locale getLocale(MenuItem item)
Retrieves the locale to use for a given menu item

Parameters:
item - Panel item
Returns:
Locale

getItemImage

protected ImageModel getItemImage(MenuItem item,
                                  ImageMap images)
Retrieves the image for the given menu item

Parameters:
item - the menu item
images - the image map
Returns:
image or null


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.