Class RightClickBehavior
java.lang.Object
org.apache.wicket.behavior.Behavior
org.apache.wicket.behavior.AbstractAjaxBehavior
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
org.hippoecm.frontend.plugins.yui.rightclick.RightClickBehavior
- All Implemented Interfaces:
Serializable
,org.apache.wicket.IComponentAwareEventSink
,org.apache.wicket.IRequestListener
,org.apache.wicket.markup.html.IComponentAwareHeaderContributor
,org.apache.wicket.util.io.IClusterable
,IContextMenu
public abstract class RightClickBehavior
extends org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
implements IContextMenu
This behavior adds a right-click event-handler to the component.
- See Also:
-
Field Summary
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
INDICATOR
-
Constructor Summary
ConstructorDescriptionRightClickBehavior
(org.apache.wicket.MarkupContainer contextmenu, org.apache.wicket.MarkupContainer componentToUpdate) -
Method Summary
Modifier and TypeMethodDescriptionvoid
collapse
(org.apache.wicket.ajax.AjaxRequestTarget target) Close the contextmenuorg.apache.wicket.MarkupContainer
org.apache.wicket.MarkupContainer
void
renderHead
(org.apache.wicket.Component component, org.apache.wicket.markup.head.IHeaderResponse response) Set up a YUI 'contextmenu' event listener on the component.protected void
updateAjaxAttributes
(org.apache.wicket.ajax.attributes.AjaxRequestAttributes attributes) Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, onBind, onMethodMismatch, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes, respond
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbind
Methods inherited from class org.apache.wicket.behavior.Behavior
beforeRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTag
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.wicket.IRequestListener
rendersPage
-
Field Details
-
MOUSE_X_PARAM
- See Also:
-
MOUSE_Y_PARAM
- See Also:
-
-
Constructor Details
-
RightClickBehavior
public RightClickBehavior(org.apache.wicket.MarkupContainer contextmenu, org.apache.wicket.MarkupContainer componentToUpdate)
-
-
Method Details
-
renderHead
public void renderHead(org.apache.wicket.Component component, org.apache.wicket.markup.head.IHeaderResponse response) Set up a YUI 'contextmenu' event listener on the component. The callback function is parameterized with the x&y coordinates of the click event. Also stop the contextmenu event from propagating to prevent the browser's contextmenu from rendering.- Specified by:
renderHead
in interfaceorg.apache.wicket.markup.html.IComponentAwareHeaderContributor
- Overrides:
renderHead
in classorg.apache.wicket.ajax.AbstractDefaultAjaxBehavior
-
updateAjaxAttributes
protected void updateAjaxAttributes(org.apache.wicket.ajax.attributes.AjaxRequestAttributes attributes) - Overrides:
updateAjaxAttributes
in classorg.apache.wicket.ajax.AbstractDefaultAjaxBehavior
-
collapse
public void collapse(org.apache.wicket.ajax.AjaxRequestTarget target) Description copied from interface:IContextMenu
Close the contextmenu- Specified by:
collapse
in interfaceIContextMenu
-
getComponentToUpdate
public org.apache.wicket.MarkupContainer getComponentToUpdate()
-