Ejemplo n.º 1
0
 /**
  * Removes a figure from the composite.
  *
  * @see #removeAll
  */
 public Figure remove(Figure figure) {
   if (fFigures.contains(figure)) {
     figure.removeFromContainer(this);
     fFigures.removeElement(figure);
   }
   return figure;
 }
Ejemplo n.º 2
0
 /** Brings a figure to the front. */
 public synchronized void bringToFront(Figure figure) {
   if (fFigures.contains(figure)) {
     fFigures.removeElement(figure);
     fFigures.addElement(figure);
     figure.changed();
   }
 }
Ejemplo n.º 3
0
 /** Adds a figure to the list of figures. Initializes the the figure's container. */
 public Figure add(Figure figure) {
   if (!fFigures.contains(figure)) {
     fFigures.addElement(figure);
     figure.addToContainer(this);
   }
   return figure;
 }
Ejemplo n.º 4
0
 /** Sends a figure to the back of the drawing. */
 public synchronized void sendToBack(Figure figure) {
   if (fFigures.contains(figure)) {
     fFigures.removeElement(figure);
     fFigures.insertElementAt(figure, 0);
     figure.changed();
   }
 }