Package com.dassault_systemes.catjdialog

   
Interface CATMenuModel

 
Class Hierarchy
com.dassault_systemes.catjdialog.CATMenuModel
Class Location

Framework : CATJDialog

Module : CATJDialog

Class Description

public interface CATMenuModel

The menu model interface.

This interface allows to define content for:

Implement it to define such a content.

See Also:
CATToolbar#setModel(CATMenuModel)
CATDialogFrame#setToolbar(CATMenuModel)
CATKeyTableModelCtxMenuEx#getContextualMenu(String, int)
CATKeyTreeModelCtxMenuEx#getContextualMenu(String)
CATKeyPathTreeModelCtxMenuEx#getContextualMenu(CATDialog, String[])
Field Summary
public static final String SEPARATOR
Item ID for defining a separator.

Constructor Summary

Method Summary
public String getItemIcon(String iItemID, Object iContext)
Returns the icon for the specified menu item (null if no icon).
public String getItemLabel(String iItemID, Object iContext)
Returns the label of the specified menu item.
public Enumeration getItems(String iFatherItemID, Object iContext)
Returns the list of children items of the specified item.
public boolean isCheckBox(String iItemID, Object iContext)
Determines whether the specified item has a check-box or not.
public boolean isChecked(String iItemID, Object iContext)
Returns the specified check-box item state (true is "on", false is "off").
public boolean isSubMenu(String iItemID, Object iContext)
Determines whether the specified item is a sub-menu (that is "has children items") or not.


Field Detail

SEPARATOR

    public static final String SEPARATOR
Item ID for defining a separator.


Constructor Detail

Method Detail

getItemIcon

    public String getItemIcon(String iItemID, Object iContext)

Returns the icon for the specified menu item (null if no icon).

Parameters:
iItemID
the menu item ID
iContext
the contextual object. Depends on who requires this menu model (see related doc).
Return:
null if no icon, or either a relative URI (to the runtime view), or a fully qualified URL to the icon.

getItemLabel

    public String getItemLabel(String iItemID, Object iContext)

Returns the label of the specified menu item.

Parameters:
iItemID
the menu item ID
iContext
the contextual object. Depends on who requires this menu model (see related doc).
Return:
the label that will be displayed

getItems

    public Enumeration getItems(String iFatherItemID, Object iContext)

Returns the list of children items of the specified item.

Parameters:
iFatherItemID
the father menu item ID (null for root the top item)
iContext
the contextual object. Depends on who requires this menu model (see related doc).
Return:
an enumeration of (string) children item IDs, or null if no item. The enumeration may contain one or several SEPARATOR item IDs.

isCheckBox

    public boolean isCheckBox(String iItemID, Object iContext)

Determines whether the specified item has a check-box or not.

This method isn't called for sub-menus items.

Parameters:
iItemID
the menu item ID
iContext
the contextual object. Depends on who requires this menu model (see related doc).
Return:
true if the menu item has a checkbox, false otherwise

isChecked

    public boolean isChecked(String iItemID, Object iContext)

Returns the specified check-box item state (true is "on", false is "off").

This method is only called for items that returned true to isCheckBox().

Parameters:
iItemID
the menu item ID
iContext
the contextual object. Depends on who requires this menu model (see related doc).
Return:
true if the menu item is in an "on" state, false otherwise

isSubMenu

    public boolean isSubMenu(String iItemID, Object iContext)

Determines whether the specified item is a sub-menu (that is "has children items") or not.

When a menu item is declared as a sub-menu, then the getItems() method may be called by the framework to retreive its children menu items.

Parameters:
iItemID
the menu item ID
iContext
the contextual object. Depends on who requires this menu model (see related doc).
Return:
true if the menu item is a sub-menu, false otherwise


Copyright © 2000, Dassault Systèmes. All rights reserved