code: public void setHeaderFooter(HeaderFooter headerFooter, int displayAt) {
          this.mode = MODE_MULTIPLE;
          switch(displayAt) {
              case RtfHeaderFooter.DISPLAY_ALL_PAGES:
                  headerAll = new RtfHeaderFooter(this.document, headerFooter, this.type, displayAt);
              	break;
              case RtfHeaderFooter.DISPLAY_FIRST_PAGE:
                  headerFirst = new RtfHeaderFooter(this.document, headerFooter, this.type, displayAt);
                  break;
              case RtfHeaderFooter.DISPLAY_LEFT_PAGES:
                  headerLeft = new RtfHeaderFooter(this.document, headerFooter, this.type, displayAt);
                  break;
              case RtfHeaderFooter.DISPLAY_RIGHT_PAGES:
                  headerRight = new RtfHeaderFooter(this.document, headerFooter, this.type, displayAt);
                  break;
          }
      }
docs: Set a HeaderFooter to be displayed at a certain position
  
  @param headerFooter The HeaderFooter to set
  @param displayAt The display location to use