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.
-
PairwiseCanvas(Dimension)
- Default constructor.
-
PairwiseCanvas(PairwiseComparativeMapData, Dimension)
- Pass in the PairwiseComparativeMapData object to process.
-
addActionListener(ActionListener)
- Add an action listener.
-
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.
-
getCompleteMapSize()
- Returns the complete size of the pairwise comparative map, not just the viewport
size.
-
invertMap(boolean)
- Inverts a map- draws it upside down.
-
isSingleMap()
- Returns true if there is only one chromosomal map and false if there are two.
-
mouseClicked(MouseEvent)
- Called when there's a mouse click on the canvas.
-
mouseEntered(MouseEvent)
- Not used.
-
mouseExited(MouseEvent)
- Not used.
-
mousePressed(MouseEvent)
- Not used.
-
mouseReleased(MouseEvent)
- Not used.
-
paint(Graphics)
-
-
pairwiseCanvasResized(Dimension)
- Called when the viewport window size is changed.
-
processActionEvent(ActionEvent)
-
-
processData(PairwiseComparativeMapData)
- Processes data for presentation on screen.
-
removeActionListener(ActionListener)
- Remove an action listener.
-
resizeSausage(boolean, int)
- Sets the size of a map sausage.
-
scrollMap(int)
- When the user wants to scroll down the map this method is called.
-
swapMaps()
- Swaps the maps.
-
update(Graphics)
-
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).
PairwiseCanvas
public PairwiseCanvas(PairwiseComparativeMapData data,
Dimension initialSize)
- Pass in the PairwiseComparativeMapData object to process.
processData
public void processData(PairwiseComparativeMapData data)
- Processes data for presentation on screen.
isSingleMap
public boolean isSingleMap()
- Returns true if there is only one chromosomal map and false if there are two.
update
public void update(Graphics g)
- Overrides:
- update in class Component
paint
public void paint(Graphics g)
- Overrides:
- paint in class Canvas
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.
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
getCompleteMapSize
public Dimension getCompleteMapSize()
- Returns the complete size of the pairwise comparative map, not just the viewport
size.
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
swapMaps
public void swapMaps()
- Swaps the maps. Swaps the map on the left-hand side for the one on the right-hand side.
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.
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.
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.
mousePressed
public void mousePressed(MouseEvent parm1)
- Not used.
mouseReleased
public void mouseReleased(MouseEvent parm1)
- Not used.
mouseEntered
public void mouseEntered(MouseEvent parm1)
- Not used.
mouseExited
public void mouseExited(MouseEvent parm1)
- Not used.
addActionListener
public synchronized void addActionListener(ActionListener l)
- Add an action listener.
removeActionListener
public synchronized void removeActionListener(ActionListener l)
- Remove an action listener.
processActionEvent
protected void processActionEvent(ActionEvent e)
All Packages Class Hierarchy This Package Previous Next Index
|