• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java MenuDragMouseListener类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中javax.swing.event.MenuDragMouseListener的典型用法代码示例。如果您正苦于以下问题:Java MenuDragMouseListener类的具体用法?Java MenuDragMouseListener怎么用?Java MenuDragMouseListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MenuDragMouseListener类属于javax.swing.event包,在下文中一共展示了MenuDragMouseListener类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testAddGetRemoveMenuDragMouseListener

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
public void testAddGetRemoveMenuDragMouseListener() {
    MenuDragMouseListener listener1 = new ConcreteMenuDragMouseListener();
    MenuDragMouseListener listener2 = new ConcreteMenuDragMouseListener();
    MenuDragMouseListener listener3 = new ConcreteMenuDragMouseListener();
    EventListener[] listenersArray = null;
    listenersArray = menuItem.getMenuDragMouseListeners();
    int initialValue = listenersArray.length;
    menuItem.addMenuDragMouseListener(listener1);
    menuItem.addMenuDragMouseListener(listener2);
    menuItem.addMenuDragMouseListener(listener2);
    listenersArray = menuItem.getMenuDragMouseListeners();
    assertEquals(initialValue + 3, listenersArray.length);
    menuItem.removeMenuDragMouseListener(listener1);
    menuItem.addMenuDragMouseListener(listener3);
    menuItem.addMenuDragMouseListener(listener3);
    listenersArray = menuItem.getMenuDragMouseListeners();
    assertEquals(initialValue + 4, listenersArray.length);
    menuItem.removeMenuDragMouseListener(listener3);
    menuItem.removeMenuDragMouseListener(listener3);
    listenersArray = menuItem.getMenuDragMouseListeners();
    assertEquals(initialValue + 2, listenersArray.length);
    menuItem.removeMenuDragMouseListener(listener2);
    menuItem.removeMenuDragMouseListener(listener2);
    listenersArray = menuItem.getMenuDragMouseListeners();
    assertEquals(initialValue, listenersArray.length);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:27,代码来源:JMenuItemTest.java


示例2: addMenuDragMouseListener

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
/**
 * Maps
 * {@code JMenuItem.addMenuDragMouseListener(MenuDragMouseListener)}
 * through queue
 */
public void addMenuDragMouseListener(final MenuDragMouseListener menuDragMouseListener) {
    runMapping(new MapVoidAction("addMenuDragMouseListener") {
        @Override
        public void map() {
            ((JMenuItem) getSource()).addMenuDragMouseListener(menuDragMouseListener);
        }
    });
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:JMenuItemOperator.java


示例3: removeMenuDragMouseListener

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
/**
 * Maps
 * {@code JMenuItem.removeMenuDragMouseListener(MenuDragMouseListener)}
 * through queue
 */
public void removeMenuDragMouseListener(final MenuDragMouseListener menuDragMouseListener) {
    runMapping(new MapVoidAction("removeMenuDragMouseListener") {
        @Override
        public void map() {
            ((JMenuItem) getSource()).removeMenuDragMouseListener(menuDragMouseListener);
        }
    });
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:JMenuItemOperator.java


示例4: fireMenuDragMouseEntered

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
/**
 * Fires MenuDragMouseEvent to all of the menuItem's MouseInputListeners.
 *
 * @param event The event signifying that mouse entered menuItem while it was dragged
 */
protected void fireMenuDragMouseEntered(MenuDragMouseEvent event)
{
  EventListener[] ll = listenerList.getListeners(MenuDragMouseListener.class);

  for (int i = 0; i < ll.length; i++)
    ((MenuDragMouseListener) ll[i]).menuDragMouseEntered(event);
}
 
开发者ID:vilie,项目名称:javify,代码行数:13,代码来源:JMenuItem.java


示例5: fireMenuDragMouseExited

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
/**
 * Fires MenuDragMouseEvent to all of the menuItem's MouseInputListeners.
 *
 * @param event The event signifying that mouse has exited menu item, while it was dragged
 */
protected void fireMenuDragMouseExited(MenuDragMouseEvent event)
{
  EventListener[] ll = listenerList.getListeners(MenuDragMouseListener.class);

  for (int i = 0; i < ll.length; i++)
    ((MenuDragMouseListener) ll[i]).menuDragMouseExited(event);
}
 
开发者ID:vilie,项目名称:javify,代码行数:13,代码来源:JMenuItem.java


示例6: fireMenuDragMouseDragged

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
/**
 * Fires MenuDragMouseEvent to all of the menuItem's MouseInputListeners.
 *
 * @param event The event signifying that mouse is being dragged over the menuItem
 */
protected void fireMenuDragMouseDragged(MenuDragMouseEvent event)
{
  EventListener[] ll = listenerList.getListeners(MenuDragMouseListener.class);

  for (int i = 0; i < ll.length; i++)
    ((MenuDragMouseListener) ll[i]).menuDragMouseDragged(event);
}
 
开发者ID:vilie,项目名称:javify,代码行数:13,代码来源:JMenuItem.java


示例7: fireMenuDragMouseReleased

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
/**
 * This method fires a MenuDragMouseEvent to all the MenuItem's MouseInputListeners.
 *
 * @param event The event signifying that mouse was released while it was dragged over the menuItem
 */
protected void fireMenuDragMouseReleased(MenuDragMouseEvent event)
{
  EventListener[] ll = listenerList.getListeners(MenuDragMouseListener.class);

  for (int i = 0; i < ll.length; i++)
    ((MenuDragMouseListener) ll[i]).menuDragMouseReleased(event);
}
 
开发者ID:vilie,项目名称:javify,代码行数:13,代码来源:JMenuItem.java


示例8: addMenuDragMouseListener

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
public void addMenuDragMouseListener(MenuDragMouseListener l) {
}
 
开发者ID:javalovercn,项目名称:j2se_for_android,代码行数:3,代码来源:JMenuItem.java


示例9: removeMenuDragMouseListener

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
public void removeMenuDragMouseListener(MenuDragMouseListener l) {
}
 
开发者ID:javalovercn,项目名称:j2se_for_android,代码行数:3,代码来源:JMenuItem.java


示例10: getMenuDragMouseListeners

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
public MenuDragMouseListener[] getMenuDragMouseListeners() {
	return list.getListeners(MenuDragMouseListener.class);
}
 
开发者ID:javalovercn,项目名称:j2se_for_android,代码行数:4,代码来源:JMenuItem.java


示例11: createMenuDragMouseListener

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
protected MenuDragMouseListener createMenuDragMouseListener(JComponent c){
  return new MyMenuDragMouseHandler();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:BegMenuItemUI.java


示例12: fireMenuDragMouseEntered

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
protected void fireMenuDragMouseEntered(final MenuDragMouseEvent event) {
    final MenuDragMouseListener[] listeners = getMenuDragMouseListeners();
    for (int i = 0; i < listeners.length; i++) {
        listeners[i].menuDragMouseEntered(event);
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:7,代码来源:JMenuItem.java


示例13: fireMenuDragMouseExited

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
protected void fireMenuDragMouseExited(final MenuDragMouseEvent event) {
    final MenuDragMouseListener[] listeners = getMenuDragMouseListeners();
    for (int i = 0; i < listeners.length; i++) {
        listeners[i].menuDragMouseExited(event);
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:7,代码来源:JMenuItem.java


示例14: fireMenuDragMouseDragged

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
protected void fireMenuDragMouseDragged(final MenuDragMouseEvent event) {
    final MenuDragMouseListener[] listeners = getMenuDragMouseListeners();
    for (int i = 0; i < listeners.length; i++) {
        listeners[i].menuDragMouseDragged(event);
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:7,代码来源:JMenuItem.java


示例15: fireMenuDragMouseReleased

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
protected void fireMenuDragMouseReleased(final MenuDragMouseEvent event) {
    final MenuDragMouseListener[] listeners = getMenuDragMouseListeners();
    for (int i = 0; i < listeners.length; i++) {
        listeners[i].menuDragMouseReleased(event);
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:7,代码来源:JMenuItem.java


示例16: addMenuDragMouseListener

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
public void addMenuDragMouseListener(final MenuDragMouseListener listener) {
    listenerList.add(MenuDragMouseListener.class, listener);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:4,代码来源:JMenuItem.java


示例17: removeMenuDragMouseListener

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
public void removeMenuDragMouseListener(final MenuDragMouseListener listener) {
    listenerList.remove(MenuDragMouseListener.class, listener);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:4,代码来源:JMenuItem.java


示例18: getMenuDragMouseListeners

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
public MenuDragMouseListener[] getMenuDragMouseListeners() {
    return (MenuDragMouseListener[])getListeners(MenuDragMouseListener.class);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:4,代码来源:JMenuItem.java


示例19: createMenuDragMouseListener

import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
protected MenuDragMouseListener createMenuDragMouseListener(final JComponent c) {
    return (menuItemHandler != null) ? menuItemHandler : (menuItemHandler = new MenuItemHandler());
}
 
开发者ID:shannah,项目名称:cn1,代码行数:4,代码来源:BasicMenuItemUI.java



注:本文中的javax.swing.event.MenuDragMouseListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Main类代码示例发布时间:2022-05-21
下一篇:
Java Cursor类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap