java类com.google.gwt.event.dom.client.ContextMenuHandler的实例源码

VOpenLayersMap.java 文件源码 项目:ExpressZip 阅读 18 收藏 0 点赞 0 评论 0
/**
 * The constructor should first call super() to initialize the component and
 * then handle any initialization relevant to Vaadin.
 */
public VOpenLayersMap() {
    setWidth("500px");
    setHeight("500px");
    add(map);
    add(fakePaintables);
    fakePaintables.setVisible(false);

    // This method call of the Paintable interface sets the component
    // style name in DOM tree
    setStyleName(CLASSNAME);

    sinkEvents(Event.ONCONTEXTMENU);
    addDomHandler(new ContextMenuHandler() {
        public void onContextMenu(ContextMenuEvent event) {
            handleBodyContextMenu(event);
        }
    }, ContextMenuEvent.getType());
}
ModelGrid.java 文件源码 项目:platypus-js 阅读 28 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
ScrollPane.java 文件源码 项目:platypus-js 阅读 29 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
PlatypusDateField.java 文件源码 项目:platypus-js 阅读 24 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
MarginsPane.java 文件源码 项目:platypus-js 阅读 21 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
PlatypusSlider.java 文件源码 项目:platypus-js 阅读 19 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
ToolBar.java 文件源码 项目:platypus-js 阅读 29 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
PlatypusLabel.java 文件源码 项目:platypus-js 阅读 25 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
PlatypusRadioButton.java 文件源码 项目:platypus-js 阅读 26 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
PlatypusToggleButton.java 文件源码 项目:platypus-js 阅读 17 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
CardPane.java 文件源码 项目:platypus-js 阅读 20 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
SplitPane.java 文件源码 项目:platypus-js 阅读 24 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
PlatypusSpinnerField.java 文件源码 项目:platypus-js 阅读 23 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
PlatypusPasswordField.java 文件源码 项目:platypus-js 阅读 21 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
PlatypusProgressBar.java 文件源码 项目:platypus-js 阅读 17 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
TabbedPane.java 文件源码 项目:platypus-js 阅读 19 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
BorderPane.java 文件源码 项目:platypus-js 阅读 22 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
GridPane.java 文件源码 项目:platypus-js 阅读 17 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
PlatypusButton.java 文件源码 项目:platypus-js 阅读 21 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
PlatypusFormattedTextField.java 文件源码 项目:platypus-js 阅读 21 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
FlowPane.java 文件源码 项目:platypus-js 阅读 18 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
PlatypusCheckBox.java 文件源码 项目:platypus-js 阅读 19 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
PlatypusSplitButton.java 文件源码 项目:platypus-js 阅读 22 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (contextMenu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        contextMenu = aMenu;
        if (contextMenu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    contextMenu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    contextMenu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
DesktopPane.java 文件源码 项目:platypus-js 阅读 21 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
PlatypusHtmlEditor.java 文件源码 项目:platypus-js 阅读 27 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
PlatypusTextArea.java 文件源码 项目:platypus-js 阅读 18 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
PlatypusTextField.java 文件源码 项目:platypus-js 阅读 21 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
BoxPane.java 文件源码 项目:platypus-js 阅读 22 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
PlatypusComboBox.java 文件源码 项目:platypus-js 阅读 17 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}
ModelDecoratorBox.java 文件源码 项目:platypus-js 阅读 22 收藏 0 点赞 0 评论 0
@Override
public void setPlatypusPopupMenu(PlatypusPopupMenu aMenu) {
    if (menu != aMenu) {
        if (menuTriggerReg != null)
            menuTriggerReg.removeHandler();
        menu = aMenu;
        if (menu != null) {
            menuTriggerReg = super.addDomHandler(new ContextMenuHandler() {

                @Override
                public void onContextMenu(ContextMenuEvent event) {
                    event.preventDefault();
                    event.stopPropagation();
                    menu.setPopupPosition(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
                    menu.show();
                }
            }, ContextMenuEvent.getType());
        }
    }
}


问题


面经


文章

微信
公众号

扫码关注公众号