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
String SEPARATOR

Constructor Summary

Method Summary
Enumeration getItems(String iFatherItemID, Object iContext)
String getItemLabel(String iItemID, Object iContext)
String getItemIcon(String iItemID, Object iContext)
boolean isSubMenu(String iItemID, Object iContext)
boolean isCheckBox(String iItemID, Object iContext)
boolean isChecked(String iItemID, Object iContext)


Field Detail

SEPARATOR

    String SEPARATOR
Item ID for defining a separator.


Constructor Detail

Method Detail

getItems

    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).
Returns:
an enumeration of (string) children item IDs, or null if no item. The enumeration may contain one or several SEPARATOR item IDs.

getItemLabel

    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).
Returns:
the label that will be displayed

getItemIcon

    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).
Returns:
null if no icon, or either a relative URI (to the runtime view), or a fully qualified URL to the icon.

isSubMenu

    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).
Returns:
true if the menu item is a sub-menu, false otherwise

isCheckBox

    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).
Returns:
true if the menu item has a checkbox, false otherwise

isChecked

    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).
Returns:
true if the menu item is in an "on" state, false otherwise


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