pairwise-logo.gif (1266 bytes)

All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class PairwiseComparativeMap.PairwiseCanvas

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----PairwiseComparativeMap.PairwiseCanvas

public class PairwiseCanvas
extends Canvas
implements MouseListener
This is the class on which the actual map is drawn on and is in close communication with it's PairwiseComparativeMap parent. Messages to it's parent (e.g. resize a sausage), filter down to this class where they are implemented.

Version:
1.0

Author:
Written by Jeremy Dickson for the UK Crop Plant Bioinformatics Network, October 1998.


Constructor Index

 o PairwiseCanvas(Dimension)
Default constructor.
 o PairwiseCanvas(PairwiseComparativeMapData, Dimension)
Pass in the PairwiseComparativeMapData object to process.

Method Index

 o addActionListener(ActionListener)
Add an action listener.
 o clickInAdjacentMap(String)
This method is called when there is a click in a pairwise map that is sitting adjacent to this one and there has been a click in it.
 o getCompleteMapSize()
Returns the complete size of the pairwise comparative map, not just the viewport size.
 o invertMap(boolean)
Inverts a map- draws it upside down.
 o isSingleMap()
Returns true if there is only one chromosomal map and false if there are two.
 o mouseClicked(MouseEvent)
Called when there's a mouse click on the canvas.
 o mouseEntered(MouseEvent)
Not used.
 o mouseExited(MouseEvent)
Not used.
 o mousePressed(MouseEvent)
Not used.
 o mouseReleased(MouseEvent)
Not used.
 o paint(Graphics)
 o pairwiseCanvasResized(Dimension)
Called when the viewport window size is changed.
 o processActionEvent(ActionEvent)
 o processData(PairwiseComparativeMapData)
Processes data for presentation on screen.
 o removeActionListener(ActionListener)
Remove an action listener.
 o resizeSausage(boolean, int)
Sets the size of a map sausage.
 o scrollMap(int)
When the user wants to scroll down the map this method is called.
 o swapMaps()
Swaps the maps.
 o update(Graphics)

Constructors

 o PairwiseCanvas
 public PairwiseCanvas(Dimension initialSize)
Default constructor. Pass in the initial size of the canvas and pass in PairwiseComparativeMapData object later to processData(PairwiseComparativeMapData data).

 o PairwiseCanvas
 public PairwiseCanvas(PairwiseComparativeMapData data,
                       Dimension initialSize)
Pass in the PairwiseComparativeMapData object to process.

Methods

 o processData
 public void processData(PairwiseComparativeMapData data)
Processes data for presentation on screen.

 o isSingleMap
 public boolean isSingleMap()
Returns true if there is only one chromosomal map and false if there are two.

 o update
 public void update(Graphics g)
Overrides:
update in class Component
 o paint
 public void paint(Graphics g)
Overrides:
paint in class Canvas
 o scrollMap
 public void scrollMap(int y_value)
When the user wants to scroll down the map this method is called.

Parameters:
y_value - The coordinate of the top of viewport window that the map is to be drawn at.
 o pairwiseCanvasResized
 public void pairwiseCanvasResized(Dimension d)
Called when the viewport window size is changed. This is called when the user resizes the component.

Parameters:
d - The new size of the canvas
 o getCompleteMapSize
 public Dimension getCompleteMapSize()
Returns the complete size of the pairwise comparative map, not just the viewport size.

 o invertMap
 public void invertMap(boolean LHS_map)
Inverts a map- draws it upside down.

Parameters:
LHS_map - Set to true if the left-hand side map is to be inverted
 o swapMaps
 public void swapMaps()
Swaps the maps. Swaps the map on the left-hand side for the one on the right-hand side.

 o resizeSausage
 public void resizeSausage(boolean LHS_Map,
                           int value)
Sets the size of a map sausage.

Parameters:
LHS_Map - Whether you want to set the sausage size on the LHS map or the RHS map
value - The length in pixels you want the map to be.
 o mouseClicked
 public void mouseClicked(MouseEvent parm1)
Called when there's a mouse click on the canvas. If the mouse is in a locus label, it is highlighted along with any other homologous loci. When a double click occurs in a locus, the relevent database URL is acquired.

 o clickInAdjacentMap
 public void clickInAdjacentMap(String locusName)
This method is called when there is a click in a pairwise map that is sitting adjacent to this one and there has been a click in it.

 o mousePressed
 public void mousePressed(MouseEvent parm1)
Not used.

 o mouseReleased
 public void mouseReleased(MouseEvent parm1)
Not used.

 o mouseEntered
 public void mouseEntered(MouseEvent parm1)
Not used.

 o mouseExited
 public void mouseExited(MouseEvent parm1)
Not used.

 o addActionListener
 public synchronized void addActionListener(ActionListener l)
Add an action listener.

 o removeActionListener
 public synchronized void removeActionListener(ActionListener l)
Remove an action listener.

 o processActionEvent
 protected void processActionEvent(ActionEvent e)

All Packages  Class Hierarchy  This Package  Previous  Next  Index