當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。