public class IlvMenuItem extends Object implements Serializable
IlvMenu.IlvMenu,
Serialized Form| Constructor and Description |
|---|
IlvMenuItem()
Creates a menu item.
|
IlvMenuItem(String label)
Creates a menu item.
|
IlvMenuItem(String label,
ActionListener actionListener)
Creates a menu item.
|
IlvMenuItem(String label,
ActionListener actionListener,
String image)
Creates a menu item.
|
IlvMenuItem(String label,
ActionListener actionListener,
String image,
boolean enabled)
Creates a menu item.
|
IlvMenuItem(String label,
String image)
Creates a menu item.
|
| Modifier and Type | Method and Description |
|---|---|
void |
fireActionPerformed(EventObject event)
Broadcast the event to all the listeners registered on this menu item.
|
ActionListener |
getActionListener()
Returns the action listener that will be triggered if
this menu item is selected by the user.
|
String |
getBaseTextDirection()
Returns the baseTextDirection.
|
String |
getId()
Returns the ID of this menu item.
|
String |
getImage()
Returns the string representation of an URL to an
image displayed on this menu item.
|
String |
getLabel()
Returns the label of this menu item.
|
IlvMenu |
getParent()
Returns the parent
IlvMenu that contains
this menu item. |
boolean |
isEnabled()
Checks whether this menu item is enabled.
|
void |
setActionListener(ActionListener actionListener)
Sets the action listener that will be triggered if
this menu item is selected by the user.
|
void |
setBaseTextDirection(String baseTextDirection)
Sets the baseTextDirection.
|
void |
setEnabled(boolean enabled)
Specifies whether this menu item can be chosen.
|
void |
setId(String id)
Sets the ID of this menu item.
|
void |
setImage(String image)
Sets the string representation of an URL to an
image displayed on this menu item.
|
void |
setLabel(String label)
Sets the label of this menu item.
|
void |
setParent(IlvMenu parent)
Sets the parent
IlvMenu of
this menu item. |
public IlvMenuItem(String label, ActionListener actionListener, String image, boolean enabled)
label - The label of the menu item.actionListener - The action listener triggered on this menu item selection.image - The URL of an image.enabled - If true, the menu item is enabled;
if false, the menu item is disabled.public IlvMenuItem(String label, ActionListener actionListener, String image)
label - The label of the menu item.actionListener - The action listener triggered on this menu item selection.image - The URL of an image.public IlvMenuItem(String label, ActionListener actionListener)
label - The label of the menu item.actionListener - The action listener triggered on this menu item selection.public IlvMenuItem(String label, String image)
label - The label of the menu item.image - image The URL of an image.public IlvMenuItem(String label)
label - The label of the menu item.public IlvMenuItem()
public void setActionListener(ActionListener actionListener)
Note that the action listener must be supported by the IlvPopupMenuEncoder implementation set on the IlvPopupMenuServletSupport.
actionListener - The action listener.public ActionListener getActionListener()
public boolean isEnabled()
true if the menu item is enabled; false if it is disabled.public void setEnabled(boolean enabled)
enabled - If true, the menu item is enabled;
if false, the menu item is disabled.public String getImage()
public void setImage(String image)
image - The image of this menu item.public String getLabel()
public void setLabel(String label)
label - The label to set.public IlvMenu getParent()
IlvMenu that contains
this menu item.public void setParent(IlvMenu parent)
IlvMenu of
this menu item.parent - The menu that will contain this menu item.public String getId()
public void setId(String id)
Sets the ID of this menu item.
This ID could be used in a listener to determine which menu item triggered the action.
id - The ID to set.public void fireActionPerformed(EventObject event) throws Exception
event - The event object.Exceptionpublic void setBaseTextDirection(String baseTextDirection)
baseTextDirection - The base Text Direction to set.public String getBaseTextDirection()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.