⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mouselistenercontrol.java

📁 FMJ(freedom media for java)是java视频开发的新选择
💻 JAVA
字号:
package net.sf.fmj.ejmf.toolkit.gui.controls;import java.awt.event.MouseListener;import java.util.EventListener;import javax.media.Controller;import javax.swing.AbstractButton;/**  * All button which require a mouse listener extend MouseListenerControl.  * Such buttons, for example,  need to recognize mousePressed and   * mouseReleased as different events.  *  * MouseListenerControl supplies public methods for manipulating  * a control's EventListener as an MouseListener thereby providing  * type-safety at runtime.  */public abstract class MouseListenerControl extends AbstractListenerControl {	/** Create a MouseListenerControl and associate it	* with a Controller.	* @param controller A Controller with which control	* is to be associated.	*/    protected MouseListenerControl(Skin skin, Controller controller)  {	super(skin, controller);    }	/** Create a MouseListenerControl	*/    protected MouseListenerControl(Skin skin)  {    	super(skin);    }	/**		* Add control semantics to this Control.	* <p>		* @param listener java.util.EventListener representing 	* 		control semantics to be added.	*/    protected void addControlListener(EventListener  listener) {        ((AbstractButton) getControlComponent()).addMouseListener(		(MouseListener) listener);    }	/**		* Remove control semantics from this Control.	* <p>		* @param listener java.util.EventListener representing 	* 		control semantics to be removed.	*/    protected void removeControlListener(EventListener  listener)  {	((AbstractButton) getControlComponent()).removeMouseListener(		(MouseListener) listener);    }	/**	* Type-safe way to set Control Component and control listener.	* @param button An AbstractButton that serves as Control		* component.	* @param listener A ChangeListener that implements	* Control semantics.	*/    public void setComponentAndListener(AbstractButton button, MouseListener listener) {	super.setComponentAndListener(button, listener);    }	/**	* Type-safe way to set Control listener.	* @param listener A ChangeListener that implements	* Control semantics.	*/	    public void setControlListener(MouseListener listener) { 	super.setControlListener(listener);    }	/**	* Type-safe way to set Control Component.	* @param button An AbstractButton that acts as control	* component.	*/    public void setComponent(AbstractButton button) {	super.setComponent(button);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -