All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.servlet.tbeans.menubar
Class BaseMenuBar

    com.sas.servlet.tbeans.menubar.BaseMenuBar

All Implemented Interfaces:
  com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, RenderableInterface, TemplateInterface, com.sas.servlet.tbeans.TemplateKeyInterface, TransformationInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable

Direct Known Subclasses:
  BaseHTMLMenuBar

    public abstract class BaseMenuBar

implements TemplateInterface, com.sas.servlet.tbeans.TemplateKeyInterface

The BaseMenuBar is an abstract TransformationBean™ used to create a MenuBar. MenuBar will contain one or more Menus. Menus may contain one or more MenuItems or SelectorMenuItems.

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:TreeView 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:
  `BaseMenuItem`, `BaseMenu`, `BaseSelectorMenuItem`, Serialized Form

Field Summary
`static int` | `DROP_CLICK` MenuItems or SelectorMenuItems associated with the menu appear when clicking on the menu.
`static int` | `DROP_HOVER` MenuItems or SelectorMenuItems associated with the menu appear when hover over the menu.
`int` | `menuCounter` Number of Menu/MenuItems on this menubar.
`static int` | `NAVIGATION` The menu does not contain MenuItems or SelectorMenuItems
`static int` | `SELECTOR_EXPAND` The selector that's on the SelectorMenuItem appears below the SelectorMenuBar when the user clicks on this menu.
`static int` | `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)

Constructor Summary
`BaseMenuBar()`

Method Summary
`void` | `add(BaseButton button)`
`void` | `add(BaseMenu menu)` Adds the menu passed in as the next menu in the MenuBar
`int` | `getBorderWidth()` Retuns the width of the outer border around the MenuBar.
`int` | `getCellPadding()` Returns the number of pixels between the border of a menu and the menu's contents.
`int` | `getCellSpacing()` Gets the number of pixels between the border of each Menu.
`java.lang.String` | `getDefaultTemplate()` Returns the default template to be used for the MenuBar.
`int` | `getFirstTabIndex()` Returns the first tab index set on the first menu
`int` | `getHeight()` Returns the height of the MenuBar
`int` | `getHeightPercentage()` Gets the height of the Table/MenuBar as a percentage
`boolean` | `getHorizontalOrientation()` Returns true if the orientation of the menu bar is horizontal, false otherwise
`int` | `getLastTabIndex()` Returns the last tab index used on this MenuBar
`int` | `getMenuCount()` Returns the number of menus that have been added to this menubar
`java.util.ArrayList` | `getMenus()` Returns an `ArrayList` containing all menus that have been added to this menubar
`int` | `getMenuType()` Returns the menuType of the menu bar
`MenuBarNodeInterface` | `getModel()` Returns the MenuBarNodeInterface used for this menubar.
`int` | `getNumberOfMenuItems()`
`java.lang.String` | `getSeparator()` Returns the separator string between each menu
`java.lang.String` | `getSeparatorImage()` Returns the separator image used as a separator of each menu.
`java.lang.String` | `getStyleClassPrefix()` Returns the styleClassPrefix of the menu bar
`java.lang.String` | `getTarget()` Returns the target set on the menubar.
`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 retrived from.
`int` | `getWidth()` Gets the width of the MenuBar.
`int` | `getWidthPercentage()` Returns the width percentage of the MenuBar
`void` | `setBorderWidth(int border)` Sets the width of the outer border around the MenuBar.
`void` | `setCellPadding(int padding)` Sets the number of pixels between the border of a menu and the menu's contents.
`void` | `setCellSpacing(int spacing)` Sets the number of pixels between each Menu.
`void` | `setFirstTabIndex(int tabindex)` Sets the first tab index to be set on the first menu.
`void` | `setHeight(int value)` Sets the height of the MenuBar.
`void` | `setHeightPercentage(int value)` Sets the height percentage of the MenuBar
`void` | `setHorizontalOrientation(boolean orientation)` Sets the orientation of the menu bar.
`void` | `setMenuType(int type)` Sets the menu type for all Menus on this MenuBar or SelectorMenubar `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` | `setModel(MenuBarNodeInterface newValue)` Specifies the model to display in the view.
`void` | `setSeparator(java.lang.String value)` Sets a separator string to be used as a separator of each menu.
`void` | `setSeparatorImage(java.lang.String value)` Sets a separator image to be used as a separator of each menu.
`void` | `setStyleClassPrefix(java.lang.String styleClassPrefix)` Sets the styleClassPrefix of the menu bar
`void` | `setTarget(java.lang.String value)` Sets the target value which is used as a name of the opener window when menuType is SELECTOR_EXTERNAL.
`void` | `setTemplate(java.io.File file)` Sets a templet file object
`void` | `setTemplate(java.io.InputStreamReader isr)` Sets a templet file object
`void` | `setTemplate(java.lang.String template)` Sets the template for this compoment.
`void` | `setTemplateDictionary(java.util.HashMap dictionary)` Sets a user defined dictionary for the component containing varialbes 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.
`void` | `setWidth(int value)` Sets the width of the MenuBar.
`void` | `setWidthPercentage(int value)` Sets the width of the MenuBar as a percentage

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

