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
public UIPropertyPage();
Creates a property page with no content.
Remarks:
To add components to the property page, call addAt.
public UIPropertyPage( UIPropertyDialog sheet);
Creates a property page with no content. The page is contained in the specified dialog window.
Parameter | Description |
sheet
| The UIPropertyDialog object that will contain the property page.
|
Remarks:
To add components to the property page, call 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.
Parameter | Description |
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).
|
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.
Parameter | Description |
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.
|
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.
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
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.
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
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
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.
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
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
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
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
public void setApplyable(boolean apply);
Sets the state of the Apply button.
Return Value:
No return value.
Parameter | Description |
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
public void setConstructed(boolean b);
Sets the creation state of the property page's components.
Return Value:
No return value.
Parameter | Description |
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
public void setContentAdded(boolean b);
Sets the content state for the property page.
Return Value:
No return value.
Parameter | Description |
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
public void setSheet(UIPropertyDialog sheet);
Associates the specified property dialog window with the property page.
Return Value:
No return value.
Parameter | Description |
sheet
| The UIPropertyDialog object that will contain the property page.
|
See Also: getSheet
public void setVisible(boolean vis);
Shows or hides the property page.
Return Value:
No return value.
Parameter | Description |
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