Cpg-logo.jpg (4054 bytes)

Functions of CPG Map

 

There are a number of different types of functions associated with CPG Map. These can be grouped in to the following categories and are discussed below:

Magnification
Graphics Customisation
Zooming

The following diagram shows the names that have been given to some of the components that go to make up CPG Map, (n.b. not real data)!!

cpg-image9.jpg (48054 bytes)

Please note, lines below in green are intended for programmers.

Magnification

In the case of CPG Map, magnification refers to the length of each of the sausages. The reason it is called magnification is because the longer you stretch-out the sausages, the more detail you can see. This is different to zooming. Each sausage, including both sausages of a double map, is magnifiable independently of one another. So you could have one sausage on the left-hand side of a double map of 100 pixels long and the sausage on the other side of 2,000 pixels long. See programmers tips.

Graphics Customisation

A large number of the graphical features of CPG Map can be customised. It is very easy to hook up menu and button components to these functions and this is described in the programming tips section.

The graphics functions can be subdivided as follows:

Colours

The colours of the CPG Map elements can be changed as in the following image:

cpg-image2.jpg (3493 bytes)

Background Colour

Call the method setBackgroundColour(Color).

Sausage Colour

Call the method setSausageColour(Color).

Error Sausage Colour

Call the method setErrorSausageColour(Color).

Line and Box Colour

This is the colour of the labels, the lines that join the sausages to the labels and also the little boxes beside the labels. Call the method setLineAndBoxColour(Color).

 

AWT Sizes

The sizes of different components can be altered. These can be be summarised as follows:

Sausage Width

This is the width in pixels of the sausages. Call setSausageWidth(int).

Line Distance

This is the horizontal width in pixels of the line in between the the 5 pixel long line coming from the box and the 5 pixel long line coming from the sausage, (see image).

cpg-image3.jpg (11598 bytes)

Call method setLineDistance(int).

Box Size

This is the size in pixels of the little boxes. Call method setBoxSize(int).

Page Header

This is the distance from the top of the Canvas that is left blank before the CPG Maps are drawn. Call setYHeaderToMapDistance(int).

Map Separation Distance

This is the horizontal distance which is left between each map. Call setMapSeparationDistance(int).

Text

Units

The units at the top of double and single maps can be changed by calling setUnitsRHS(String) and setUnitsRHS(String).

Scientific Notation

Two notations are available for displaying the numbers along the scale bars: normal numbers and scientific notation. Toggle between the two by calling fullNumbersToggle().

Number Length

The number of characters in the scale bar numbers can be customised. This is useful if displaying scientific notation and don't want many significant digits on the scale bar. Call the method setMaxNumbersInLabel(int).

Font

The font used for the text can be changed. Call the method setLabelFont(Font).

Map Titles

If desired, you can change the text of the map titles. Call method setMapTitles(String[]) and include a string in the array for each map.

 

Mouse

There are two options available with regards to locus highlighting: The CPG Map can be click-sensitive (whereby the loci highlight by clicking on the labels) and hover-sensitive (whereby the loci highlight by moving the mouse over the labels). Toggle between the two by calling toggleMouseMotionSensitive().

Error Sausages

You can toggle the error sausages on and off. Call method toggleErrorSausages().

 

Zooming

It is possible to zoom in and out of CPG Maps. Instead of just taking an image and 'blowing up' the pixels it actually scales up all of the CPG Map AWT component sizes at the same time. The following two images illustrate this:

cpg-image4.jpg (116304 bytes)

The image above shows the default CPG Map zoomed by 130 percent. The next image shows the default CPG Map zoomed by a value of -50 percent:

cpg-image5.jpg (41948 bytes)

Notice how the line width is the same in each case. This is because the whole image is redrawn with shorter or longer lines rather than magnifying the pixels.

Two zoom-undo functions are available:

Undo last zoom

When you zoom in on a CPG Map the values of the AWT components are remembered. This means that you can return to the previous settings. This is useful if you have zoomed in a few times and want to get back to the previous settings.

Restore original

Restores the original AWT component values.

 

¡ Now, it's demo time !

 

©1998 Jeremy Dickson