### DROP_HOVER

    public static final int 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

  See Also:
    Constant Field Values

### NAVIGATION

    public static final int NAVIGATION

  The menu does not contain MenuItems or SelectorMenuItems

  See Also:
    Constant Field Values

### SELECTOR_EXPAND

    public static final int SELECTOR_EXPAND

  The selector that's on the SelectorMenuItem appears below the SelectorMenuBar when the user clicks on this menu. (Valid only for SelectorMenuBar)

  See Also:
    Constant Field Values

### SELECTOR_EXTERNAL

    public static final int 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)

  See Also:
    Constant Field Values

### DROP_CLICK

    public static final int 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

  See Also:
    Constant Field Values

### menuCounter

    public int menuCounter

  Number of Menu/MenuItems on this menubar.

Constructor Detail

### BaseMenuBar

    public BaseMenuBar()

Method Detail

### add

    public void add(BaseMenu menu)

  Adds the menu passed in as the next menu in the MenuBar

  Parameters:
    `menu` - The menu to be placed next in the MenuBar

### add

    public void add(BaseButton button)

### getMenuType

    public int getMenuType()

  Returns the menuType of the menu bar

  Returns:
    The menu bar menu type
  See Also:
    `setMenuType(int)`

### setMenuType

    public void setMenuType(int type)

  Sets the menu type for all Menus on this MenuBar or SelectorMenubar
  `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)

  Parameters:
    `mtype` - The menu type
  See Also:
    `getMenuType()`

### setStyleClassPrefix

    public void setStyleClassPrefix(java.lang.String styleClassPrefix)

  Sets the styleClassPrefix of the menu bar

  Parameters:
    `styleClassPrefix` - the styleClassPrefix to use for the menubar
  See Also:
    `getStyleClassPrefix()`

### getStyleClassPrefix

    public java.lang.String getStyleClassPrefix()

  Returns the styleClassPrefix of the menu bar

  Returns:
    The styleClassPrefix
  See Also:
    `setStyleClassPrefix(String)`

### getHorizontalOrientation

    public boolean getHorizontalOrientation()

  Returns true if the orientation of the menu bar is horizontal, false otherwise

  Returns:
    a returned value of false indicates vertical menu bar orientation.
  See Also:
    `setHorizontalOrientation(boolean)`

### setHorizontalOrientation

    public void setHorizontalOrientation(boolean orientation)

  Sets the orientation of the menu bar. true for horizontal or false for vertical.

  Parameters:
    `orientation` - A value of false indicates verical menu bar orientation.
  See Also:
    `getHorizontalOrientation()`

### setSeparator

    public void setSeparator(java.lang.String value)

  Sets a separator string to be used as a separator of each menu. The separator will be used where there are more than one menus on the menubar.

  Parameters:
    `value` - The separator of the menu
  See Also:
    `getSeparator()`, `setSeparatorImage(String)`

### getSeparator

    public java.lang.String getSeparator()

  Returns the separator string between each menu

  Returns:
    The separator string
  See Also:
    `setSeparator(String)`, `setSeparatorImage(String)`

### setSeparatorImage

    public void setSeparatorImage(java.lang.String value)

  Sets a separator image to be used as a separator of each menu. The separatorImage will be used where there are more than one menus on the menubar. If both the separator and separatorImage are set, separatorImage will be honored.

  Parameters:
    `value` - The separator image of the menu
  See Also:
    `getSeparator()`, `getSeparatorImage()`

### getSeparatorImage

    public java.lang.String getSeparatorImage()

  Returns the separator image used as a separator of each menu.

  Returns:
    The separator image
  See Also:
    `setSeparatorImage(String)`, `getSeparator()`

### getMenus

    public java.util.ArrayList getMenus()

  Returns an `ArrayList` containing all menus that have been added to this menubar

  Returns:
    ArrayList containing all menus that have been added to this menubar, guaranteed non-null
  See Also:
    `add(BaseMenu)`

### getMenuCount

    public int getMenuCount()

  Returns the number of menus that have been added to this menubar

  Returns:
    the number of menus, 0 if no menus are added
  See Also:
    `getMenus()`

### setModel

    public void setModel(MenuBarNodeInterface newValue)

  Specifies the model to display in the view. Models must implement com.sas.models.MenuBarNodeInterface in order to be used by this transformation bean Pass `null` to disassociate the view from its model.

  Parameters:
    `newValue` - The new value to assign the modelInterface property.
  See Also:
    `getModel()`

### getModel

    public MenuBarNodeInterface getModel()

  Returns the MenuBarNodeInterface used for this menubar. If a model is set the menus added via the add() will be ignored.

  Returns:
    the model used for this menubar.
  See Also:
    `setModel(MenuBarNodeInterface)`

### getTarget

    public java.lang.String getTarget()

  Returns the target set on the menubar. The target is used when menuType is SELECTOR_EXTERNAL as the opener window name.

  Returns:
    target value
  See Also:
    `setTarget(String)`

### setTarget

    public void setTarget(java.lang.String value)

  Sets the target value which is used as a name of the opener window when menuType is SELECTOR_EXTERNAL.

  Parameters:
    `value` - target value used for this menubar.
  See Also:
    `getTarget()`

### setBorderWidth

    public void setBorderWidth(int border)

  Sets the width of the outer border around the MenuBar.

  Parameters:
    `border` - The border width
  See Also:
    `getBorderWidth()`

### getBorderWidth

    public int getBorderWidth()

  Retuns the width of the outer border around the MenuBar.

  Returns:
    border width
  See Also:
    `setBorderWidth(int)`

### setWidth

    public void setWidth(int value)

  Sets the width of the MenuBar.

  Parameters:
    `value` - width of the MenuBar
  See Also:
    `getWidth()`

### getWidth

    public int getWidth()

  Gets the width of the MenuBar.

  Returns:
    The width of the MenuBar
  See Also:
    `setWidth(int)`

### setWidthPercentage

    public void setWidthPercentage(int value)

  Sets the width of the MenuBar as a percentage

  Parameters:
    `value` - the width as a percentage

### getWidthPercentage

    public int getWidthPercentage()

  Returns the width percentage of the MenuBar

  Returns:
    The width as a percentage
  See Also:
    `setWidthPercentage(int)`

### setHeight

    public void setHeight(int value)

  Sets the height of the MenuBar.

  Parameters:
    `value` - The height in pixels
  See Also:
    `getHeight()`

### getHeight

    public int getHeight()

  Returns the height of the MenuBar

  Returns:
    The height in pixels
  See Also:
    `setHeight(int)`

### setHeightPercentage

    public void setHeightPercentage(int value)

  Sets the height percentage of the MenuBar

  Parameters:
    `value` - The height percentage of the MenuBar
  See Also:
    `getHeightPercentage()`

### getHeightPercentage

    public int getHeightPercentage()

  Gets the height of the Table/MenuBar as a percentage

  Returns:
    The height as a percentage
  See Also:
    `setHeightPercentage(int)`

### setCellSpacing

    public void setCellSpacing(int spacing)

  Sets the number of pixels between each Menu.

  Parameters:
    `spacing` - The number of pixels between each Menu
  See Also:
    `getCellSpacing()`

### getCellSpacing

    public int getCellSpacing()

  Gets the number of pixels between the border of each Menu.

  Returns:
    The number of pixels between each Menu.
  See Also:
    `setCellSpacing(int)`

### setCellPadding

    public void setCellPadding(int padding)

  Sets the number of pixels between the border of a menu and the menu's contents.

  Parameters:
    `padding` - the number of pixels between the border of a menu and the menu's contents
  See Also:
    `getCellPadding()`

### getCellPadding

    public int getCellPadding()

  Returns the number of pixels between the border of a menu and the menu's contents.

  Returns:
    the number of pixels between the border of a menu and the menu's contents content
  See Also:
    `setCellPadding(int)`

### getFirstTabIndex

    public int getFirstTabIndex()

  Returns the first tab index set on the first menu

  Returns:
    first tab index
  See Also:
    `setFirstTabIndex(int)`

### setFirstTabIndex

    public void setFirstTabIndex(int tabindex)

  Sets the first tab index to be set on the first menu. The tabindex for other menus and menu items will be a subsequent of the first tab index.

  See Also:
    `getFirstTabIndex()`

### getLastTabIndex

    public int getLastTabIndex()

  Returns the last tab index used on this MenuBar

  Returns:
    The last tab index
  See Also:
    `setFirstTabIndex(int)`, `getFirstTabIndex()`

### 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 compoment.

  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 templet 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 templet file object

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

### 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 temmplate file name
  See Also:
    `setTemplateFileName(String)`

### 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 retrived from.

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

### 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
  See Also:
    `setTemplateDictionary(HashMap)`

### setTemplateDictionary

    public void setTemplateDictionary(java.util.HashMap dictionary)

  Sets a user defined dictionary for the component containing varialbes along with their associated values.

  Specified by:
    `setTemplateDictionary` in interface `TemplateInterface`
  Parameters:
    `dictionary` - a user defined dictionary
  See Also:
    `getTemplateDictionary()`

### getNumberOfMenuItems

    public int getNumberOfMenuItems()

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.