com.sas.models
Class MenuNode

com.sas.models.MenuNode
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, ModelInterface, MenuItemNodeInterface, MenuNodeInterface, MutableNodeInterface, MutableSimpleNodeInterface, NodeInterface, SimpleNodeInterface, StaticNodeStyleInterface, TreeInterface, java.io.Serializable

public class MenuNode
implements MenuNodeInterface

MenuNode extends Node and provides an implementation of MenuNodeInterface

See Also:
Serialized Form

Field Summary
static int LEFT
           
static java.lang.String RB_KEY
           
static int RIGHT
           
 
Fields inherited from class com.sas.models.Node
children, defaultNodeStyle, expandedNodeText, externalUpdateSupported, hasChildren, nodeStyle, nodeText, nodeType, objectData
 
Constructor Summary
MenuNode()
          Constructor of MenuNode.
MenuNode(java.lang.String label)
          Constructor of MenuNode
MenuNode(java.lang.String label, java.lang.String image)
          Constructor of MenuNode
MenuNode(java.lang.String label, java.lang.String image, java.lang.String URL)
          Constructor of MenuNode
 
Method Summary
 void addNodeChild(SimpleNodeInterface node, int index)
          Adds a child at index.
 java.lang.String getAccessKey()
          Gets the accesskey.
 java.lang.String getAlternateText()
          Returns the ALT attribute on the HTML output tag that provides tooltip text when hovering over the image.
 java.lang.String getCustomAction()
          Returns custom action on the menu
 java.lang.String getDisabledImage()
          Returns the disabledImage
 boolean getEnabled()
          Returns the state for the current menu item.
 java.lang.String getImage()
          Returns the image displayed on the menu item
 int getImagePosition()
          Returns the position of the menu image.
 java.lang.String getLabel()
          Returns the label on the menu item
 java.lang.String getStyleClassPrefix()
          Gets the styleClassPrefix of the menu item
 java.lang.String getTabIndex()
          Gets the tabindex.
 java.lang.String getTarget()
          getTarget returns the value of the TARGET= argument used on the anchor tags generated.
 java.lang.String getTitle()
          Gets the title of the href.
 java.lang.String getURL()
          Returns the URL associated with the menu item
 boolean getWrap()
          Returns wheather the label is wrapped or not.
 void setAccessKey(java.lang.String value)
          Sets the accesskey.
 void setAlternateText(java.lang.String value)
          Sets the ALT attribute on the HTML output tag that provides tooltip text when hovering over the image.
 void setCustomAction(java.lang.String action)
          Sets a custom action on the menu
 void setDisabledImage(java.lang.String image)
          Sets the disabled image that will be displayed when the menu is disabled
 void setEnabled(boolean enabled)
          Sets the state for the current menu item
 void setImage(java.lang.String image)
          Sets the image displayed in the menu item
 void setImagePosition(int position)
          Sets the image position "Right" - If both image and text is specified for the menu, the image will be placed on the right hand side of the menu.
 void setLabel(java.lang.String label)
          Sets the label on the menu item
 void setStyleClassPrefix(java.lang.String styleClassPrefix)
          Sets the styleClassPrefix of the menu item
 void setTabIndex(java.lang.String value)
          Sets the tabindex.
 void setTarget(java.lang.String value)
          Sets the value of the TARGET= argument used on the anchor tags generated.
 void setTitle(java.lang.String value)
          Sets the title for the href.
 void setURL(java.lang.String URL)
          Sets the URL associated with the menu item
 void setWrap(boolean wrap)
          Sets true or false to determine wheather the label in the <td> tag is wrapped.
 
Methods inherited from class com.sas.models.Node
addItems, addNodeChild, addPropertyChangeListener, attachView, countNodeChildren, detachView, firePropertyChange, firePropertyChange, getDefaultNodeStyle, getIndex, getNodeChild, getNodeChildCount, getNodeChildren, getNodeChildren, getNodeExpandedText, getNodeStyle, getNodeText, getNodeType, getNodeTypes, getObjectData, getRoot, isExternalUpdateSupported, isLeafNode, moveNodeChild, notifyPropertyChange, removeAllNodeChildren, removeNodeChild, removeNodeChild, removePropertyChangeListener, setDefaultNodeStyle, setExternalUpdateSupported, setNodeChildren, setNodeExpandedText, setNodeStyle, setNodeText, setNodeType, setObjectData, sort, toString
 
Methods inherited from interface com.sas.models.NodeInterface
getNodeExpandedText, getNodeText, getNodeType
 
Methods inherited from interface com.sas.models.SimpleNodeInterface
countNodeChildren, getNodeChild, getNodeChildCount, getNodeChildren, isLeafNode
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values

RIGHT

public static final int RIGHT
See Also:
Constant Field Values

LEFT

public static final int LEFT
See Also:
Constant Field Values
Constructor Detail

MenuNode

public MenuNode()
Constructor of MenuNode.


MenuNode

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

Parameters:
label - text label on the MenuNode
image - image to display on MenuNode
URL - URL to associate with MenuNode

MenuNode

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

Parameters:
label - text label on the MenuNode
image - image to display on the MenuNode

MenuNode

public MenuNode(java.lang.String label)
Constructor of MenuNode

Parameters:
label - text label on the MenuNode
Method Detail

getLabel

public java.lang.String getLabel()
Returns the label on the menu item

Specified by:
getLabel in interface MenuItemNodeInterface
Returns:
the label on the menu item

setLabel

public void setLabel(java.lang.String label)
Sets the label on the menu item

Specified by:
setLabel in interface MenuItemNodeInterface
Parameters:
label - the label on the menu item

getImage

public java.lang.String getImage()
Returns the image displayed on the menu item

