当前位置: 首页>>代码示例>>Java>>正文


Java MouseTrackListener类代码示例

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


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

示例1: addSWTListener

import org.eclipse.swt.events.MouseTrackListener; //导入依赖的package包/类
/**
     * Hook an SWT listener on the canvas where the chart is drawn.
     * The purpose of this method is to allow some degree of customization.
     *
     * @param listener The SWT listener to attach to the canvas.
     */
    public void addSWTListener(EventListener listener) {
        if (listener instanceof ControlListener) {
            this.canvas.addControlListener((ControlListener) listener);
        }
        else if (listener instanceof DisposeListener) {
            this.canvas.addDisposeListener((DisposeListener) listener);
//      }
//      else if (listener instanceof DragDetectListener) {
//          this.canvas.addDragDetectListener((DragDetectListener) listener);
        }
        else if (listener instanceof FocusListener) {
            this.canvas.addFocusListener((FocusListener) listener);
        }
        else if (listener instanceof HelpListener) {
            this.canvas.addHelpListener((HelpListener) listener);
        }
        else if (listener instanceof KeyListener) {
            this.canvas.addKeyListener((KeyListener) listener);
//      }
//      else if (listener instanceof MenuDetectListener) {
//          this.canvas.addMenuDetectListener((MenuDetectListener) listener);
        }
        else if (listener instanceof MouseListener) {
            this.canvas.addMouseListener((MouseListener) listener);
        }
        else if (listener instanceof MouseMoveListener) {
            this.canvas.addMouseMoveListener((MouseMoveListener) listener);
        }
        else if (listener instanceof MouseTrackListener) {
            this.canvas.addMouseTrackListener((MouseTrackListener) listener);
//      } else if (listener instanceof MouseWheelListener) {
//          this.canvas.addMouseWheelListener((MouseWheelListener) listener);
        }
        else if (listener instanceof PaintListener) {
            this.canvas.addPaintListener((PaintListener) listener);
        }
        else if (listener instanceof TraverseListener) {
            this.canvas.addTraverseListener((TraverseListener) listener);
        }
    }
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:47,代码来源:ChartComposite.java

示例2: addSWTListener

import org.eclipse.swt.events.MouseTrackListener; //导入依赖的package包/类
/**
 * Hook an SWT listener on the canvas where the chart is drawn.
 * The purpose of this method is to allow some degree of customization.
 *
 * @param listener The SWT listener to attach to the canvas.
 */
public void addSWTListener(EventListener listener) {
    if (listener instanceof ControlListener) {
        this.canvas.addControlListener((ControlListener) listener);
    }
    else if (listener instanceof DisposeListener) {
        this.canvas.addDisposeListener((DisposeListener) listener);
    }
    else if (listener instanceof DragDetectListener) {
        this.canvas.addDragDetectListener((DragDetectListener) listener);
    }
    else if (listener instanceof FocusListener) {
        this.canvas.addFocusListener((FocusListener) listener);
    }
    else if (listener instanceof HelpListener) {
        this.canvas.addHelpListener((HelpListener) listener);
    }
    else if (listener instanceof KeyListener) {
        this.canvas.addKeyListener((KeyListener) listener);
    }
    else if (listener instanceof MenuDetectListener) {
        this.canvas.addMenuDetectListener((MenuDetectListener) listener);
    }
    else if (listener instanceof MouseListener) {
        this.canvas.addMouseListener((MouseListener) listener);
    }
    else if (listener instanceof MouseMoveListener) {
        this.canvas.addMouseMoveListener((MouseMoveListener) listener);
    }
    else if (listener instanceof MouseTrackListener) {
        this.canvas.addMouseTrackListener((MouseTrackListener) listener);
    }
    else if (listener instanceof MouseWheelListener) {
        this.canvas.addMouseWheelListener((MouseWheelListener) listener);
    }
    else if (listener instanceof PaintListener) {
        this.canvas.addPaintListener((PaintListener) listener);
    }
    else if (listener instanceof TraverseListener) {
        this.canvas.addTraverseListener((TraverseListener) listener);
    }
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:48,代码来源:ChartComposite.java

示例3: addMouseTrackListener

import org.eclipse.swt.events.MouseTrackListener; //导入依赖的package包/类
public void addMouseTrackListener(MouseTrackListener listener){
	this.text.addMouseTrackListener(listener);
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:4,代码来源:AbstractBrowseText.java

示例4: removeMouseTrackListener

import org.eclipse.swt.events.MouseTrackListener; //导入依赖的package包/类
public void removeMouseTrackListener(MouseTrackListener listener){
	this.text.removeMouseTrackListener(listener);
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:4,代码来源:AbstractBrowseText.java

示例5: addMouseTrackListener

import org.eclipse.swt.events.MouseTrackListener; //导入依赖的package包/类
/**
 * Adds the listener to the collection of listeners who will be notified
 * when the mouse passes or hovers over controls, by sending it one of the
 * messages defined in the <code>MouseTrackListener</code> interface.
 * 
 * @param listener
 *            the listener which should be notified
 * 
 * @exception IllegalArgumentException
 *                <ul>
 *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
 *                </ul>
 * @exception SWTException
 *                <ul>
 *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been
 *                disposed</li>
 *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
 *                thread that created the receiver</li>
 *                </ul>
 * 
 * @see MouseTrackListener
 * @see #removeMouseTrackListener
 */
public void addMouseTrackListener(MouseTrackListener listener) {
	checkWidget();
	if (listener == null)
		error(SWT.ERROR_NULL_ARGUMENT);
	TypedListener typedListener = new TypedListener(listener);
	addListener(SWT.MouseEnter, typedListener);
	addListener(SWT.MouseExit, typedListener);
	addListener(SWT.MouseHover, typedListener);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:33,代码来源:Control.java

示例6: removeMouseTrackListener

import org.eclipse.swt.events.MouseTrackListener; //导入依赖的package包/类
/**
 * Removes the listener from the collection of listeners who will be
 * notified when the mouse passes or hovers over controls.
 * 
 * @param listener
 *            the listener which should no longer be notified
 * 
 * @exception IllegalArgumentException
 *                <ul>
 *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
 *                </ul>
 * @exception SWTException
 *                <ul>
 *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been
 *                disposed</li>
 *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
 *                thread that created the receiver</li>
 *                </ul>
 * 
 * @see MouseTrackListener
 * @see #addMouseTrackListener
 */
public void removeMouseTrackListener(MouseTrackListener listener) {
	checkWidget();
	if (listener == null)
		error(SWT.ERROR_NULL_ARGUMENT);
	if (eventTable == null)
		return;
	eventTable.unhook(SWT.MouseEnter, listener);
	eventTable.unhook(SWT.MouseExit, listener);
	eventTable.unhook(SWT.MouseHover, listener);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:33,代码来源:Control.java

示例7: addMouseTrackListener

import org.eclipse.swt.events.MouseTrackListener; //导入依赖的package包/类
public void addMouseTrackListener(MouseTrackListener listener) {
	
	tree.addMouseTrackListener(listener);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:5,代码来源:TreeWrapper.java

示例8: removeMouseTrackListener

import org.eclipse.swt.events.MouseTrackListener; //导入依赖的package包/类
public void removeMouseTrackListener(MouseTrackListener listener) {
	
	tree.removeMouseTrackListener(listener);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:5,代码来源:TreeWrapper.java


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