javax.swing.JTabbedPane.getMouseListeners()方法的使用及代码示例

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

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

JTabbedPane.getMouseListeners介绍

暂无

代码示例

代码示例来源:origin: com.jtattoo/JTattoo

public void mouseClicked(MouseEvent e) {
  if (scrollableTabLayoutEnabled()) {
    MouseListener[] ml = tabPane.getMouseListeners();
    for (int i = 0; i < ml.length; i++) {
      ml[i].mouseClicked(e);
    }
  }
}

代码示例来源:origin: com.jtattoo/JTattoo

public void mouseReleased(MouseEvent e) {
  if (scrollableTabLayoutEnabled()) {
    MouseListener[] ml = tabPane.getMouseListeners();
    for (int i = 0; i < ml.length; i++) {
      ml[i].mouseReleased(e);
    }
  }
}

代码示例来源:origin: com.jtattoo/JTattoo

public void mouseEntered(MouseEvent e) {
  if (scrollableTabLayoutEnabled()) {
    MouseListener[] ml = tabPane.getMouseListeners();
    for (int i = 0; i < ml.length; i++) {
      ml[i].mouseEntered(e);
    }
  }
}

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

e.getClickCount(), e.isPopupTrigger(),
    e.getButton());                             
jTabbedPane.getMouseListeners()[0].mousePressed(me);
System.out.println("tabComponent mousePressed e="+e);

代码示例来源:origin: com.jtattoo/JTattoo

public void mousePressed(MouseEvent e) {
  if (scrollableTabLayoutEnabled()) {
    MouseListener[] ml = tabPane.getMouseListeners();
    for (int i = 0; i < ml.length; i++) {
      ml[i].mousePressed(e);
    }
  }
  if (!tabPane.isEnabled()) {
    return;
  }
  int tabIndex = getTabAtLocation(e.getX(), e.getY());
  if (tabIndex >= 0 && tabPane.isEnabledAt(tabIndex)) {
    if (tabIndex == tabPane.getSelectedIndex()) {
      if (tabPane.isRequestFocusEnabled()) {
        tabPane.requestFocus();
        tabPane.repaint(getTabBounds(tabPane, tabIndex));
      }
    } else {
      tabPane.setSelectedIndex(tabIndex);
    }
  }
}

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

tabs.removeMouseListener((tabs.getMouseListeners())[0]);
tabs = null;

代码示例来源:origin: com.jtattoo/JTattoo

public void mouseExited(MouseEvent e) {
    if (scrollableTabLayoutEnabled()) {
      MouseListener[] ml = tabPane.getMouseListeners();
      for (int i = 0; i < ml.length; i++) {
        ml[i].mouseExited(e);
      }
    }
    rolloverIndex = -1;
    if (rolloverIndex != oldRolloverIndex) {
      if ((oldRolloverIndex >= 0) && (oldRolloverIndex < tabPane.getTabCount())) {
        tabPane.repaint(getTabBounds(tabPane, oldRolloverIndex));
      }
      if ((rolloverIndex >= 0) && (rolloverIndex < tabPane.getTabCount())) {
        tabPane.repaint(getTabBounds(tabPane, rolloverIndex));
      }
      oldRolloverIndex = rolloverIndex;
    }
  }
}

相关文章

JTabbedPane类方法