IDesignPage Interface

IDesignPage Interface

This Package | All Packages

public interface IDesignPage

Defines a design page, which is a page of a dialog box that allows for changing design time settings. A form package typically shows this in one tab of a tabbed dialog box, but that is only one possible implementation. There are two important interfaces to consider:

There is one IDesignPageSite interface for each design page. This provides a window for the design page to parent itself in. Also, the page will notify that it is dirty through this interface. DesignForm is a stock implementation of IDesignPageSite.

The IDesignPage interface represents the page itself. This typically displays UI for setting a component's design time properties that cannot easily be set through a typical property sheet. A page may be asked to size itself larger than its default size to unify the look of multiple pages in the same dialog box but will never be asked to become smaller than its default. Pages should support dynamic resizing, but it is not a requirement. DesignPage is a stock implementation of IDesignPage.

Also see wfc.core.IDesignPageSite

Methods
Name Description
activate() Activates and displays the page.
apply() Applies changes to all the objects in this page's object list.
deactivate() Deactivates the page.
getControl() Retrieves the control that represents the window for this page.
getPageMessage(MSG msg) Gives the design page a chance to process messages before the caller uses them.
getSize() Retrieves the width and height of this page.
getTitle() Retrieves the title of the design page.
setObjects(Object [] objects) Called before activation to set up the array of objects that this page is modifying properties for.
setSite(IDesignPageSite site) Called before this page is activated to set up the site used to notify the caller of changes.
setSize(Point size) Called to enlarge the size of this page.
supportsHelp() Called to determine whether the Help icon should be shown at the top of the dialog box.

Methods

IDesignPage.activate

Syntax
public void activate();
Description

Activates and displays the page.

IDesignPage.apply

Syntax
public void apply();
Description

Applies changes to all the objects in this page's object list.

IDesignPage.deactivate

Syntax
public void deactivate();
Description

Deactivates the page. A page can be deactivated and later reactivated.

IDesignPage.getControl

Syntax
public Control getControl();
Return Value

Returns a Control object.

Description

Retrieves the control that represents the window for this page.

IDesignPage.getPageMessage

Syntax
public boolean getPageMessage( MSG msg );
Parameters
The
msg wfc.win32.MSG to process.
Return Value

Returns true if this page processed the message, or false otherwise. If this returns true, the message is discarded. Otherwise, the caller continues to process the message.

Description

Gives the design page a chance to process messages before the caller uses them.

IDesignPage.getSize

Syntax
public Point getSize();
Return Value

Returns the size of the page.

Description

Retrieves the width and height of this page. The caller can use this to size its UI appropriately.

IDesignPage.getTitle

Syntax
public String getTitle();
Return Value

Returns the title of page.

Description

Retrieves the title of the design page. The caller can use this to show the name of this page before it is actually activated.

IDesignPage.setObjects

Syntax
public void setObjects( Object [] objects );
Parameters
objects
The array of objects this page is to modify.
Description

Called before activation to set up the array of objects that this page is modifying properties for. The objects are not guaranteed to be of any particular type; their only commonality is that they have all specified that they use this design page class.

IDesignPage.setSite

Syntax
public void setSite( IDesignPageSite site );
Parameters
site
The IDesignPageSite to which this page is attached.
Description

Called before this page is activated to set up the site used to notify the caller of changes.

IDesignPage.setSize

Syntax
public void setSize( Point size );
Parameters
size
The new size.
Description

Called to enlarge the size of this page. This is done after the caller has determined the sizes of all pages. If this page supports resizing to a larger size, it should do so. A design page will never be requested to size smaller than its default size.

IDesignPage.supportsHelp

Syntax
public boolean supportsHelp();
Return Value

Returns true to enable the Help icon for this page, or returns false to disable it.

Description

Called to determine whether the Help icon should be shown at the top of the dialog box. If one or more pages supports the icon, it will appear. It will be dimmed for pages that do not support Help.