Setting Headers and Footers

The choices for setting headers and footers reflect the Header and Footer options in PowerPoint. In summary you can:

Displaying Header/Footer Placeholders

Whether you are using default or per-slide headers/footers, you can set which header/footer placeholders display on pages.

Date and time

To get the show date and time placeholder setting use:

boolean getShowDateTime()

To set whether date and time placeholder is displayed use:

void setShowDateTime(boolean show)

Slide number

To get the show slide number placeholder setting use:

boolean getShowSlideNumber()

To set whether the slide number placeholder is displayed use:

void setShowSlideNumber(boolean show)

Footer

To get the show footer placeholder setting use:

boolean getShowFooter()

To set whether the footer placeholder is displayed use:

void setShowFooter(boolean show)

Header

Headers are only available for display on notes and handout pages.

To get the show header placeholder setting use:

boolean getShowHeader()

To set whether the header placeholder is displayed on notes and handouts use:

void setShowHeader(boolean show)

Setting Date and Time AutoText Display

By default, the date and time placeholder contains autotext (see the later AutoText section for more information on autotext). This section covers getting and setting the value used for that autotext. If the autotext is removed from the date and time placeholder, then this setting has no effect.

Selecting the format

You have the option of two formats for the display of date and time autotext:

To get the use date time format setting (i.e. the date and time are set to update automatically) use:

boolean getUseDateTimeFormat()

Use the following method to set which date/time format to use. If the setting is set to true the update automatically option is used; if set to false the fixed option is used.

void setUseDateTimeFormat(boolean useFormat)

Update automatically

If you have set the date and time format to update automatically, you will need to define the pre-set date/time format that will display. The Autotext class in the API documentation lists the pre-set field values. These reflect the Update Automatically formats listed in Headers and Footers in PowerPoint.

To determine what pre-set value is currently selected use:

int getDateTimeFormat()

To set a new pre-set value use:

void setDateTimeFormat(int format)

For example, the following snippet sets the date/time to update automatically and sets the format:

HeadersFooters hf = ...;
hf.setShowDateTime(true);
hf.setUseDateTimeFormat(true);
hf.setDateTimeFormat(AutoText.FORMAT_D_M_YYYY);

Fixed

If you have set the date and time format to display fixed text, you will need to set the text string that will be displayed.

To determine the fixed text string that is currently displayed use:

java.lang.String getDateTimeText()

To set a new fixed text string use:

void setDateTimeText(java.lang.String value)

For example, the following snippet sets the date/time to a fixed string:

HeadersFooters hf = ...;
hf.setShowDateTime(true);
hf.setUseDateTimeFormat(false);
hf.setDateTimeText("9/9/1999");

Setting Headers and Footers AutoText Display

Just like the date and time placeholder, by default, each of the header and footer placeholders contain autotext (see the later AutoText section for more information on autotext). This section covers getting and setting the values used for that autotext. If the autotext is removed from the placeholders, then the corresponding setting has no effect.

Headers (only displayed on notes and handouts) and footers display a text string.

Headers

To determine the text string that is currently displayed use:

java.lang.String getHeaderText()

To set a new text string use:

void setHeaderText(java.lang.String value)

For example, the following snippet sets the header string:

HeadersFooters hf = ...;
hf.setShowHeader(true);
hf.setHeaderText("Confidential");

Footers

To determine the text string that is currently displayed use:

java.lang.String getFooterText()

To set a new text string use:

void setFooterText(java.lang.String value)

For example, the following snippet sets the date/time to a fixed string:

HeadersFooters hf = ...;
hf.setShowFooter(true);
hf.setFooterText("Created by Tonic Systems");

Page generated: 2008-01-18 02:53:28 GMT TonicPoint Builder Developer's Guide -- Version 2.3