Adding a Description to the Task Panel

You can add descriptions to each task panel. Furthermore, you can link a particular word or phrase in a step to a staraction. The word effectively becomes a link, and when clicked, performs a pre-defined action. It is recommended that you store all text in an external .xhtml file. It is also good practise to store all .xhtml files in a separate package to the source package. For this tutorial, you already created the XHTML package in an earlier section.

Add an XHTML file to your project:
  1. Right-click on the XHTML package and select New > Other....


    The New File dialog appears.
  2. From the Categories list, select Other.
  3. From the File Types list, select XHTML File.


  4. Click Next and enter 01_ImportGeometry as the file name.
  5. Click Finish.
    The .xhtml file is added to the XHTML package.

  6. Copy and paste the following code into the 01_ImportGeometry.xhtml file:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmls="http://www.w3.org/1999/xhtml">
        <head>
            <meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8" />
        </head>
        <body>
            <p>
                <!--This is the description of the task that appears in the task panel.-->
                This task imports a geometry part into STAR-CCM+.
                <ul>
                    <!--This is a list item that appears in the task. The word "Import" is linked to a staraction.-->
                    <li><a href="staraction:importSurfaceMeshDialog">Import</a> the surface mesh.</li>
                </ul>
            </p>
        </body>
    </html>
    where:
    • staraction:importSurfaceMeshDialog calls the importSurfaceMeshDialog function from the Task01ImportGeometry class.
  7. Reformat the code in NetBeans.
  8. Save the file (Ctrl-S).