com.sas.servlet.tbeans.menubar.html
Class MenuItem

com.sas.servlet.tbeans.menubar.html.MenuItem
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, AlternateTextInterface, ComplexStyleInterface, DisabledImageInterface, com.sas.servlet.tbeans.DisabledImageKeyInterface, EnabledInterface, HTMLConstantsInterface, ImageInterface, com.sas.servlet.tbeans.ImageKeyInterface, ImagePositionInterface, LabelInterface, MenuBarStyleAreaKeysInterface, RenderableInterface, com.sas.servlet.tbeans.ScriptActivatedInterface, TemplateInterface, com.sas.servlet.tbeans.TemplateKeyInterface, com.sas.servlet.tbeans.TitleInterface, TransformationInterface, URLInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable

public class MenuItem
implements MenuBarStyleAreaKeysInterface, ComplexStyleInterface, HTMLConstantsInterface

MenuItem is used to populate the Menus in a MenuBar transformation bean. A menu item can have a URL, label and image. MenuItems must be added to the Menu.

Note that the toString() method on this class calls the write method, which may have undesirable side effects. See BaseTransformation.toString() for more information. Debuggers often use toString() to show the value of a variable, and this may cause unexpected behavior while debugging

Since:
2.0
See Also:
Menu, MenuBar, Serialized Form

Field Summary
 
Fields inherited from class com.sas.servlet.tbeans.menubar.BaseMenuItem
submenu
 
Fields inherited from class com.sas.servlet.tbeans.BaseButton
BOTTOM, BOTTOM_ALL, BOTTOM_LEFT, BOTTOM_RIGHT, CENTER_ALL, DEFAULT_DYNAMIC_BUTTON_ROOT_KEY, DEFAULT_DYNAMIC_BUTTON_ROOT_NAME, imageLocation, LEFT, NONE, RIGHT, TOP, TOP_ALL, TOP_LEFT, TOP_RIGHT
 
Fields inherited from interface com.sas.servlet.tbeans.menubar.html.MenuBarStyleAreaKeysInterface
MENU, MENU_DISABLED, MENU_DIVIDER, MENU_ITEM, MENU_ITEM_ARROW, MENU_ITEM_CONTAINER, MENU_ITEM_DISABLED, MENU_ITEM_DIVIDER, MENU_ITEM_LINK, MENU_ITEM_LINK_DISABLED, MENU_LINK, MENU_LINK_DISABLED, MENUBAR_CONTAINER
 
Fields inherited from interface com.sas.servlet.tbeans.html.HTMLConstantsInterface
AMPERSAND, APOS, APOS_COMMA, APOS_COMMA_APOS, BEGIN_DIV, BEGIN_SPAN, CLASS, COMMA, DEFAULT_MENU_PADDING, DEFAULT_TABLE_PROP, END_ANCHOR, END_DATA, END_DIV, END_ROW, END_SPAN, END_TABLE, END_TAG, EQUAL, JAVASCRIPT_VOID, NEW_LINE, ON_BLUR, ON_CLICK, ON_FOCUS, ON_KEY_DOWN, ON_KEY_PRESS, ON_KEY_UP, ON_MOUSE_DOWN, ON_MOUSE_OUT, ON_MOUSE_OVER, ON_MOUSE_UP, QUESTION_MARK, QUOTE, START_ANCHOR, START_ANCHOR_CLASS, START_ANCHOR_HREF, START_DATA, START_DATA_NOWRAP, START_DIV, START_IMG, START_ROW, START_SPAN, START_TABLE, XML_ESCAPED_AMPERSAND
 
Constructor Summary
MenuItem()
          Constructor of MenuItem
MenuItem(java.lang.String label, java.lang.String image)
          Constructor of MenuItem
MenuItem(java.lang.String label, java.lang.String image, java.lang.String url)
          Constructor of MenuItem
 
Method Summary
 java.util.Map getStyleMap()
          Returns the component style map for this MenuItem.
 void setStyleMap(java.util.Map styleMap)
          Sets a style map for this MenuItem.
 void write(java.io.PrintWriter out)
          Write the contents of menu item.
 
