|
|
|
|
Pairwise Comparative Map is very easy to incorporate in to your own programs. If you have not read the first part of the data section please do so. Once you have a PCM file and have downloaded the PCM.jar file you can proceed. This hyperlinked simple program is just about the simplest Java program that you can write to create an applet that uses the PCM package to draw a Pairwise Comparative Map. Please note
Multi PCM It is nearly as easy to make a Multi PCM as it is to create a regular PCM. You just have to create a String array of the URLs or file paths to the files that you want to include in the Multi PCM. For example, the following few lines would create a Multi PCM:
To set up the function where you can cross-reference to the appropriate database by double-clicking, you have to implement the action listener interface and add an action listener to the PCM object. Then you have to catch any action events in which the action command string looks like a URL, i.e. contain the substring "http". This can be achieved by the following code:
Integrated Development Environment, (IDE) Both PairwiseComparativeMap and MultiPCM have Java BeanInfo classes. This means that they can be loaded in the component palettes of Java IDEs. If you load these classes on to the palette of Borland JBuilder, it looks like the following:
The first 32x32 pixel icon represents the regular PCM and the second represents Multi PCM. 16x16 pixel images are also packaged in to the PCM.jar file. All this means that you can use PCM in a drag and drop fashion. If you create an application with a frame in JBuilder and drag out each of the components from the palette on to the frame you will see something like the following:
The first component is PCM and the second component is Multi PCM. PCM has a special set of property descriptors. The JBuilder Inspector (editor for variables) for PCM looks like the following:
You can set the file path in the PCM_File box, the two default database colours, the starting length of the two sausages and whether when you double click on a locus, the URL is produced (crossLinkToDatabase). You could easily set it to something like:
I found that as you enter things like the file path or URL, colours and lengths in to the JBuilder Inspector, it dynamically adjusts your view even before you run the program. Very handy! Multi PCM doesn't have such a developed Property Descriptor yet.
|