<!doctype html public '-//W3C//DTD HTML 4.01//EN'
  'http://www.w3.org/TR/html4/strict.dtd'>
<html>
  <head>
	<title>Isight - Examples</title>
	<link rel="stylesheet" href="../../EStyle.css" type="text/css">
	<link rel="stylesheet" href="../../ETables.css" type="text/css">
  </head>
<body>
<a href="http://www.simulia.com/products/sim_opt.html/"><img src="../../../../examples/logo.gif"></a>
<h1>Data Type Examples</h1>
<table>
	<th colspan=2>Complex Value</th>
	<tr><td>Description:</td>
		<td>This is a simple example of defining a new Data Type for Isight.
		    It implements a simple but usable Complex value type consisting of a
		    Real and Imaginary part.
		    <p>
		    Note that while the ComplexEditor class has direct access to the unique methods of the
		    ComplexValue class (like getRe(), setValue(double, double)), custom components would not
		    normally have this access - one MetaModel cannot normally down-cast a model object
		    to the type of another MetaModel.  Code outside ComplexValue.jar that needs to
		    manipulate the parts of a ComplexValue would have to call getAsObject() and then
		    manipulate the returned double[2] array.
		</td>
	</tr>
	<tr><td>Support files:</td>
		<td>
			<ul>
				<li><a href="ComplexValue.java">ComplexValue.java</a> -
					Java source code for the value class.
				</li>
				<li><a href="ComplexEditor.java">ComplexEditor.java</a> -
					Java source code for a trivial editor for Complex values.
				</li>
				<li><a href="ComplexValue.xml">ComplexValue.xml</a> -
					XML MetaModel descriptor for the ComplexValue data type.
				</li>
				<li><a href="ComplexValue.mf">ComplexValue.mf</a> -
					Manifest file that tells the Publish command that the Jar file is a DataType.
				</li>
				<li><a href="build.bat">build.bat</a> -
					Windows Batch file to compile ComplexValue.java and build ComplexValue.jar.
				</li>
				<li><a href="build.sh">build.sh</a> -
					Unix shell script to compile ComplexValue.java and build ComplexValue.jar
				</li>
			</ul>
		</td>
	</tr>
	<th colspan=2>URL Data Handler</th>
	<tr><td>Description:</td>
		<td>This is a simple example of how to define a new Data Handler for File Parameters.
		    The example is a URL handler that can be used to read from or write to any object that
		    can be referenced by the Java URL class.  This includes http:, ftp:, file:, and jar: URL types.
		</td>
	</tr>
	<tr><td>Support files:</td>
		<td>
			<ul>
				<li><a href="DataHandlerURL">DataHandlerURL.java</a> -
					Java source code for the Data Handler.
				</li>
				<li><a href="DataHandlerURLEditor">DataHandlerURLEditor.java</a> -
					Java source code for a trivial editor for the configuration of the Data Handler.
				</li>
				<li><a href="DataHandlerURL.xml">DataHandlerURL.xml</a> -
					XML MetaModel descriptor for the URL data handler.
				</li>
				<li><a href="DataHandlerURL.mf">DataHandlerURL.mf</a> -
					Manifest file that tells the Publish command that the Jar file is a DataType.
				</li>
				<li><a href="build.bat">build.bat</a> -
					Windows Batch file to compile and jar all examples in this directory.
				</li>
				<li><a href="build.sh">build.sh</a> -
					Unix shell script to compile and jar all examples in this directory.
				</li>
			</ul>
		</td>
	</tr>
	</table>
	<H2>Instructions:</h2>
	<ol>
	<li>Use the provided build script (<a href = "build.sh">build.sh</a> on Unix,
	   <a href="build.bat">build.bat</a> on Windows) to compile the Java source
	   files and generate corresponding class files.   It also combines these files into a jar file.
	   <br>You must have a Java 5 Development Kit (JDK) installed, and must set
	   the environment variable JAVA_JDK to point to it.
	   You must also have Isight installed, and must set
	   the environment variable FIPER_HOME to point to it.
	   <br>Note that the generated class files will be placed in
	   a directory structure under this current example
	   directory that mirrors the package structure defined in
	   the Java source files (examples/development/datatypes).</li>
	<li>Use the Isight Design Gateway Library panel, the Library Browser tool, or the 'fipercmd publish' command to
	   publish ComplexValue.jar and DataHandlerURL.jar to the Isight Library.
	<li>Stop and restart the design gateway to make sure it loads the newly published jar files.
	<li>You may now build models using these data types.</li>
    </ol>
</body>
</html>
