Extension SDK 10.1.3.36.73

oracle.ide.controller
Interface ContextMenuListener

All Known Implementing Classes:
AbstractCanvas, CodeEditorController, VCSContextMenuListener

public interface ContextMenuListener

This is the callback interface that allows extensions to add menu items and submenus to the context menu.


Method Summary
 boolean handleDefaultAction(Context context)
          Called when the user double clicks on an item that has a context menu.
 void menuWillHide(ContextMenu contextMenu)
          This method is called just before a showing context menu is dismissed.
 void menuWillShow(ContextMenu contextMenu)
          Called just before the context menu is shown.
 

Method Detail

menuWillShow

public void menuWillShow(ContextMenu contextMenu)
Called just before the context menu is shown. Implementations should add their items to the context menu here.

Parameters:
contextMenu - the context menu being shown

menuWillHide

public void menuWillHide(ContextMenu contextMenu)
This method is called just before a showing context menu is dismissed. Most implementations should not do anything in this method. In particular, it is not necessary to clean out menu items or submenus that were added during menuWillShow(oracle.ide.controller.ContextMenu), since the IDE takes care of that automatically.

Parameters:
contextMenu - the context menu being hidden

handleDefaultAction

public boolean handleDefaultAction(Context context)
Called when the user double clicks on an item that has a context menu. If the listener handles the action, then it must return true; otherwise it must return false. Processing of handleDefaultAction stops on the first return of true.

Parameters:
context - the context on which the default action needs to occur.

Extension SDK 10.1.3.36.73

 

Copyright © 1997, 2005, Oracle.All rights reserved.