| <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> | |
| <html> | |
| <head> | |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2013. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > | |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
| <link rel="stylesheet" href="../../../book.css" charset="ISO-8859-1" type="text/css"> | |
| <title>Desktop - Property Sheet Example</title> | |
| </head> | |
| <body> | |
| <h2> | |
| <b>Example - Property Sheet</b></h2> | |
| <h3> | |
| Introduction</h3> | |
| The Property Sheet Example adds an editor for files with the .usr extension | |
| and also demonstrates how to add properties and outline views on a file. | |
| <br> | |
| <h3> | |
| Running the example</h3> | |
| To start using the Property Sheet Example, create a file with extension | |
| .usr. Open the file and the Outline and Properties views to | |
| see the example in action. Click on items in the Outline view and | |
| look in the Properties view for details of the selected item in the Outline | |
| view. The people items in the list show the most detail in the Properties | |
| view. | |
| <h4> | |
| <b>Creating a new usr file</b></h4> | |
| Create a new file with file extension .usr. From the File menu, select | |
| New and then select Other... from the sub-menu. Click on Simple in | |
| the wizard, then select | |
| <br>File in the list on the left. Click on Next to supply the file | |
| name (make sure the extension is .usr) and the folder in which the file | |
| should be contained. | |
| <br> | |
| <h3> | |
| Details</h3> | |
| The Property Sheet Example demonstrates how to provide properties to the | |
| Property Sheet View. | |
| <p>The tree viewer of the Content Outline View contains and presents OrganizationElements. | |
| When an element is selected in the Content Outline View the Workspace will | |
| invoke <tt>getAdapter</tt> | |
| on the selected OrganizationElement. If an adapter is requested for IPropertySource, | |
| the OrganizationElement returns itself as it impements IPropertySource | |
| The Property Sheet View then use the Organization Element as it source. | |
| <br> | |
| </body> | |
| </html> |