Packages
 In this topic

*Constructors

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.ui   Previous This
Package
Next

 


Class UIPropertyPage

public abstract class UIPropertyPage extends UIPanel
             implements IUIPropertyPage
{
  // Constructors
  public UIPropertyPage();
  public UIPropertyPage( UIPropertyDialog sheet);

  // Methods
  public void addAt( IUIComponent comp, int x, int y,
        Dimension dim);
  public void addAt( IUIComponent comp, int x, int y);
  abstract public boolean addContent();
  public boolean doApplyAction();
  public boolean doConstruct();
  public void doNotVisible();
  public void doVisible();
  public Insets getInsets();
  public UIPropertyDialog getSheet();
  public boolean isApplyable();
  public boolean isConstructed();
  public boolean isContentAdded();
  public void setApplyable(boolean apply);
  public void setConstructed(boolean b);
  public void setContentAdded(boolean b);
  public void setSheet(UIPropertyDialog sheet);
  public void setVisible(boolean vis);
}

This class implements an abstract property page. Typically, a UIPropertyPage object is contained in a UIPropertyDialog control.

To implement a property page, extend UIPropertyPage and override the addContent method.

UIComponent
  |
  +--UIContainer
    |
    +--UIStateContainer
      |
      +--UIPanel
        |
        +--UIPropertyPage

Constructors

UIPropertyPage

public UIPropertyPage();

Creates a property page with no content.

Remarks:

To add components to the property page, call addAt.

UIPropertyPage

public UIPropertyPage( UIPropertyDialog sheet);

Creates a property page with no content. The page is contained in the specified dialog window.

ParameterDescription
sheet The UIPropertyDialog object that will contain the property page.

Remarks:

To add components to the property page, call addAt.

Methods

addAt

public void addAt( IUIComponent comp, int x, int y, Dimension dim);

Adds a component to the property page using the specified coordinates and dimensions.

Return Value:

No return value.

ParameterDescription
comp The component to be added.
x The x coordinate for the upper-left corner of the component.
y The y coordinate for the upper-left corner of the component.
dim The height and width of the component (in pixels).

addAt

public void addAt( IUIComponent comp, int x, int y);

Adds a component to the property page using the specified coordinates.

Return Value:

No return value.

ParameterDescription
comp The component to be added.
x The x coordinate for the upper-left corner of the component.
y The y coordinate for the upper-left corner of the component.

addContent

abstract public boolean addContent();

Called the first time the property page is made visible. The default layout manager is UIDialogLayout.

Return Value:

Returns true if the components are added only once; otherwise, returns false.

Remarks:

Override this method to add components to the property page.

doApplyAction

public boolean doApplyAction();

Responds to the Apply button being pressed.

Return Value:

Returns true if the apply action was handled. If the apply action was cancelled, this method returns false.

Remarks:

This method implements doApplyAction in the IUIPropertyPage interface. Override doApplyAction to handle an apply action.

See Also: isApplyable, setApplyable

doConstruct

public boolean doConstruct();

Called the first time the property page is made visible.

Return Value:

Returns true if the construction occurs only once; otherwise, returns false.

Remarks:

Override this method to construct components for the property page.

doNotVisible

public void doNotVisible();

Called when the property page is hidden.

Return Value:

No return value.

Remarks:

Override this method to update the property page when it is made invisible. doNotVisible is automatically invoked whenever the page is hidden.

See Also: doVisible

doVisible

public void doVisible();

Called when the property page is shown.

Return Value:

No return value.

Remarks:

Override this method to update the property page when it is made visible. doVisible is automatically invoked whenever the page is shown.

See Also: doNotVisible

getInsets

public Insets getInsets();

Retrieves the property page's insets, which indicate the nonclient area of the property page control.

Return Value:

Returns an Insets object containing the control's insets.

getSheet

public UIPropertyDialog getSheet();

Retrieves the property dialog window that contains the property page.

Return Value:

Returns the associated UIPropertyDialog object.

Remarks:

This method is automatically called when a new page is added to property dialog, provided the page has not already been set.

See Also: setSheet

isApplyable

public boolean isApplyable();

Determines whether changes made to the property page by the user will be applied when the Apply button is pressed.

Return Value:

Returns true if pressing the Apply button changes the state of the application; otherwise, returns false.

Remarks:

This method implements isApplyable in the IUIPropertyPage interface.

See Also: setApplyable

isConstructed

public boolean isConstructed();

Determines whether the components on the property page have been constructed.

Return Value:

Returns true if the property page's components have been constructed; otherwise, returns false.

See Also: setConstructed, doConstruct

isContentAdded

public boolean isContentAdded();

Determines whether components have been added to a visible page.

Return Value:

Returns true if a component has been added to the page and the page is visible; otherwise, returns false.

See Also: setContentAdded, addContent

setApplyable

public void setApplyable(boolean apply);

Sets the state of the Apply button.

Return Value:

No return value.

ParameterDescription
apply If true, changes will be applied to the application when the Apply button is pressed; otherwise, changes will not be applied.

Remarks:

This method implements setApplyable in the IUIPropertyPage interface.

See Also: isApplyable, doApplyAction

setConstructed

public void setConstructed(boolean b);

Sets the creation state of the property page's components.

Return Value:

No return value.

ParameterDescription
b If true, the components have been constructed; otherwise, the components have not been constructed.

Remarks:

This method implements setConstructed in the IUIPropertyPage interface.

See Also: isConstructed, doConstruct

setContentAdded

public void setContentAdded(boolean b);

Sets the content state for the property page.

Return Value:

No return value.

ParameterDescription
b If true, the property page's components have been added; otherwise, the components are still in the process of being added.

See Also: isContentAdded, addContent

setSheet

public void setSheet(UIPropertyDialog sheet);

Associates the specified property dialog window with the property page.

Return Value:

No return value.

ParameterDescription
sheet The UIPropertyDialog object that will contain the property page.

See Also: getSheet

setVisible

public void setVisible(boolean vis);

Shows or hides the property page.

Return Value:

No return value.

ParameterDescription
vis If true, the property page is shown; otherwise, it is hidden.

Remarks:

This method implements setVisible in the IUIPropertyPage interface.

See Also: doVisible, doNotVisible

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.