@Override
		public void mouseClicked(MouseEvent e) {
			if (e.getSource() instanceof PhotoPanel) {
				PhotoPanel photoPanel = (PhotoPanel) e.getSource();
				Image image = photoPanel.getIcon().getImage();
				float scale;
				BufferedImage bi;
				if(image.getWidth(null) > Constants.MAX_PICTURE_WIDTH){
					scale = Constants.MAX_PICTURE_WIDTH/image.getWidth(null);
					bi = ImageUtils.resize(image, Math.round(Constants.MAX_PICTURE_WIDTH),
							Math.round(image.getHeight(null)*scale));
					if(bi.getHeight() > Constants.MAX_PICTURE_HEIGHT){
						scale = Constants.MAX_PICTURE_HEIGHT/bi.getHeight();
						bi = ImageUtils.resize(image, Math.round(bi.getWidth()*scale), Math.round(Constants.MAX_PICTURE_HEIGHT));
					}
				}else if(image.getHeight(null) > Constants.MAX_PICTURE_HEIGHT){
					scale = Constants.MAX_PICTURE_HEIGHT/image.getHeight(null);
					bi = ImageUtils.resize(image, Math.round(image.getWidth(null)*scale),
							Math.round(Constants.MAX_PICTURE_HEIGHT));
					if(bi.getWidth() > Constants.MAX_PICTURE_WIDTH){
						scale = Constants.MAX_PICTURE_WIDTH/bi.getWidth();
						bi = ImageUtils.resize(image, Math.round(Constants.MAX_PICTURE_WIDTH), Math.round(bi.getHeight()*scale));
					}
				}else{
					bi = ImageUtils.resize(image, image.getWidth(null), image.getHeight(null));
				}
				photoPanel.setScaleDimension(new Dimension(bi.getWidth(), bi.getHeight()));
				ImageIcon icon2 = new ImageIcon(bi);
				photoPanel.setIcon(icon2);
				JPanel cardPanel = view.getCardPanel();
				CardLayout cl = (CardLayout) cardPanel.getLayout();
				cl.show(cardPanel, "One");
				JPanel singlePhotoPanel = view.getSinglePhotoPanel();
				singlePhotoPanel.removeAll();
				singlePhotoPanel.add(photoPanel);
				view.resetSlider();
				view.setTopButtonsVisibility(true);
				JScrollPane pane = view.getPhotoView();
				pane.getVerticalScrollBar().setValue(0);
			}
		}