com.sas.servlet.tbeans.menubar
Class BaseMenuItem

com.sas.servlet.tbeans.menubar.BaseMenuItem
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:
BaseMenu, BaseSelectorMenuItem, MenuItem

public abstract class BaseMenuItem
implements TemplateInterface, com.sas.servlet.tbeans.TemplateKeyInterface

BaseMenuItem TransformationBean™ used to create a MenuItem. MenuItems are added to a Menu. Menus are 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:MenuItem 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 .

See Also:
BaseMenu, BaseMenuBar, BaseSelectorMenuItem, Serialized Form

Field Summary
 boolean submenu
          True if the menu item contains submenus
 
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
BaseMenuItem()
           
 
Method Summary
 java.lang.String getDefaultTemplate()
          Returns the default template to be used for the MenuBar.
 BaseMenu getMenu()
          Returns the instance of the Menu containing this MenuItem.
 BaseMenuItem getNextMenu()
          Use internally to assist in keyboard navigation.
 BaseMenuItem getNextMenuItem()
          Use internally to assist in keyboard navigation.
 BaseMenuItem getPreviousMenu()
          Use internally to assist in keyboard navigation.
 BaseMenuItem getPreviousMenuItem()
          Use internally to assist in keyboard navigation.
 java.lang.String getTemplate()
          Returns the template used for a component.
 java.util.HashMap getTemplateDictionary()
          Returns a user defined template dictionary for the component
 java.lang.String getTemplateFileName()
          Returns the template file name for the component
 java.lang.String getTemplateLocation()
          Returns the location the template file should be retrieved from.
 boolean isDivider()
          Returns true if the menu item does not have an image and label specified.
 boolean isSelected()
          Returns true if the current menu item is selected; false otherwise
 void setNextMenu(BaseMenuItem nextMenuId)
          Use internally to assist in keyboard navigation.
 void setNextMenuItem(BaseMenuItem nextMenuItemId)
          Use internally to assist in keyboard navigation.
 void setPreviousMenu(BaseMenuItem previousMenuId)
          Use internally to assist in keyboard navigation.
 void setPreviousMenuItem(BaseMenuItem previousMenuItemId)
          Use internally to assist in keyboard navigation.
 void setSelected(boolean selected)
          Sets the state of the menu item.
 void setTemplate(java.io.File file)
          Sets a template file object
 void setTemplate(java.io.InputStreamReader isr)
          Sets a template file object
 void setTemplate(java.lang.String template)
          Sets the template for this component.
 void setTemplateDictionary(java.util.HashMap dictionary)
          Sets a user defined dictionary for the component containing variables along with their associated values.
 void setTemplateFileName(java.lang.String file)
          The name of the template file.
 void setTemplateLocation(java.lang.String location)
          Sets the location the template file should be retrieved from.
 
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

submenu

public boolean submenu
True if the menu item contains submenus

Constructor Detail

BaseMenuItem

public BaseMenuItem()
Method Detail

getMenu

public BaseMenu getMenu()
Returns the instance of the Menu containing this MenuItem. This is an internal method.

Returns:
The Menu

getDefaultTemplate

public java.lang.String getDefaultTemplate()
Returns the default template to be used for the MenuBar.

Specified by:
getDefaultTemplate in interface TemplateInterface
Returns:
The default template
See Also:
setTemplate(String)

getTemplate

public java.lang.String getTemplate()
Returns the template used for a component.

Specified by:
getTemplate in interface TemplateInterface
Returns:
a string representing the template on this component. Return null if no template set.
See Also:
setTemplate(String), setTemplate(java.io.File), setTemplate(java.io.InputStreamReader)

setTemplate

public void setTemplate(java.lang.String template)
Sets the template for this component.

Specified by:
setTemplate in interface TemplateInterface
Parameters:
a - string that contains keys %SOME_KEY for template substitution
See Also:
getTemplate()

setTemplate

public void setTemplate(java.io.File file)
Sets a template file object

Specified by:
setTemplate in interface TemplateInterface
Parameters:
file - The file object that contains the template file
See Also:
getTemplate()

setTemplate

public void setTemplate(java.io.InputStreamReader isr)
Sets a template file object

Parameters:
file - The file object that contains the template file
See Also:
getTemplate()

setTemplateLocation

public void setTemplateLocation(java.lang.String location)
Sets the location the template file should be retrieved from. If this value is set to null, the default location will be used.

Specified by:
setTemplateLocation in interface TemplateInterface
Parameters:
location - the location of the template file
See Also:
getTemplateLocation()

getTemplateLocation

public java.lang.String getTemplateLocation()
Returns the location the template file should be retrieved from.

Specified by:
getTemplateLocation in interface TemplateInterface
Returns:
the template location
See Also:
setTemplateLocation(String)

setTemplateFileName

public void setTemplateFileName(java.lang.String file)
The name of the template file.

Specified by:
setTemplateFileName in interface TemplateInterface
Parameters:
template - the file name containing the template
See Also:
getTemplateFileName()

getTemplateFileName

public java.lang.String getTemplateFileName()
Returns the template file name for the component

Specified by:
getTemplateFileName in interface TemplateInterface
Returns:
the template file name
See Also:
setTemplateFileName(String)

isSelected

public boolean isSelected()
Returns true if the current menu item is selected; false otherwise

Returns:
the menu item state (boolean)
See Also:
setSelected(boolean)

setSelected

public void setSelected(boolean selected)
Sets the state of the menu item. true if selected, false otherwise

Parameters:
selected - the state of the menu item
See Also:
isSelected()

getTemplateDictionary

public java.util.HashMap getTemplateDictionary()
Returns a user defined template dictionary for the component

Specified by:
getTemplateDictionary in interface TemplateInterface
Returns:
the template dictionary

setTemplateDictionary

public void setTemplateDictionary(java.util.HashMap dictionary)
Sets a user defined dictionary for the component containing variables along with their associated values.

Specified by:
setTemplateDictionary in interface TemplateInterface
Parameters:
a - user defined dictionary

isDivider

public boolean isDivider()
Returns true if the menu item does not have an image and label specified.

Returns:
true if no image and label is set

getNextMenu

public BaseMenuItem getNextMenu()
Use internally to assist in keyboard navigation.

Returns:
Returns the nextMenuId.

setNextMenu

public void setNextMenu(BaseMenuItem nextMenuId)
Use internally to assist in keyboard navigation.

Parameters:
nextMenuId - The nextMenuId to set.

getNextMenuItem

public BaseMenuItem getNextMenuItem()
Use internally to assist in keyboard navigation.

Returns:
Returns the nextMenuItemId.

setNextMenuItem

public void setNextMenuItem(BaseMenuItem nextMenuItemId)
Use internally to assist in keyboard navigation.

Parameters:
nextMenuItemId - The nextMenuItemId to set.

getPreviousMenu

public BaseMenuItem getPreviousMenu()
Use internally to assist in keyboard navigation.

Returns:
Returns the previousMenuId.

setPreviousMenu

public void setPreviousMenu(BaseMenuItem previousMenuId)
Use internally to assist in keyboard navigation.

Parameters:
previousMenuId - The previousMenuId to set.

getPreviousMenuItem

public BaseMenuItem getPreviousMenuItem()
Use internally to assist in keyboard navigation.

Returns:
Returns the previousMenuItemId.

setPreviousMenuItem

public void setPreviousMenuItem(BaseMenuItem previousMenuItemId)
Use internally to assist in keyboard navigation.

Parameters:
previousMenuItemId - The previousMenuItemId to set.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.