Exemplo n.º 1
0
 /**
  * Action event listener.
  *
  * @param e ActionEvent - performed action event.
  */
 public void actionPerformed(ActionEvent e) {
   if (e.getActionCommand() == Menu.RELATION_DELETE) {
     canvas.removeConnection(connection);
   } else if (e.getActionCommand() == Menu.ADDBREAKPOINT) {
     connection.addBreakPoint(connection.indexOf(clickX, clickY), new Point(clickX, clickY));
     // select the connection to make the new breakpoint visible
     connection.setSelected(true);
   } else {
     connection.removeBreakPoint(clickX, clickY);
   }
   canvas.drawingArea.repaint();
 } // actionPerformed