Packages
 In this topic

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.ui   Previous This
Package
Next

 


Interface IUIMenuLauncher

public interface IUIMenuLauncher
{
  // Methods
  public void cancel();
  public void ended(Event event);
  public IUIContainer getDisplayer();
  public UIMenuList getMenu();
  public Rectangle getPlacement(Dimension size);
  public boolean isLaunched();
  public boolean launch();
  public void raiseEvent(Event e);
  public void setMenu(UIMenuList menu);
}

This interface is used to launch and cancel a pop-up menu. UIMenuLauncher implements IUIMenuLauncher.

Methods

cancel

public void cancel();

Cancels the object's associated pop-up menu.

Return Value:

No return value.

ended

public void ended(Event event);

Called by the control's associated pop-up menu once the menu is closed (either by selecting an item or cancelling menu mode)

Return Value:

No return value.

ParameterDescription
event The event that will be fired by the caller after end is complete; null if no event will be fired.

Remarks:

This method implements selected in the IUIMenuLauncher interface by resetting its state and generating an action event, if necessary.

getDisplayer

public IUIContainer getDisplayer();

Retrieves the displayer for the pop-up menu associated with the menu launcher control. By default, this will be the pop-up menu itself.

Note Any displayer must have a UIMenuLauncher menu as a child.

Return Value:

Returns the displayer object for the pop-up menu.

getMenu

public UIMenuList getMenu();

Retrieves the pop-up menu associated with the menu launcher object.

Return Value:

Returns the UIMenuList object containing the menu's content.

getPlacement

public Rectangle getPlacement(Dimension size);

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

Return Value:

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

ParameterDescription
size The preferred size of the pop-up menu (in pixels).

isLaunched

public boolean isLaunched();

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

Return Value:

Returns true if the launch state is set; otherwise, returns false.

launch

public boolean launch();

Launches the object's associated pop-up menu.

Return Value:

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

raiseEvent

public void raiseEvent(Event e);

Called by the object's pop-up menu when an event occurs.

Return Value:

No return value.

ParameterDescription
e The event that occurred.

setMenu

public void setMenu(UIMenuList menu);

Sets the pop-up menu to be associated with the menu launcher object.

Return Value:

No return value.

ParameterDescription
menu The UIMenuList object containing the menu's content.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.