|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.actions.QuickMenuCreator
public abstract class QuickMenuCreator
Abstract class that is capable of creating a context menu. It will try and open the menu close to the current selection, or under the mouse pointer if that's not possible.
Constructor Summary | |
---|---|
QuickMenuCreator()
|
Method Summary | |
---|---|
protected Point |
computeMenuLocation(Control focus)
Determine the optimal point for this menu to appear. |
protected Point |
computeMenuLocation(StyledText text)
Hook to compute the menu location if the focus widget is a styled text widget. |
protected Point |
computeMenuLocation(Table table)
Hook to compute the menu location if the focus widget is a table widget. |
protected Point |
computeMenuLocation(Tree tree)
Hook to compute the menu location if the focus widget is a tree widget. |
void |
createMenu()
Create and open the context menu. |
void |
dispose()
Deprecated. As of 3.5 this is not necessary as the SWT Menu created in createMenu() will be disposed shortly after the
SWT.Hide event. |
protected abstract void |
fillMenu(IMenuManager menu)
Create the contents of the context menu. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QuickMenuCreator()
Method Detail |
---|
public void createMenu()
protected abstract void fillMenu(IMenuManager menu)
menu
- the menu to fillprotected Point computeMenuLocation(Control focus)
focus
- the focus control
protected Point computeMenuLocation(StyledText text)
text
- the styled text widget that has the focus
null
if now position inside the widget can be
computedprotected Point computeMenuLocation(Tree tree)
tree
- the tree widget that has the focus
null
if now position inside the widget can be
computedprotected Point computeMenuLocation(Table table)
table
- the table widget that has the focus
null
if now position inside the widget can be
computedpublic void dispose()
createMenu()
will be disposed shortly after the
SWT.Hide event.
|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.