本文整理匯總了Java中javax.swing.event.MouseInputListener.mousePressed方法的典型用法代碼示例。如果您正苦於以下問題:Java MouseInputListener.mousePressed方法的具體用法?Java MouseInputListener.mousePressed怎麽用?Java MouseInputListener.mousePressed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.swing.event.MouseInputListener
的用法示例。
在下文中一共展示了MouseInputListener.mousePressed方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: startDragging
import javax.swing.event.MouseInputListener; //導入方法依賴的package包/類
public void startDragging( MouseEvent event, MouseInputListener activeUnit ) {
if( this.activeUnit != null ) {
this.activeUnit.mouseExited( event );
}
this.activeUnit = activeUnit;
activeUnit.mouseEntered( event );
activeUnit.mousePressed( event );
activeUnit.mouseDragged( event );
}
示例2: mousePressed
import javax.swing.event.MouseInputListener; //導入方法依賴的package包/類
public void mousePressed( MouseEvent e ) {
for ( int i = 0; i < list.size(); i++ ) {
MouseInputListener mouseInputListener = (MouseInputListener) list.get( i );
mouseInputListener.mousePressed( e );
}
}
示例3: mousePressed
import javax.swing.event.MouseInputListener; //導入方法依賴的package包/類
public void mousePressed( MouseEvent e ) {
for ( int i = 0; i < listeners.size(); i++ ) {
MouseInputListener mouseInputListener = (MouseInputListener) listeners.get( i );
mouseInputListener.mousePressed( e );
}
}
示例4: mousePressed
import javax.swing.event.MouseInputListener; //導入方法依賴的package包/類
@Override
public void mousePressed(MouseEvent e) {
for(MouseInputListener l : mouseInputListeners){
l.mousePressed(e);
}
}