當前位置: 首頁>>代碼示例>>Java>>正文


Java JComponent.removeMouseListener方法代碼示例

本文整理匯總了Java中javax.swing.JComponent.removeMouseListener方法的典型用法代碼示例。如果您正苦於以下問題:Java JComponent.removeMouseListener方法的具體用法?Java JComponent.removeMouseListener怎麽用?Java JComponent.removeMouseListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.swing.JComponent的用法示例。


在下文中一共展示了JComponent.removeMouseListener方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: registerComponent

import javax.swing.JComponent; //導入方法依賴的package包/類
/**
    * Registers a component for tooltip management.
    * <p>
    * This will register key bindings to show and hide the tooltip text
    * only if <code>component</code> has focus bindings. This is done
    * so that components that are not normally focus traversable, such
    * as <code>JLabel</code>, are not made focus traversable as a result
    * of invoking this method.
    *
    * @param component  a <code>JComponent</code> object to add
    * @see JComponent#isFocusTraversable
    */
   protected void registerComponent(JComponent component) {
       component.removeMouseListener(this);
       component.addMouseListener(this);
       component.removeMouseMotionListener(moveBeforeEnterListener);
component.addMouseMotionListener(moveBeforeEnterListener);

if (shouldRegisterBindings(component)) {
    // register our accessibility keybindings for this component
    // this will apply globally across L&F
    // Post Tip: Ctrl+F1
    // Unpost Tip: Esc and Ctrl+F1
    InputMap inputMap = component.getInputMap(JComponent.WHEN_FOCUSED);
    ActionMap actionMap = component.getActionMap();

    if (inputMap != null && actionMap != null) {
               //XXX remove
    }
}
   }
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:32,代碼來源:ToolTipManagerEx.java

示例2: unregisterComponent

import javax.swing.JComponent; //導入方法依賴的package包/類
/**
    * Removes a component from tooltip control.
    *
    * @param component  a <code>JComponent</code> object to remove
    */
   protected void unregisterComponent(JComponent component) {
       component.removeMouseListener(this);
component.removeMouseMotionListener(moveBeforeEnterListener);

if (shouldRegisterBindings(component)) {
    InputMap inputMap = component.getInputMap(JComponent.WHEN_FOCUSED);
    ActionMap actionMap = component.getActionMap();

    if (inputMap != null && actionMap != null) {
               //XXX remove
    }
}
   }
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:19,代碼來源:ToolTipManagerEx.java

示例3: removeItem

import javax.swing.JComponent; //導入方法依賴的package包/類
public void removeItem(JComponent c) {
    if (toolbar != null) {
        toolbar.remove(c);
    } else {
        if (c instanceof AbstractButton) {
            c.removeMouseListener(listener);
            ((AbstractButton) c).removeChangeListener(listener);
            c.removeFocusListener(listener);
        }
        remove(c);
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:13,代碼來源:TransparentToolBar.java

示例4: uninstallUI

import javax.swing.JComponent; //導入方法依賴的package包/類
@Override
public void uninstallUI(JComponent c)
{
	super.uninstallUI(c);
	c.removeMouseListener(this);
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:7,代碼來源:FlatterCheckBoxUI.java

示例5: uninstallFromComponent

import javax.swing.JComponent; //導入方法依賴的package包/類
public static void uninstallFromComponent(JComponent c) {
	if (c instanceof JTextField && !(c instanceof JPasswordField)) {
		c.removeMouseListener(getSharedInstance());
	}
}
 
開發者ID:jonasxiao,項目名稱:FinalSpeed,代碼行數:6,代碼來源:TextComponentPopupMenu.java


注:本文中的javax.swing.JComponent.removeMouseListener方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。