com.sas.servlet.tbeans.menubar
Class BaseMenu

com.sas.servlet.tbeans.menubar.BaseMenu
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, AlternateTextInterface, DisabledImageInterface, com.sas.servlet.tbeans.DisabledImageKeyInterface, EnabledInterface, ImageInterface, com.sas.servlet.tbeans.ImageKeyInterface, ImagePositionInterface, LabelInterface, 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
Direct Known Subclasses:
Menu

public abstract class BaseMenu

BaseMenu TransformationBean™ used to create a Menu used for controlling rollover dropdown actions, selectors and navigation style menus. For rollover/hover menu types, MenuItems are added to a Menu. If the Menu is for controling a selector, selectorMenuItem must be added to the Menu. Menus must be added to a MenuBar.

Note that subclasses of this bean actually provide the markup rendering used in/with Servlet and JavaServer Pages technologies. If you need to add support for a markup language that is not explicitly provided with AppDev Studio, then you must extend this class.

For More Information:

JSP custom tags provide an alternative to using the TransformationBeans™. Visit the Custom Tag Library Reference for additional information on the sas:Menu custom tag.

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .

For More Information:

See Also:
BaseMenuItem, BaseMenuBar, BaseSelectorMenuItem, Serialized Form

Field Summary
 int nextTabIndex
          The nextTabIndex for this menu
 int previousTabIndex
          The previousTabIndex for this menu
 
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
 
Constructor Summary
BaseMenu()
           
 
Method Summary
 void add(BaseMenu submenu)
          Sets the submenu associated with the menu item
 void add(BaseMenuItem menuItem)
          Sets the menuItem passed in as the next menuItem in the menu
 void addSeparator()
          Places a separator after the last menu item set
 int count()
          Returns the number of menu items on this menu
 java.lang.String getDividerImage()
          Returns the divider image used for menu items on this menu
 BaseMenuBar getMenuBar()
          Returns the instance of the MenuBar containing this Menu.
 java.util.ArrayList getMenuItems()
          Returns the menuItems associated with the menu
 int getMenuType()
          Returns the menu type of this menu.
 BaseSelectorMenuItem getSelectorMenuItem()
          Returns the SelectorMenuItem for this Menu.
 java.lang.String getSubMenuImage()
          Returns the image used as a sub-menu item indicator.
 boolean hasSubMenus()
          Returns true if this menu has submenu items
 void setDividerImage(java.lang.String image)
          Sets the divider image to be used for menu items that are on this menu
 void setMenuType(int type)
          Sets the menu type the Menu
com.sas.servlet.tbeans.menubar.BaseMenuBar.NAVIGATION - The menu does not contain MenuItems or SelectorMenuItems
com.sas.servlet.tbeans.menubar.BaseMenuBar.DROP_HOVER - MenuItems or SelectorMenuItems associated with the menu appear when hover over the menu.
 void setSelectorMenuItem(BaseSelectorMenuItem menuItem)
          Sets the SelectorMenuItem which is used for this menu when menuType is SELECTOR_EXTERNAL or SELECTOR_EXPAND.
 void setSubMenuImage(java.lang.String image)
          Sets the image used as a sub-menu item indicator.
 
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, write
 

Field Detail

nextTabIndex

public int nextTabIndex
The nextTabIndex for this menu


previousTabIndex

public int previousTabIndex
The previousTabIndex for this menu

Constructor Detail

BaseMenu

public BaseMenu()
Method Detail

add

public void add(BaseMenu submenu)
Sets the submenu associated with the menu item

Parameters:
submenu - a menu containing menu items which will be displayed as cascading menu items

add

public void add(BaseMenuItem menuItem)
Sets the menuItem passed in as the next menuItem in the menu

Parameters:
menuItem - the menuItem to be placed next in the menu

addSeparator

public void addSeparator()
Places a separator after the last menu item set


count

public int count()
Returns the number of menu items on this menu

Returns:
the number of menu items

getDividerImage

public java.lang.String getDividerImage()
Returns the divider image used for menu items on this menu

Returns:
the divider image

getMenuBar

public BaseMenuBar getMenuBar()
Returns the instance of the MenuBar containing this Menu. This is an internal method.

Returns:
The MenuBar instance

getMenuItems

public java.util.ArrayList getMenuItems()
Returns the menuItems associated with the menu

Returns:
the menuItems associated with the menu

getMenuType

public int getMenuType()
Returns the menu type of this menu. If type is not set on the menu, the MenuBar's type will be used.

Returns:
The menu type

getSelectorMenuItem

public BaseSelectorMenuItem getSelectorMenuItem()
Returns the SelectorMenuItem for this Menu.

Returns:
the SelectorMenuItem for the menu

getSubMenuImage

public java.lang.String getSubMenuImage()
Returns the image used as a sub-menu item indicator.

Returns:
image indicator of the menu item with submenus

hasSubMenus

public boolean hasSubMenus()
Returns true if this menu has submenu items

Returns:
true if menu has submenus

setDividerImage

public void setDividerImage(java.lang.String image)
Sets the divider image to be used for menu items that are on this menu

Parameters:
image - the image name

setMenuType

public void setMenuType(int type)
Sets the menu type the Menu
com.sas.servlet.tbeans.menubar.BaseMenuBar.NAVIGATION - The menu does not contain MenuItems or SelectorMenuItems
com.sas.servlet.tbeans.menubar.BaseMenuBar.DROP_HOVER - MenuItems or SelectorMenuItems associated with the menu appear when hover over the menu. If there are no MenuItems or SelectorMenuItems, the menu behaves as Navigation
com.sas.servlet.tbeans.menubar.BaseMenuBar.DROP_CLICK - MenuItems or SelectorMenuItems associated with the menu appear when clicking on the menu. If there are no MenuItems or SelectorMenuItems, the menu behaves as Navigation
com.sas.servlet.tbeans.menubar.BaseMenuBar.SELECTOR_EXPAND - The selector that's on the SelectorMenuItem appears below the SelectorMenuBar when the user clicks on this menu. (Valid only for SelectorMenuBar)
com.sas.servlet.tbeans.menubar.BaseMenuBar.SELECTOR_EXTERNAL - The URL set on the menu or SelectorMenuItem, will be opened on a new browser window when the user clicks on the menu or SelectorMenuItem (Valid only for SelectorMenuBar)


setSelectorMenuItem

public void setSelectorMenuItem(BaseSelectorMenuItem menuItem)
Sets the SelectorMenuItem which is used for this menu when menuType is SELECTOR_EXTERNAL or SELECTOR_EXPAND. If more than one SelectorMenuItems are needed per menu, use add() instead of this method.

Parameters:
menuItem - the SelectorMenuItem to be displayed when the menu is clicked.

setSubMenuImage

public void setSubMenuImage(java.lang.String image)
Sets the image used as a sub-menu item indicator.

Parameters:
image - indicator of the menu item with submenus



Copyright © 2009 SAS Institute Inc. All Rights Reserved.