for (int i = 0; i < ncomponents; ++i) { Component comp = component[i]; boolean applicable = comp.isVisible() && (comp.isLightweight() || !lightweightOnly);  if (applicable) visitChild(gfx, visitor, comp);
if (applicable) visitChild(gfx, visitor, comp); }
  private void visitChildren(Graphics gfx, GfxVisitor visitor,                             boolean lightweightOnly)  {    // FIXME: do locking    for (int i = 0; i < ncomponents; ++i)      {        Component comp = component[i];        boolean applicable = comp.isVisible()          && (comp.isLightweight() || !lightweightOnly);        if (applicable)          visitChild(gfx, visitor, comp);      }  }