com.sas.models
Class MenuItemNode

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

public class MenuItemNode
implements MenuItemNodeInterface

MenuItemNode extends Node and provides an implementation of MenuItemNodeInterface

See Also:
Serialized Form

Field Summary
static java.lang.String RB_KEY
           
 
Fields inherited from class com.sas.models.Node
children, defaultNodeStyle, expandedNodeText, externalUpdateSupported, hasChildren, nodeStyle, nodeText, nodeType, objectData
 
Constructor Summary
MenuItemNode()
          Constructor of MenuItemNode.
MenuItemNode(java.lang.String label)
          Constructor of MenuItemNode
MenuItemNode(java.lang.String label, java.lang.String image)
          Constructor of MenuItemNode
MenuItemNode(java.lang.String label, java.lang.String image, java.lang.String url)
          Constructor of MenuItemNode
 
Method Summary
 void addNodeChild(SimpleNodeInterface node, int index)
          Adds a child at index.
 java.lang.String getAccessKey()
          Gets the accesskey.
 java.lang.String getAlternateText()
          Gets the alternate text.
 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
 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 alternate text.
 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 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
Constructor Detail

MenuItemNode

public MenuItemNode()
Constructor of MenuItemNode.


MenuItemNode

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

Parameters:
label - text label on the MenuItemNode
image - image to display on MenuItemNode
url - url to associate with MenuItemNode

MenuItemNode

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

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

MenuItemNode

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

Parameters:
label - text label on the MenuItemNode
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

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

setAlternateText

public void setAlternateText(java.lang.String value)
Sets the alternate text.

Parameters:
value - The alternate text

getAlternateText

public java.lang.String getAlternateText()
Gets the alternate text.

Returns:
alternateText The alternate text

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.