Specified by:
getImage in interface MenuItemNodeInterface
Returns:
image displayed on the menu item

setImage

public void setImage(java.lang.String image)
Sets the image displayed in the menu item

Specified by:
setImage in interface MenuItemNodeInterface
Parameters:
image - image displayed in the menu item

getDisabledImage

public java.lang.String getDisabledImage()
Returns the disabledImage

Specified by:
getDisabledImage in interface MenuItemNodeInterface
Returns:
image displayed on the menu item when the menu item is disalbed

setDisabledImage

public void setDisabledImage(java.lang.String image)
Sets the disabled image that will be displayed when the menu is disabled

Specified by:
setDisabledImage in interface MenuItemNodeInterface
Parameters:
image - image displayed when the menu item is disabled

getTarget

public java.lang.String getTarget()
getTarget returns the value of the TARGET= argument used on the anchor tags generated. This value determines where/how the links associated with the menu/menu items.

Specified by:
getTarget in interface MenuItemNodeInterface
Returns:
TARGET= argument of the anchor tags

setTarget

public void setTarget(java.lang.String value)
Sets the value of the TARGET= argument used on the anchor tags generated.

Specified by:
setTarget in interface MenuItemNodeInterface
Parameters:
value - The value of the TARGET= argument on the anchor tag

getURL

public java.lang.String getURL()
Returns the URL associated with the menu item

Specified by:
getURL in interface MenuItemNodeInterface
Returns:
the URL associated with the menu item

setURL

public void setURL(java.lang.String URL)
Sets the URL associated with the menu item

Specified by:
setURL in interface MenuItemNodeInterface
Parameters:
URL - the URL associated with the menu item

setStyleClassPrefix

public void setStyleClassPrefix(java.lang.String styleClassPrefix)
Sets the styleClassPrefix of the menu item

Specified by:
setStyleClassPrefix in interface MenuItemNodeInterface
Parameters:
styleClassPrefix - the prefix to use on the class

getStyleClassPrefix

public java.lang.String getStyleClassPrefix()
Gets the styleClassPrefix of the menu item

Specified by:
getStyleClassPrefix in interface MenuItemNodeInterface
Parameters:
styleClassPrefix - the prefix used on the class

getEnabled

public boolean getEnabled()
Returns the state for the current menu item.

Specified by:
getEnabled in interface MenuItemNodeInterface
Returns:
the state for the current menu item - true means enabled

setEnabled

public void setEnabled(boolean enabled)
Sets the state for the current menu item

Specified by:
setEnabled in interface MenuItemNodeInterface
Parameters:
enabled - state of the current menu item

getCustomAction

public java.lang.String getCustomAction()
Returns custom action on the menu

Specified by:
getCustomAction in interface MenuItemNodeInterface
Returns:
custom action on the menu

setCustomAction

public void setCustomAction(java.lang.String action)
Sets a custom action on the menu

Specified by:
setCustomAction in interface MenuItemNodeInterface
Parameters:
custom - action on the menu

getImagePosition

public int getImagePosition()
Returns the position of the menu image. "Right" - If both image and text is specified for the menu, the image will be placed on the right hand side of the menu. "Left" - If both image and text is specified for the menu, the image will be placed on the left hand side of the menu.

Specified by:
getImagePosition in interface MenuNodeInterface
Returns:
the image position

setImagePosition

public void setImagePosition(int position)
Sets the image position "Right" - If both image and text is specified for the menu, the image will be placed on the right hand side of the menu. "Left" - If both image and text is specified for the menu, the image will be placed on the left hand side of the menu.

Specified by:
setImagePosition in interface MenuNodeInterface
Parameters:
position - of the image

getAlternateText

public java.lang.String getAlternateText()
Returns the ALT attribute on the HTML output tag that provides tooltip text when hovering over the image.

Specified by:
getAlternateText in interface MenuNodeInterface
Returns:
The alternate text of the image

setAlternateText

public void setAlternateText(java.lang.String value)
Sets the ALT attribute on the HTML output tag that provides tooltip text when hovering over the image.

Specified by:
setAlternateText in interface MenuNodeInterface
Parameters:
value - The text that provides tooltip when hovering over the image.

getWrap

public boolean getWrap()
Returns wheather the label is wrapped or not.

Returns:
true if the label is wrapped; false otherwise

setWrap

public void setWrap(boolean wrap)
Sets true or false to determine wheather the label in the <td> tag is wrapped.

Parameters:
wrap - true if label is wrapped; false otherwise

setTabIndex

public void setTabIndex(java.lang.String value)
Sets the tabindex.

Parameters:
tabindex - The FormElement tabindex

getTabIndex

public java.lang.String getTabIndex()
Gets the tabindex.

Returns:
tabindex The tabindex

setAccessKey

public void setAccessKey(java.lang.String value)
Sets the accesskey.

Parameters:
accesskey - The accesskey

getAccessKey

public java.lang.String getAccessKey()
Gets the accesskey.

Returns:
accesskey The accesskey

setTitle

public void setTitle(java.lang.String value)
Sets the title for the href.

Parameters:
value - The title of the href

getTitle

public java.lang.String getTitle()
Gets the title of the href.

Returns:
accesskey The title

addNodeChild

public void addNodeChild(SimpleNodeInterface node,
                         int index)
Adds a child at index. A value of -1 for index indicates that the child is to be appended to the child list.

Specified by:
addNodeChild in interface MutableSimpleNodeInterface
Overrides:
addNodeChild in class Node
Parameters:
node - the child to add
index - the position at which to add the child
See Also:
MutableSimpleNodeInterface



Copyright © 2009 SAS Institute Inc. All Rights Reserved.