Methods inherited from class com.sas.servlet.tbeans.menubar.BaseMenuItem
getDefaultTemplate, getMenu, getNextMenu, getNextMenuItem, getPreviousMenu, getPreviousMenuItem, getTemplate, getTemplateDictionary, getTemplateFileName, getTemplateLocation, isDivider, isSelected, setNextMenu, setNextMenuItem, setPreviousMenu, setPreviousMenuItem, setSelected, setTemplate, setTemplate, setTemplate, setTemplateDictionary, setTemplateFileName, setTemplateLocation
 
Methods inherited from class com.sas.servlet.tbeans.BaseButton
getAccessKey, getAlternateText, getBottomImage, getBottomLeftImage, getBottomRightImage, getDisabledAlternateText, getDisabledImage, getDynamicButtonArea, getDynamicRootName, getHeight, getHeightPercentage, getImage, getImageLocation, getImagePosition, getLabel, getLeftImage, getOnBlur, getOnClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseOut, getOnMouseOver, getOnMouseUp, getRightImage, getRolloverImage, getTabIndex, getTarget, getTitle, getTopImage, getTopLeftImage, getTopRightImage, getURL, getWidth, getWidthPercentage, isActive, isEnabled, isFocused, isVerifyEnabled, isWrapped, setAccessKey, setActive, setAlternateText, setBottomImage, setBottomLeftImage, setBottomRightImage, setDisabledAlternateText, setDisabledImage, setDynamicButtonArea, setDynamicRootName, setEnabled, setFocus, setHeight, setHeightPercentage, setImage, setImage, setImageLocation, setImagePosition, setLabel, setLeftImage, setOnBlur, setOnClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseOut, setOnMouseOver, setOnMouseUp, setRightImage, setRolloverImage, setTabIndex, setTarget, setTitle, setTopImage, setTopLeftImage, setTopRightImage, setURL, setVerifyEnabled, setWidth, setWidthPercentage, setWrap
 
Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
addPropertyChangeListener, addPropertyChangeListener, cleanUpResources, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getName, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCleanUpResourcesOn, setCustomAttributes, setDescription, setId, setInputTransform, setLocale, setLocaleDependentProperties, setName, setObjectData, setObjectDataProperty, setOutputTransform, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, toString, write, write, write
 

Constructor Detail

MenuItem

public MenuItem()
Constructor of MenuItem


MenuItem

public MenuItem(java.lang.String label,
                java.lang.String image,
                java.lang.String url)
Constructor of MenuItem

Parameters:
label - the text label on the menu item
image - the image to display on the menu item
url - the url associated with the menu item

MenuItem

public MenuItem(java.lang.String label,
                java.lang.String image)
Constructor of MenuItem

Parameters:
label - text label on the menu item
image - image to display on the menu item
Method Detail

write

public void write(java.io.PrintWriter out)
           throws java.io.IOException
Write the contents of menu item. This method calls the cleanUpResources method at the end to reset the request and response back to null.

Specified by:
write in interface TransformationInterface
Specified by:
write in interface com.sas.util.WriteToPrintWriterInterface
Overrides:
write in class BaseTransformation
Parameters:
out - The output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

getStyleMap

public java.util.Map getStyleMap()
Returns the component style map for this MenuItem.
STYLE KEYDEFAULT STYLE
MENU_ITEM_ARROWmenuItemArrow
MENU_ITEM_DIVIDERmenuItemDivider
MENU_ITEM menuItem
MENU_ITEM_LINK menuItemLink
MENU_ITEM_DISABLED menuItemDisabled
MENU_ITEM_LINK_DISABLED menuItemLinkDisabled
MENU_ITEM_ARROW menuItemArrow

Specified by:
getStyleMap in interface ComplexStyleInterface
Returns:
styles used for this MenuItem.

setStyleMap

public void setStyleMap(java.util.Map styleMap)
Sets a style map for this MenuItem.

Parameters:
styleMap - Map containing styles and style keys for this menuItem
See Also:
getStyleMap()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.