/** Draws this connector. */
  public void draw(Graphics g) {
    Rectangle r = displayBox();

    g.setColor(Color.blue);
    g.fillOval(r.x, r.y, r.width, r.height);
    g.setColor(Color.black);
    g.drawOval(r.x, r.y, r.width, r.height);
  }
  /** Prints the drawing. */
  public void print() {
    tool().deactivate();
    PrintJob printJob = getToolkit().getPrintJob(this, "Print Drawing", null);

    if (printJob != null) {
      Graphics pg = printJob.getGraphics();

      if (pg != null) {
        ((StandardDrawingView) view()).printAll(pg);
        pg.dispose(); // flush page
      }
      printJob.end();
    }
    tool().activate();
  }
 /**
  * Draws the background. If a background pattern is set it is used to fill the background.
  * Otherwise the background is filled in the background color.
  */
 public void drawBackground(Graphics g) {
   g.setColor(getBackground());
   g.fillRect(0, 0, getBounds().width, getBounds().height);
 }
 public void drawFrame(Graphics g) {
   Rectangle r = displayBox();
   g.drawRoundRect(r.x, r.y, r.width - 1, r.height - 1, fArcWidth, fArcHeight);
 }
 public void drawBackground(Graphics g) {
   Rectangle r = displayBox();
   g.fillRoundRect(r.x, r.y, r.width, r.height, fArcWidth, fArcHeight);
 }
  /*
  	public void paintBackground(Graphics g) { }

  	public void paintNormal(Graphics g) {
  		if (fIcon.normal() != null)
  			g.drawImage(fIcon.normal(), 0, 0, this);
  	}

  	public void paintPressed(Graphics g) {
  		if (fIcon.pressed() != null)
  			g.drawImage(fIcon.pressed(), 0, 0, this);
  	}
  */
  public void paintSelected(Graphics g) {
    if (fIcon.selected() != null) {
      g.drawImage(fIcon.selected(), 0, 0, this);
    }
  }