public void mousePressed(MouseEvent e){
  if (log.isDebugEnabled()) {
    log.debug("pressed " + (e.getModifiers() & MouseEvent.BUTTON1_MASK) + " "+ e.isPopupTrigger()+ " "+ (e.getModifiers() & (MouseEvent.ALT_MASK + MouseEvent.META_MASK + MouseEvent.CTRL_MASK))+ (" " + MouseEvent.ALT_MASK + "/"+ MouseEvent.META_MASK+ "/"+ MouseEvent.CTRL_MASK));
  }
  if (e.isPopupTrigger() && parentFrame.isSelected()) {
    try {
      _menu.show(e.getComponent(),e.getX(),e.getY());
    }
 catch (    java.awt.IllegalComponentStateException cs) {
    }
    e.consume();
  }
}

public void mousePressed ( MouseEvent e ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "pressed " + ( e . getModifiers ( ) & MouseEvent . BUTTON1_MASK ) + " " + e . isPopupTrigger ( ) + " " + ( e . getModifiers ( ) & ( MouseEvent . ALT_MASK + MouseEvent . META_MASK + MouseEvent . CTRL_MASK ) ) + ( " " + MouseEvent . ALT_MASK + "/" + MouseEvent . META_MASK + "/" + MouseEvent . CTRL_MASK ) ) ; } if ( e . isPopupTrigger ( ) && parentFrame . isSelected ( ) ) { try { _menu . show ( e . getComponent ( ) , e . getX ( ) , e . getY ( ) ) ; } catch ( java . awt . IllegalComponentStateException cs ) { } e . consume ( ) ; } }
if the event is the popup trigger , which is dependent on the platform , present the popup menu . otherwise change the state of the function depending on the locking state of the button .
