protected void applyOperator(MouseEvent e) 
	{
		String firstShape = shapes.get(firstShapeBox.getSelectedIndex()).getName();
		String secondShape = shapes.get(secondShapeBox.getSelectedIndex()).getName();
		
		if (areaRadio.isSelected())
		{
			BigDecimal area = (BigDecimal) manager.applyOperator(SDOOperator.AREA, firstShape);
			ResultDialog rs = new ResultDialog(this, area.toString());
			rs.setSize(150, 150);
			rs.setVisible(true);
		}
		else if (convexhullRadio.isSelected())
		{
			JShape convexhull =(JShape) manager.applyOperator(SDOOperator.CONVEXHULL, firstShape);
			List<JShape> resultShapes = new ArrayList<JShape>();
			resultShapes.add(convexhull);
			((MidnightRunWindow)getOwner()).setShapes(resultShapes);
			this.dispose();
		}
		else if (coversRadio.isSelected())
		{
			Boolean covers = (Boolean)manager.applyOperator(SDOOperator.COVERS, firstShape, secondShape);
			ResultDialog rs = new ResultDialog(this, covers.toString());
			rs.setSize(150, 150);
			rs.setVisible(true);
		}
		else if (distanceRadio.isSelected())
		{
			BigDecimal distance = (BigDecimal)manager.applyOperator(SDOOperator.DISTANCE, firstShape, secondShape);
			ResultDialog rs = new ResultDialog(this, distance.toString());
			rs.setSize(150, 150);
			rs.setVisible(true);
		}
		else if (mbrRadio.isSelected())
		{
			JShape mbr = (JShape)manager.applyOperator(SDOOperator.MBR, firstShape);
			List<JShape> resultShapes = new ArrayList<JShape>();
			resultShapes.add(mbr);
			((MidnightRunWindow)getOwner()).setShapes(resultShapes);
			this.dispose();
		}
		else if(nnRadio.isSelected())
		{
			List<JShape> resultShapes = (List<JShape>) manager.applyOperator(SDOOperator.NN, firstShape);
			((MidnightRunWindow)getOwner()).setShapes(resultShapes);
			this.dispose();	
		}
		else if (touchesRadio.isSelected())
		{
			Boolean touches = (Boolean)manager.applyOperator(SDOOperator.TOUCHES, firstShape, secondShape);
			ResultDialog rs = new ResultDialog(this, touches.toString());
			rs.setSize(150, 150);
			rs.setVisible(true);
		}
		else if (unionRadio.isSelected())
		{
			JShape union = (JShape)manager.applyOperator(SDOOperator.UNION, firstShape, secondShape);
			List<JShape> resultShapes = new ArrayList<JShape>();
			resultShapes.add(union);
			((MidnightRunWindow)getOwner()).setShapes(resultShapes);
			this.dispose();
		}
	}