Java 类javax.swing.event.MenuDragMouseListener 实例源码
项目:cn1
文件:JMenuItemTest.java
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);
}
项目:freeVM
文件:JMenuItemTest.java
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);
}
项目:freeVM
文件:JMenuItemTest.java
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);
}
项目:openjdk-jdk10
文件:JMenuItemOperator.java
/**
* 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);
}
});
}
项目:openjdk-jdk10
文件:JMenuItemOperator.java
/**
* 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);
}
});
}
项目:openjdk9
文件:JMenuItemOperator.java
/**
* 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);
}
});
}
项目:openjdk9
文件:JMenuItemOperator.java
/**
* 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);
}
});
}
项目:javify
文件:JMenuItem.java
/**
* 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);
}
项目:javify
文件:JMenuItem.java
/**
* 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);
}
项目:javify
文件:JMenuItem.java
/**
* 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);
}
项目:javify
文件:JMenuItem.java
/**
* 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);
}
项目:jvm-stm
文件:JMenuItem.java
/**
* 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);
}
项目:jvm-stm
文件:JMenuItem.java
/**
* 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);
}
项目:jvm-stm
文件:JMenuItem.java
/**
* 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);
}
项目:jvm-stm
文件:JMenuItem.java
/**
* 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);
}
项目:JamVM-PH
文件:JMenuItem.java
/**
* 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);
}
项目:JamVM-PH
文件:JMenuItem.java
/**
* 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);
}
项目:JamVM-PH
文件:JMenuItem.java
/**
* 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);
}
项目:JamVM-PH
文件:JMenuItem.java
/**
* 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);
}
项目:classpath
文件:JMenuItem.java
/**
* 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);
}
项目:classpath
文件:JMenuItem.java
/**
* 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);
}
项目:classpath
文件:JMenuItem.java
/**
* 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);
}
项目:classpath
文件:JMenuItem.java
/**
* 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);
}
项目:j2se_for_android
文件:JMenuItem.java
public void addMenuDragMouseListener(MenuDragMouseListener l) {
}
项目:j2se_for_android
文件:JMenuItem.java
public void removeMenuDragMouseListener(MenuDragMouseListener l) {
}
项目:j2se_for_android
文件:JMenuItem.java
public MenuDragMouseListener[] getMenuDragMouseListeners() {
return list.getListeners(MenuDragMouseListener.class);
}
项目:intellij-ce-playground
文件:BegMenuItemUI.java
protected MenuDragMouseListener createMenuDragMouseListener(JComponent c){
return new MyMenuDragMouseHandler();
}
项目:cn1
文件:JMenuItem.java
protected void fireMenuDragMouseEntered(final MenuDragMouseEvent event) {
final MenuDragMouseListener[] listeners = getMenuDragMouseListeners();
for (int i = 0; i < listeners.length; i++) {
listeners[i].menuDragMouseEntered(event);
}
}
项目:cn1
文件:JMenuItem.java
protected void fireMenuDragMouseExited(final MenuDragMouseEvent event) {
final MenuDragMouseListener[] listeners = getMenuDragMouseListeners();
for (int i = 0; i < listeners.length; i++) {
listeners[i].menuDragMouseExited(event);
}
}
项目:cn1
文件:JMenuItem.java
protected void fireMenuDragMouseDragged(final MenuDragMouseEvent event) {
final MenuDragMouseListener[] listeners = getMenuDragMouseListeners();
for (int i = 0; i < listeners.length; i++) {
listeners[i].menuDragMouseDragged(event);
}
}
项目:cn1
文件:JMenuItem.java
protected void fireMenuDragMouseReleased(final MenuDragMouseEvent event) {
final MenuDragMouseListener[] listeners = getMenuDragMouseListeners();
for (int i = 0; i < listeners.length; i++) {
listeners[i].menuDragMouseReleased(event);
}
}
项目:cn1
文件:JMenuItem.java
public void addMenuDragMouseListener(final MenuDragMouseListener listener) {
listenerList.add(MenuDragMouseListener.class, listener);
}
项目:cn1
文件:JMenuItem.java
public void removeMenuDragMouseListener(final MenuDragMouseListener listener) {
listenerList.remove(MenuDragMouseListener.class, listener);
}
项目:cn1
文件:JMenuItem.java
public MenuDragMouseListener[] getMenuDragMouseListeners() {
return (MenuDragMouseListener[])getListeners(MenuDragMouseListener.class);
}
项目:cn1
文件:BasicMenuItemUI.java
protected MenuDragMouseListener createMenuDragMouseListener(final JComponent c) {
return (menuItemHandler != null) ? menuItemHandler : (menuItemHandler = new MenuItemHandler());
}
项目:tools-idea
文件:BegMenuItemUI.java
protected MenuDragMouseListener createMenuDragMouseListener(JComponent c){
return new MyMenuDragMouseHandler();
}
项目:freeVM
文件:JMenuItem.java
protected void fireMenuDragMouseEntered(final MenuDragMouseEvent event) {
final MenuDragMouseListener[] listeners = getMenuDragMouseListeners();
for (int i = 0; i < listeners.length; i++) {
listeners[i].menuDragMouseEntered(event);
}
}
项目:freeVM
文件:JMenuItem.java
protected void fireMenuDragMouseExited(final MenuDragMouseEvent event) {
final MenuDragMouseListener[] listeners = getMenuDragMouseListeners();
for (int i = 0; i < listeners.length; i++) {
listeners[i].menuDragMouseExited(event);
}
}
项目:freeVM
文件:JMenuItem.java
protected void fireMenuDragMouseDragged(final MenuDragMouseEvent event) {
final MenuDragMouseListener[] listeners = getMenuDragMouseListeners();
for (int i = 0; i < listeners.length; i++) {
listeners[i].menuDragMouseDragged(event);
}
}
项目:freeVM
文件:JMenuItem.java
protected void fireMenuDragMouseReleased(final MenuDragMouseEvent event) {
final MenuDragMouseListener[] listeners = getMenuDragMouseListeners();
for (int i = 0; i < listeners.length; i++) {
listeners[i].menuDragMouseReleased(event);
}
}