javax.swing.JPopupMenu.isPopupTrigger()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(91)

本文整理了Java中javax.swing.JPopupMenu.isPopupTrigger()方法的一些代码示例,展示了JPopupMenu.isPopupTrigger()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPopupMenu.isPopupTrigger()方法的具体详情如下:
包路径:javax.swing.JPopupMenu
类名称:JPopupMenu
方法名:isPopupTrigger

JPopupMenu.isPopupTrigger介绍

暂无

代码示例

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

public void mousePressed(MouseEvent event){
if(popup.isPopupTrigger(event)){
 popup.show(event.getComponent(), event.getX(),event.getY());
}
}
public void mouseReleased(MouseEvent event){

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

public void mouseReleased(MouseEvent event){
 if(popup.isPopupTrigger(event)){
  popup.show(event.getComponent(), event.getX(),event.getY());
 }
 }
});

代码示例来源:origin: realXuJiang/bigtable-sql

public void mousePressed(MouseEvent event){
if(popup.isPopupTrigger(event)){
 popup.show(event.getComponent(), event.getX(),event.getY());
}
}
public void mouseReleased(MouseEvent event){

代码示例来源:origin: realXuJiang/bigtable-sql

public void mouseReleased(MouseEvent event){
 if(popup.isPopupTrigger(event)){
  popup.show(event.getComponent(), event.getX(),event.getY());
 }
 }
});

代码示例来源:origin: sc.fiji/3D_Viewer

public void showPopup(final MouseEvent e) {
  content = univ.getPicker().getPickedContent(e.getX(), e.getY());
  if (content == null) return;
  univ.select(content);
  shaded.setState(content.isShaded());
  saturated.setState(content.isSaturatedVolumeRendering());
  if (popup.isPopupTrigger(e)) popup.show(e.getComponent(), e.getX(), e
    .getY());
}

代码示例来源:origin: blurpy/kouchat

/**
 * Handles mouse released events on the user list.
 *
 * <p>Decides which menu items to show on right click on a user,
 * and opens a private chat with the selected user on double click.</p>
 *
 * {@inheritDoc}
 */
@Override
public void mouseReleased(final MouseEvent e) {
  if (e.getSource() == userL) {
    // Right click
    if (userMenu.isPopupTrigger(e) && userL.getSelectedIndex() != -1) {
      showRightClickMenu(e);
    }
    // Double left click
    else if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2 && userL.getSelectedIndex() != -1) {
      final User user = userListModel.getElementAt(userL.getSelectedIndex()); // TODO getUser() instead?
      if (user != me && canPrivateChatWithUser(user)) {
        mediator.showPrivChat(user);
      }
    }
  }
}

代码示例来源:origin: blurpy/kouchat

if (e.getSource() == userL) {
  if (userMenu.isPopupTrigger(e) && userL.getSelectedIndex() != -1) {
    showRightClickMenu(e);

代码示例来源:origin: stackoverflow.com

if (popup.isPopupTrigger(mouseEvent)) {
  popup.show(mouseEvent.getComponent(), mouseEvent.getX(),
      mouseEvent.getY());

相关文章

JPopupMenu类方法