public void mouseClicked (MouseEvent me) {
      
      /* In Select Mode, click the left mouse button  on a shape to select the shape, 
         and click the right mouse button on a selected shape to deselect it.
       */
      if((dMode==SELECT_MODE)
      &&(me.getSource() instanceof Shape)){
          Shape source=(Shape) me.getSource();
          int button=me.getModifiers();
          boolean select=source.getSelectState();
          if((!select)&&(button==MouseEvent.BUTTON1_MASK)){
            source.setSelectState(true);
            dSelectedShapes.add(source);
            source.repaint();
          }
          else if(select && (button==MouseEvent.BUTTON1_MASK)){
              source.setSelectState(false);
              dSelectedShapes.remove(source);
              source.repaint();
          }
          updateEditMenu();
      }
          
  }