google-code-export / rocket-gwt

Automatically exported from code.google.com/p/rocket-gwt
1 stars 1 forks source link

Add overloaded methods of open() in ContextMenu to specify where to open the menu #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be useful to specify where to open the context menu, as it would
vary from widget to widget.

For example, when the user opens a context menu within a table, it should
open near the cell the user clicks. This can be a trivial addition by
adding an Element or x and y integers into the parameter of the overloaded
open() method.

Original issue reported on code.google.com by ali.scis...@gmail.com on 27 Dec 2007 at 5:56

GoogleCodeExporter commented 9 years ago
Sounds like a good idea and shouldnt break any existing code to make the change.

Original comment by miroslav...@gmail.com on 30 Dec 2007 at 9:09

GoogleCodeExporter commented 9 years ago
I was actually thinking about this, and perhaps the best thing to do for 
ContextMenus
is to position the menu list at the spot where the mouse click occured. Does 
this
make sense ?

The MouseOpenEvent should also have a few additional properties including
* The element that the click occured upon.
* The (absolute) mouse coordinates of the click

Comments ?

Original comment by miroslav...@gmail.com on 1 Jan 2008 at 9:59

GoogleCodeExporter commented 9 years ago
That would make much more sense, since that was the original problem that I 
have had. 

Original comment by ali.scis...@gmail.com on 2 Jan 2008 at 12:30

GoogleCodeExporter commented 9 years ago
Changes have been made to the ContextMenu class to support what i think you were
attempting to do.
* ContextMenu menu lists open at the spot where the user right mouse clicks.
* A ContextMenuOpenEvent is now fired to ContextMenu menu listeners and includes
details of the element and widget that was originally right mouse clicked.

The Mouse demo has also been updated to show this in action.

Original comment by miroslav...@gmail.com on 2 Jan 2008 at 6:21

GoogleCodeExporter commented 9 years ago

Original comment by miroslav...@gmail.com on 2 Jan 2008 at 10:38