001
002package org.opencms.ui.shared.rpc;
003
004import com.vaadin.shared.communication.ServerRpc;
005
006/**
007 * The context menu server RPC.<p>
008 *
009 * Adapted from ContextMenu by Peter Lehto / Vaadin Ltd.<p>
010 */
011public interface I_CmsContextMenuServerRpc extends ServerRpc {
012
013    /**
014     * Called by the client side when context menu is closed.<p>
015     */
016    public void contextMenuClosed();
017
018    /**
019     * Called by the client widget when context menu item is clicked.<p>
020     * 
021     * @param itemId id of the clicked item
022     * @param menuClosed will be true if menu was closed after the click
023     */
024    public void itemClicked(String itemId, boolean menuClosed);
025
026    /**
027     * Called by the client side when context menu is about to be opened.<p>
028     * 
029     * @param x mouse x coordinate
030     * @param y mouse y coordinate
031     * @param connectorIdOfComponent component connector id on which the click was made
032     */
033    public void onContextMenuOpenRequested(int x, int y, String connectorIdOfComponent);
034}