/*
   * @see javax.swing.Icon#paintIcon(java.awt.Component, java.awt.Graphics,
   *      int, int)
   */
  public void paintIcon(Component c, Graphics g, int x, int y) {
    if (fig instanceof OperationsCompartmentContainer) {
      OperationsCompartmentContainer fc = (OperationsCompartmentContainer) fig;

      // added by Eric Lefevre 13 Mar 1999: we must check if the
      // FigText for operations is drawn before drawing things
      // over it
      if (!fc.isOperationsVisible()) {
        fig = null;
        return;
      }

      Rectangle fr = fc.getOperationsBounds();
      int left = fr.x + 10;
      int height = fr.y + fr.height - 7;
      int right = fr.x + fr.width - 10;
      g.setColor(Color.red);
      int i = left;
      while (true) {
        g.drawLine(i, height, i + WAVE_LENGTH, height + WAVE_HEIGHT);
        i += WAVE_LENGTH;
        if (i >= right) break;
        g.drawLine(i, height + WAVE_HEIGHT, i + WAVE_LENGTH, height);
        i += WAVE_LENGTH;
        if (i >= right) break;
        g.drawLine(i, height, i + WAVE_LENGTH, height + WAVE_HEIGHT / 2);
        i += WAVE_LENGTH;
        if (i >= right) break;
        g.drawLine(i, height + WAVE_HEIGHT / 2, i + WAVE_LENGTH, height);
        i += WAVE_LENGTH;
        if (i >= right) break;
      }
      fig = null;
    }
  }
 /*
  * @see org.argouml.ui.Clarifier#hit(int, int)
  */
 public boolean hit(int x, int y) {
   if (!(fig instanceof OperationsCompartmentContainer)) return false;
   OperationsCompartmentContainer fc = (OperationsCompartmentContainer) fig;
   Rectangle fr = fc.getOperationsBounds();
   boolean res = fr.contains(x, y);
   fig = null;
   return res;
 }