public class PopulateMenuEventArgs extends InputModeEventArgs
PopulateMenu
event.
Event handlers can modify the Menu accordingly and set ShowingMenuRequested
to true. Setting ShowingMenuRequested to false will cause the event to
be marked as Handled and no menu will be shown.
EMPTY| Constructor and Description |
|---|
PopulateMenuEventArgs(IInputModeContext context,
PointD queryLocation,
Object menu,
EventSource eventSource)
Initializes a new instance of the
PopulateMenuEventArgs class. |
| Modifier and Type | Method and Description |
|---|---|
EventSource |
getEventSource()
Gets the source that triggered this event.
|
Object |
getMenu()
Gets the popup menu to populate.
|
PointD |
getQueryLocation()
Gets the queried location in world coordinates.
|
boolean |
isHandled()
Gets a value indicating whether this
PopulateMenuEventArgs has been handled. |
boolean |
isShowingMenuRequested()
Gets a value indicating whether to actually display the context menu.
|
void |
setHandled(boolean value)
Sets a value indicating whether this
PopulateMenuEventArgs has been handled. |
void |
setShowingMenuRequested(boolean value)
Sets a value indicating whether to actually display the context menu.
|
getContextpublic PopulateMenuEventArgs(IInputModeContext context, PointD queryLocation, Object menu, EventSource eventSource)
PopulateMenuEventArgs class.context - The context.queryLocation - The query location.menu - The context menu.keyboardTriggered - Whether or not the request to display the context menu was caused by the keyboard.public final EventSource getEventSource()
public final Object getMenu()
com.yworks.yfiles.input.AbstractContextMenuInputMode
used by com.yworks.yfiles.canvas.CanvasControl#getInputMode() specifies the type of the return value. By
default an instance of ContextMenu is returned.public final PointD getQueryLocation()
public final boolean isHandled()
PopulateMenuEventArgs has been handled.
This property is automatically set to true if ShowingMenuRequested has been
assigned a value. Marking this event as handled tells the issuer of the query whether the ShowingMenuRequested
property should be used or whether additional logic should be used to determine whether to show the menu.
true if handled; false otherwise.setHandled(boolean)public final boolean isShowingMenuRequested()
This will set the Handled property to true.
true if the menu should be shown; false otherwise.setShowingMenuRequested(boolean)public final void setHandled(boolean value)
PopulateMenuEventArgs has been handled.
This property is automatically set to true if ShowingMenuRequested has been
assigned a value. Marking this event as handled tells the issuer of the query whether the ShowingMenuRequested
property should be used or whether additional logic should be used to determine whether to show the menu.
value - true if handled; false otherwise.isHandled()public final void setShowingMenuRequested(boolean value)
This will set the Handled property to true.
value - true if the menu should be shown; false otherwise.isShowingMenuRequested()