コード例 #1
0
  /**
   * Renders using the given rendering surface and area on that surface. This is implemented to
   * delgate to the superclass after stashing the base coordinate for tab calculations.
   *
   * @param g the rendering surface to use
   * @param a the allocated region to render into
   * @see View#paint
   */
  public void paint(Graphics g, Shape a) {
    if (a == null) {
      return;
    }

    Rectangle r;
    if (a instanceof Rectangle) {
      r = (Rectangle) a;
    } else {
      r = a.getBounds();
    }
    painter.paint(g, r.x, r.y, r.width, r.height, this);
    super.paint(g, a);
  }