@Override public void mousePressed(MouseEvent e){
  m_frameLimiter.setRepeats(true);
  if ((e.getModifiers() & InputEvent.BUTTON1_MASK) != 0 && !e.isAltDown() && m_mouseState == 0 && m_scaling == 0) {
    if (((e.getModifiers() & InputEvent.CTRL_MASK) != 0) && ((e.getModifiers() & InputEvent.SHIFT_MASK) == 0)) {
      m_mouseState=2;
    }
 else     if (((e.getModifiers() & InputEvent.SHIFT_MASK) != 0) && ((e.getModifiers() & InputEvent.CTRL_MASK) == 0)) {
      m_oldMousePos.width=e.getX();
      m_oldMousePos.height=e.getY();
      m_newMousePos.width=e.getX();
      m_newMousePos.height=e.getY();
      m_mouseState=3;
      Graphics g=getGraphics();
      if (m_ZoomBoxColor == null) {
        g.setColor(Color.black);
      }
 else {
        g.setColor(m_ZoomBoxColor);
      }
      if (m_ZoomBoxXORColor == null) {
        g.setXORMode(Color.white);
      }
 else {
        g.setXORMode(m_ZoomBoxXORColor);
      }
      g.drawRect(m_oldMousePos.width,m_oldMousePos.height,m_newMousePos.width - m_oldMousePos.width,m_newMousePos.height - m_oldMousePos.height);
      g.dispose();
    }
 else {
      m_oldMousePos.width=e.getX();
      m_oldMousePos.height=e.getY();
      m_newMousePos.width=e.getX();
      m_newMousePos.height=e.getY();
      m_mouseState=1;
      m_frameLimiter.start();
    }
  }
 else   if ((e.getButton() == MouseEvent.BUTTON1) && e.isAltDown() && e.isShiftDown()&& !e.isControlDown()) {
    saveComponent();
  }
 else   if (m_mouseState == 0 && m_scaling == 0) {
  }
}

@ Override public void mousePressed ( MouseEvent e ) { m_frameLimiter . setRepeats ( true ) ; if ( ( e . getModifiers ( ) & InputEvent . BUTTON1_MASK ) != 0 && ! e . isAltDown ( ) && m_mouseState == 0 && m_scaling == 0 ) { if ( ( ( e . getModifiers ( ) & InputEvent . CTRL_MASK ) != 0 ) && ( ( e . getModifiers ( ) & InputEvent . SHIFT_MASK ) == 0 ) ) { m_mouseState = 2 ; } else if ( ( ( e . getModifiers ( ) & InputEvent . SHIFT_MASK ) != 0 ) && ( ( e . getModifiers ( ) & InputEvent . CTRL_MASK ) == 0 ) ) { m_oldMousePos . width = e . getX ( ) ; m_oldMousePos . height = e . getY ( ) ; m_newMousePos . width = e . getX ( ) ; m_newMousePos . height = e . getY ( ) ; m_mouseState = 3 ; Graphics g = getGraphics ( ) ; if ( m_ZoomBoxColor == null ) { g . setColor ( Color . black ) ; } else { g . setColor ( m_ZoomBoxColor ) ; } if ( m_ZoomBoxXORColor == null ) { g . setXORMode ( Color . white ) ; } else { g . setXORMode ( m_ZoomBoxXORColor ) ; } g . drawRect ( m_oldMousePos . width , m_oldMousePos . height , m_newMousePos . width - m_oldMousePos . width , m_newMousePos . height - m_oldMousePos . height ) ; g . dispose ( ) ; } else { m_oldMousePos . width = e . getX ( ) ; m_oldMousePos . height = e . getY ( ) ; m_newMousePos . width = e . getX ( ) ; m_newMousePos . height = e . getY ( ) ; m_mouseState = 1 ; m_frameLimiter . start ( ) ; } } else if ( ( e . getButton ( ) == MouseEvent . BUTTON1 ) && e . isAltDown ( ) && e . isShiftDown ( ) && ! e . isControlDown ( ) ) { saveComponent ( ) ; } else if ( m_mouseState == 0 && m_scaling == 0 ) { } }
determines what action the user wants to perform .
