public void mouseDragged(MouseEvent e) {
    	
        if(e.isControlDown())
        {
        	markerRect.draw();
            markerRect.setWidth(-(mouseStartX-e.getX()));
            markerRect.setHeight(-(mouseStartY-e.getY()));
            repaint();
        }
       /* else if(markerRect.isSelectedDrag())
        {
            markerRect.setX(-(mouseStartX-e.getX()));
            markerRect.setY(-(mouseStartY-e.getY()));
            repaint();
        }*/
      /*  else if((markerRect.isSelectedWidth())||(markerRect.isSelectedHeight()))
        {
            if(markerRect.isSelectedWidth()){
            markerRect.changeWidth(-(mouseStartX-e.getX()));}
            if(markerRect.isSelectedHeight())
            {
                markerRect.changeHeight(-(mouseStartY-e.getY()));
            }
            repaint();
        }*/
//        else if(markerArray.isSelecetedHeigh())
//        {
//            markerArray.changeHeight(-(mouseStartY-e.getY()));
//            repaint();
//        }
        else
        {
        mDragged=true;
        mouseX=e.getX();
        mouseY=e.getY();
        imageVX=mouseStartX-mouseX;
        imageVY=mouseStartY-mouseY;
        repaint();
        System.out.println("ruch");
        }
        repaint();
        
        
//throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }