use of com.sencha.gxt.core.client.util.Point in project activityinfo by bedatadriven.
the class LogicalTabPanel method onRightClick.
@Override
protected void onRightClick(Event event) {
Element target = event.getEventTarget().cast();
if (appearance.getBar(getElement()).isOrHasChild(target)) {
Element item = findItem(event.getEventTarget().<Element>cast());
if (item != null) {
int idx = itemIndex(item);
if (idx != -1) {
event.preventDefault();
event.stopPropagation();
Point point = event.<XEvent>cast().getXY();
final M w = getModel(idx);
final int x = point.getX();
final int y = point.getY();
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
onItemContextMenu(w, x, y);
}
});
}
}
} else {
super.onRightClick(event);
}
}
Aggregations