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:
-
Right-click on the
package and select
.
The New File dialog appears. - From the Categories list, select .
-
From the File Types list, select .
- Click Next and enter 01_ImportGeometry as the file name.
-
Click
Finish.
The .xhtml file is added to the XHTML package.
-
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.
- Reformat the code in NetBeans.
- Save the file (Ctrl-S).