gov.lbl.genome.gui.panel
Class ChromPanelPicture

java.lang.Object
  extended by gov.lbl.genome.gui.Picture
      extended by gov.lbl.genome.gui.panel.ChromPanelPicture

public class ChromPanelPicture
extends Picture

Title: ChromPanelPicture

Description: draw relative position on the whole chromosome ruler

Copyright: Copyright (c) 2002 Ernest Orlando Lawrence Berkeley National Laboratory

Company: LBNL


Field Summary
protected  double base
           
protected  double ln10
           
protected  double[] mbase
           
protected  double minor
           
 
Fields inherited from class gov.lbl.genome.gui.Picture
component, debug, df, g, g2d, G2D, height, image, imageableHeight, imageableWidth, marginBottom, marginLeft, marginRight, marginTop, maxHeight, maxWidth, name, pixelWidth, tooSmall, va, width, z
 
Constructor Summary
ChromPanelPicture(VistaApp vapp, java.lang.String name)
          ChromPanelPicture
 
Method Summary
protected  int convertX(double x)
          convert a chromosome coordinate into a screen coordinate
protected  int convertX(long x)
          convert a chromosome coordinate into a screen coordinate
 void drawPicture(java.awt.Graphics g)
          draw chromosome ruler Picture
 void drawPicture(java.awt.Graphics g, javax.swing.JComponent comp, long minx, long maxx)
          draw chromosome ruler Picture
 java.lang.String getFormattedXDisplayString(int currXPos)
          format the cursor position string
 long getXDisplay(int currXPos)
          convert screen coordinates into chromosome coordinates
 boolean isInside(int x)
          return true of mouse cursor is in the selected area
 boolean isNearEast(int x)
          return true if mouse cursor is near the east edge of the selected area
 boolean isNearWest(int x)
          return true if mouse cursor is near the west edge of the selected area
 
Methods inherited from class gov.lbl.genome.gui.Picture
debug, drawPicture, drawPicture, drawPicture, drawPicture, drawPicture, getDX, getFormattedNumberString, getFormattedNumberString, getHeight, getImage, getImage, getImage, getImage, getImage, getImageableHeight, getImageableWidth, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxHeight, getMaxWidth, getRelX, getRelX, getStringWidth, getWidth, setComponent, setDebug, setImageableArea, setImageableArea, setMarginRight, setMargins, setMargins, setMaxX, setMaxX, setMinMaxX, setMinMaxX, setMinX, setMinX, setPage, setSize, setSize, setSize, setSize, setZ, shortenString, toString, translate, translate, X, Y
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ln10

protected double ln10

mbase

protected double[] mbase

base

protected double base

minor

protected double minor
Constructor Detail

ChromPanelPicture

public ChromPanelPicture(VistaApp vapp,
                         java.lang.String name)
ChromPanelPicture

Parameters:
vapp - VistaApp
name - String
Method Detail

drawPicture

public void drawPicture(java.awt.Graphics g,
                        javax.swing.JComponent comp,
                        long minx,
                        long maxx)
draw chromosome ruler Picture

Parameters:
g - Graphics
comp - JComponent
minx - long
maxx - long

drawPicture

public void drawPicture(java.awt.Graphics g)
draw chromosome ruler Picture

Overrides:
drawPicture in class Picture
Parameters:
g - Graphics

convertX

protected int convertX(double x)
convert a chromosome coordinate into a screen coordinate

Overrides:
convertX in class Picture
Parameters:
x - double
Returns:
int

convertX

protected int convertX(long x)
convert a chromosome coordinate into a screen coordinate

Overrides:
convertX in class Picture
Parameters:
x - long
Returns:
int

getFormattedXDisplayString

public java.lang.String getFormattedXDisplayString(int currXPos)
format the cursor position string

Overrides:
getFormattedXDisplayString in class Picture
Parameters:
currXPos - int
Returns:
String

getXDisplay

public long getXDisplay(int currXPos)
convert screen coordinates into chromosome coordinates

Overrides:
getXDisplay in class Picture
Parameters:
currXPos - int
Returns:
long

isNearWest

public boolean isNearWest(int x)
return true if mouse cursor is near the west edge of the selected area

Parameters:
x - int
Returns:
boolean
See Also:
isNearEast(int), isInside(int)

isNearEast

public boolean isNearEast(int x)
return true if mouse cursor is near the east edge of the selected area

Parameters:
x - int
Returns:
boolean
See Also:
isNearWest(int), isInside(int)

isInside

public boolean isInside(int x)
return true of mouse cursor is in the selected area

Parameters:
x - int
Returns:
boolean
See Also:
isNearWest(int), isNearEast(int)