Package com.ms.ui Previous
Previous
Contents
Contents
Index
Index
Next
Next

Interface IUIMenuLauncher

Methods

public interface IUIMenuLauncher
{
  // Methods
  public void cancel();
  public void cancelled();
  public boolean isLaunched();
  public UIMenuList getMenu();
  public Rectangle getPlacement(Dimension size);
  public boolean launch();
  public void selected(Object obj);
  public void setMenu(UIMenuList menu);

}

Defines an interface for classes that can launch pop-up menus. UIMenuLauncher implements this interface.


Methods


cancel

public void cancel();

Cancels the object's pop-up menu.

Return Value:

No return value.


cancelled

public void cancelled();

Called by the object's pop-up menu when the menu is cancelled.

Return Value:

No return value.


isLaunched

public boolean isLaunched();

Determines the launched state of the object's pop-up menu.

Return Value:

Returns true if the menu is in the launched state; otherwise, returns false.


getMenu

public UIMenuList getMenu();

Retrieves the object's pop-up menu.

Return Value:

Returns the UIMenuList control used for the pop-up menu's content.


getPlacement

public Rectangle getPlacement(Dimension size);

Called by the object's pop-up menu when the menu is to be positioned.

Return Value:

Returns the bounding rectangle (in screen coordinates) of the menu.

ParameterDescription
size A Dimension object containing the preferred size of the pop-up menu.


launch

public boolean launch();

Launches the object's pop-up menu.

Return Value:

Returns true if the menu was launched; otherwise, returns false.


selected

public void selected(Object obj);

Called by the object's pop-up menu when it has been closed after an item is selected.

Return Value:

No return value.

ParameterDescription
obj The selected menu item.


setMenu

public void setMenu(UIMenuList menu);

Sets the object's associated pop-up menu.

Return Value:

No return value.

ParameterDescription
menu The UIMenuList control to be used for the pop-up menu's content.



Top© 1997 Microsoft Corporation. All rights reserved. Legal Notices.