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.
public void cancel();
Cancels the object's associated pop-up menu.
Return Value:
No return value.
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.
Parameter | Description |
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.
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.
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.
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.
Parameter | Description |
size
| The preferred size of the pop-up menu (in pixels).
|
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.
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.
public void raiseEvent(Event e);
Called by the object's pop-up menu when an event occurs.
Return Value:
No return value.
Parameter | Description |
e
| The event that occurred.
|
public void setMenu(UIMenuList menu);
Sets the pop-up menu to be associated with the menu launcher object.
Return Value:
No return value.
Parameter | Description |
menu
| The UIMenuList object containing the menu's content.
|