本文整理汇总了Java中javax.swing.event.MenuDragMouseListener类的典型用法代码示例。如果您正苦于以下问题:Java MenuDragMouseListener类的具体用法?Java MenuDragMouseListener怎么用?Java MenuDragMouseListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MenuDragMouseListener类属于javax.swing.event包,在下文中一共展示了MenuDragMouseListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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);
}
});
}
示例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);
}
});
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例8: addMenuDragMouseListener
import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
public void addMenuDragMouseListener(MenuDragMouseListener l) {
}
示例9: removeMenuDragMouseListener
import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
public void removeMenuDragMouseListener(MenuDragMouseListener l) {
}
示例10: getMenuDragMouseListeners
import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
public MenuDragMouseListener[] getMenuDragMouseListeners() {
return list.getListeners(MenuDragMouseListener.class);
}
示例11: createMenuDragMouseListener
import javax.swing.event.MenuDragMouseListener; //导入依赖的package包/类
protected MenuDragMouseListener createMenuDragMouseListener(JComponent c){
return new MyMenuDragMouseHandler();
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}