ilog.views.util.servlet.model
Class IlvMenu

java.lang.Object
  extended by ilog.views.util.servlet.model.IlvMenuItem
      extended by ilog.views.util.servlet.model.IlvMenu
All Implemented Interfaces:
Serializable

public class IlvMenu
extends IlvMenuItem

An implementation of a menu that contains menu items. In addition to IlvMenuItems, an IlvMenu can also contains IlvMenuSeparators.

Since:
JViews 7.5
See Also:
IlvMenuItem, IlvMenuSeparator, Serialized Form

Constructor Summary
IlvMenu(String label)
          Creates a menu.
IlvMenu(String label, String image)
          Creates a menu.
IlvMenu(String label, String image, boolean enabled)
          Creates a menu.
 
Method Summary
 void addChild(IlvMenuItem menuItem)
          Adds a child menu item to this menu.
 IlvMenuItem getChild(int index)
          Returns the child at the specific index, if possible.
 ArrayList getChildren()
          Returns the menu items children list of this menu.
 boolean removeChild(IlvMenuItem menuItem)
          Removes a child menu item.
 boolean removeChild(int index)
          Removes a child menu item at the specified index if possible.
 
Methods inherited from class ilog.views.util.servlet.model.IlvMenuItem
fireActionPerformed, getActionListener, getId, getImage, getLabel, getParent, isEnabled, setActionListener, setEnabled, setId, setImage, setLabel, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvMenu

public IlvMenu(String label,
               String image,
               boolean enabled)
Creates a menu.

Parameters:
label - The menu label.
image - The optional image.
enabled - The

IlvMenu

public IlvMenu(String label,
               String image)
Creates a menu.

Parameters:
label - The menu label.
image - The optional image.

IlvMenu

public IlvMenu(String label)
Creates a menu.

Parameters:
label - The menu label.
Method Detail

addChild

public void addChild(IlvMenuItem menuItem)
Adds a child menu item to this menu.

Parameters:
menuItem - The menu item to add.

removeChild

public boolean removeChild(IlvMenuItem menuItem)
Removes a child menu item.

Parameters:
menuItem - The menu item to remove.
Returns:
true if the menu item was successfully removed, false otherwise.

removeChild

public boolean removeChild(int index)
Removes a child menu item at the specified index if possible.

Parameters:
index - The index of the menu item to remove
Returns:
true if the menu item was successfully removed, false otherwise.

getChildren

public ArrayList getChildren()
Returns the menu items children list of this menu.

Returns:
The menu items of this menu.

getChild

public IlvMenuItem getChild(int index)
Returns the child at the specific index, if possible.

Parameters:
index - The index or the menu item to remove.
Returns:
The child menu item if found, null otherwise.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.