Ejemplo n.º 1
0
 /** Removes a figure from the selection. */
 public void removeFromSelection(Figure figure) {
   if (isFigureSelected(figure)) {
     fSelection.remove(figure);
     fSelectionHandles = null;
     figure.invalidate();
     fireSelectionChanged();
   }
 }
Ejemplo n.º 2
0
 /**
  * Adds a figure to the current selection. The figure is only selected if it is also contained in
  * the Drawing associated with this DrawingView.
  */
 public void addToSelection(Figure figure) {
   if (!isFigureSelected(figure) && drawing().includes(figure)) {
     fSelection.add(figure);
     fSelectionHandles = null;
     figure.invalidate();
     fireSelectionChanged();
   }
 }