Package tripleplay.ui
Class MenuHost.Pop
java.lang.Object
tripleplay.ui.MenuHost.Pop
- Enclosing class:
MenuHost
An event type for triggering a menu popup.
-
Field Summary
Modifier and TypeFieldDescriptionpythagoras.f.IRectangle
The bounds to confine the menu, in screen coordinates; usually the whole screen.final Menu
The menu to show.final pythagoras.f.IPoint
The position of the pointer, if given during construction, otherwise null.final Element<?>
The element that triggered the popup. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionOptionally confines the menu area to the given element.inScreenArea
(pythagoras.f.IRectangle area) Optionally confines the menu area to the given screen area.popup()
Pops up this instance on the trigger's root's menu host.relayEvents
(Layer layer) Causes the menu to handle further events on the given layer.Flags thisPop
event so that the menu will not be destroyed automatically when it is deactivated.
-
Field Details
-
trigger
The element that triggered the popup. -
pointer
public final pythagoras.f.IPoint pointerThe position of the pointer, if given during construction, otherwise null. -
bounds
public pythagoras.f.IRectangle boundsThe bounds to confine the menu, in screen coordinates; usually the whole screen.
-
-
Constructor Details
-
Pop
-
Pop
-
-
Method Details
-
relayEvents
Causes the menu to handle further events on the given layer. This is usually the layer handling a pointer start that caused the popup. A listener will be added to the layer and the menu notified of pointer drag and end events. -
retainMenu
Flags thisPop
event so that the menu will not be destroyed automatically when it is deactivated. Returns this instance for chaining. -
inScreenArea
Optionally confines the menu area to the given screen area. By default the menu is confined by the host's screen area (seeMenuHost.getScreenArea()
). -
inElement
Optionally confines the menu area to the given element. By default the menu is confined by the host's screen area (seeMenuHost.getScreenArea()
). -
popup
Pops up this instance on the trigger's root's menu host. SeeMenuHost.popup(Pop)
. For convenience, returns the host that was used to perform the popup.
-