Class Draw2Dplot

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--Draw2Dplot
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable
Direct Known Subclasses:
DrawScatterPlot

class Draw2Dplot
extends java.awt.Canvas
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener

This is a base class used for drawing 2D graphics plots. It contains code to draw axes, titles, captions, scale the data, overlay graphics, point event handlers, etc. In particular DrawScatterPlot, ExprProfileOverlay extend this class.

This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The MAExplorer Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.

Version:
$Date: 2003/07/07 21:42:38 $ $Revision: 1.12 $
Author:
P. Lemkin (NCI), G. Thornwall (SAIC), NCI-Frederick, Frederick, MD
See Also:
MAExplorer Home, DrawScatterPlot, ExprProfileOverlay, Serialized Form

Inner classes inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock
 
Field Summary
private  java.lang.String aText
          ARGS:
private  java.lang.String aTextOrig
          copy of original aText disp below title3
(package private)  CompositeDatabase cdb
          link to global CompositeDatabase instance
(package private)  int cvPrecision
          fraction precision reporting data
(package private)  float cx1
          clipped x1 for clipping divider
(package private)  float cx2
          clipped x2 for clipping divider
(package private)  float cy1
          clipped y1 for clipping divider
(package private)  float cy2
          clipped y2for clipping divider
(package private)  GeneList dispCL
          associated GeneList if not null
private  boolean draw180lineFlag
          flag: draw 180 degree line
private  boolean draw45lineFlag
          flag: draw 45 degree line
(package private)  boolean drawIntoImageFlag
          flag: set if draw plot to GIF file
(package private)  ExprProfileOverlay epov
          if ExprProfileOverlay is the parent, else null
(package private)  GeneList eventHandlerCL
          set to gene list being used
(package private)  Filter fc
          link to global Filter instance
private  java.awt.Font fontReg
          regular font
(package private)  java.awt.Graphics gScatterPlot
          Graphics context used with displayPlot
private  java.lang.String horizCaption
          ARGS: horizontal caption
private  int iFontHdrSize
           
private  int iFontSize
          integer regular font size
private  int iHeight
          working canvas height
private  java.lang.String info1
          ARGS:
private  java.lang.String info2
          ARGS:
private  java.lang.String info3
          ARGS:
private  java.lang.String info4
          ARGS:
private  int iWidth
          working canvas width
private  boolean[] jGrpList
          group # for EP [0:maxGenes-1]
private  boolean logScalingFlag
          flag: Linear(false)/Log(true)
(package private)  MAExplorer mae
          link to global instance
private  int[] mapPntToMid
          map point # in [0:nGroup*maxGenes] to [0:maxGenes]
(package private)  int maxLineList
          max allowed # of EGL genes
(package private)  double maxX
          max X range set in initial call
(package private)  double maxXscroll
          max X range set by ShowPlotPopup scrollers
(package private)  double maxY
          max X range set in initial call
(package private)  double maxYscroll
          max Y range set by ShowPlotPopup scrollers
(package private) static int MIN_CANVAS_HEIGHT
          default canvas height
(package private) static int MIN_CANVAS_WIDTH
          default canvas width
(package private)  double minX
          min X range set in initial call
(package private)  double minXscroll
          min X range set by ShowPlotPopup scrollers
(package private)  double minY
          min Y range set in initial call
(package private)  double minYscroll
          min Y range set by ShowPlotPopup scrollers
(package private)  MaHybridSample ms
          link to global MaHybridSample instance
(package private)  int nLineGroup
          # sequential points to connect group with line for use with EP 2D plot # of lines/line-group
(package private)  int nList
          # elements in x(y)(p)List[0:nList-1]
(package private)  int nPointsPlotted
          # points plotted.
(package private)  java.lang.String oGifFileName
          full Gif file path name
(package private)  OverlayMap olmap
          link to scatterplot named overlay maps instance
(package private)  int plotMode2D
          plot mode for spp
(package private)  int preferredHeight
          preferred canvas height
(package private)  int preferredWidth
          preferred canvas width
private  int[] propList
          property of data to draw
(package private)  double scaleX
          scale factor X-axis
(package private)  double scaleY
          scale factor X-axis
(package private)  boolean showNonFilteredGenesFlag
          show grayed out non-filtered genes
(package private)  ShowPlotPopup spp
          if ShowPlotPopup is the parent, else null
(package private) static int TARGET_SIZE
          target Size for selecting a line
private  java.lang.String title
          ARGS: horizontal caption
private  java.lang.String title1
          ARGS:
private  java.lang.String title2
          ARGS:
private  java.lang.String title3
          ARGS:
private  java.lang.String topTitle
          ARGS:
private  boolean useXaxisIntNbrFlag
          flag: label all vert lines w/int #
private  java.lang.String vertCaption
          ARGS: vertical caption
(package private)  float vx1
          viewport x1 for clipping divider
(package private)  float vx2
          viewport x2 for clipping divider
(package private)  float vy1
          viewport y1 for clipping divider
(package private)  float vy2
          viewport y2 for clipping divider
private  float xBase
          baseline for xxList to xPnt
(package private)  float[] xDataScatterPlot
          x Data for computing ratios when clicking
private  int[][] xLineList
          X values for only EGL gene points [0:nGroup-1][0:maxGenes-1]
(package private)  float[] xList
          ALL of actual X data points to draw [0:nList-1]
(package private)  int[] xPlotted
          x plot coordinate for clicking on point in list
private  int xPnt
          xList[] data mapped to int
private  float xScale
          slope for xList to xPnt
private  int xText
          --
private  float yBase
          baseline for yList to xyPnt
(package private)  float[] yDataScatterPlot
          y Data for computing ratios when clicking
private  int[][] yLineList
          Y values for only EGL gene points [0:nGroup-1][0:maxGenes-1]
(package private)  float[] yList
          ALL of actual Y data points to draw [0:nList-1]
(package private)  int[] yPlotted
          y plot coordinate for clicking on point in list
private  int yPnt
          yList[] data mapped to int
private  float yScale
          slope for yList to yPnt
private  int yText
          --
 
Fields inherited from class java.awt.Canvas
base, nameCounter, serialVersionUID
 
Fields inherited from class java.awt.Component
accessibleContext, actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dbg, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
(package private) Draw2Dplot(MAExplorer mae, int plotMode, ShowPlotPopup spp, ExprProfileOverlay epov, java.lang.String title, int nPoints, int nLineGroup, boolean useXaxisIntNbrFlag)
          Draw2Dplot() - constructor
 
Method Summary
private  int clipCodeViewport(float x, float y)
          clip_code_viewport(x,y) - Return the clipping code of where (x,y) is w.r.t.
(package private)  boolean clipViewport(float x1, float x2, float y1, float y2)
          clipViewport(x1,x2,y1,y2) - Compute if (x1,x2,y1,y2) is inside of Viewport window.
(package private)  void draw2Dplot(java.awt.Graphics g)
          draw2Dplot() - draw a plot in the current graphics context.
private  void drawCircle(java.awt.Graphics g, int xC, int yC, int radius, java.awt.Color color)
          drawCircle() - draw a circle as overlay graphic in specified color.
private  void drawFilledColoredCircle(java.awt.Graphics g, int x, int y, int radius, int red, int green, int blue)
          drawFilledColoredCircle() - draw filled circle of specified RGB color
private  void drawFilledGrayCircle(java.awt.Graphics g, int x, int y, int radius, int grayValue)
          drawFilledGrayCircle() - draw filled circle of specified grayvalue
private  void drawNamedOverlayMaps(java.awt.Graphics g, float scaleXplot, float scaleYplot, double minXscroll, double minYscroll, int xOffset, int yOffset)
          drawNamedOverlayMaps() try to draw overlay maps if there are any and they are enabled
private  void drawPlus(java.awt.Graphics g, int x, int y, java.awt.Color color)
          drawPlus() - draw plus sign as overlay graphic in specified color.
private  void drawRectangleBin(java.awt.Graphics g, int x, int y, int width, int height, java.awt.Color color)
          drawRectangleBin() - draw rectangle (histogram) bin as overlay graphic in specified color.
private  void drawSquare(java.awt.Graphics g, int xC, int yC, int radius, java.awt.Color color)
          drawSquare() - draw a square as overlay graphic in specified color.
 java.awt.Dimension getMinimumSize()
          getMinimumSize() - get the minimum preferred size
 java.awt.Dimension getPreferredSize()
          getPreferredSize() - get the preferred size
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
          mouseMoved() - process mouse event - update MouseOver
 void mousePressed(java.awt.event.MouseEvent e)
          mousePressed() - process mouse event, change current gene.
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void paint(java.awt.Graphics g)
          paint() - draw the 2D plot.
(package private)  void set2DplotSubtitles(java.lang.String info1, java.lang.String info2, java.lang.String info3, java.lang.String info4)
          set2DplotSubtitles() - set info1,2,3,4 subtitles for plot.
(package private)  void setDataToClip(float x1, float x2, float y1, float y2)
          setDataToClip() - set (cx1,cx2,cy1,cy2) data to clip from((x1,x2,y1,y2)
private  void setFontsFromState()
          setFontsFromState() - set the regular fonts from the state variables
(package private)  void setViewport(float vx1, float vx2, float vy1, float vy2)
          setViewport() - set the viewport (vx1,vx2,vy1,vy2) between two points.
(package private)  void update2Dplot(java.lang.String vertCaption, java.lang.String horizCaption, java.lang.String title, java.lang.String topTitle, java.lang.String title1, java.lang.String title2, java.lang.String title3, java.lang.String aText, int xText, int yText, double scaleX, double scaleY, double minX, double maxX, double minY, double maxY, boolean draw45lineFlag, boolean draw180lineFlag, float[] xList, float[] yList, int[] propList, GeneList dispCL, int nList, int[] mapPntToMid)
          update2Dplot() - set data for plot and then update the plot.
(package private)  void updateScaling(boolean logScalingFlag, boolean showNonFilteredGenesFlag)
          updateScaling() - set scaling mode in proper sub-object.
(package private)  void updateScrolledRegion(float x1Pos, float x2Pos, float y1Pos, float y2Pos)
          updateScrolledRegion() - update scrolled region to plot.
 
Methods inherited from class java.awt.Canvas
, addNotify, constructComponentName, getAccessibleContext, postsOldMouseEvents
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkGD, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createChildHierarchyEvents, createHierarchyEvents, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, dispatchEventImpl, doLayout, enable, enable, enableEvents, enableInputMethods, eventEnabled, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getMaximumSize, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, initIDs, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, layout, lightweightPaint, lightweightPrint, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, numListening, paintAll, paintHeavyweightComponents, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, printHeavyweightComponents, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, readObject, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, resetGC, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate, writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

mae

MAExplorer mae
link to global instance

ms

MaHybridSample ms
link to global MaHybridSample instance

fc

Filter fc
link to global Filter instance

cdb

CompositeDatabase cdb
link to global CompositeDatabase instance

epov

ExprProfileOverlay epov
if ExprProfileOverlay is the parent, else null

spp

ShowPlotPopup spp
if ShowPlotPopup is the parent, else null

olmap

OverlayMap olmap
link to scatterplot named overlay maps instance

plotMode2D

int plotMode2D
plot mode for spp

MIN_CANVAS_WIDTH

static final int MIN_CANVAS_WIDTH
default canvas width

MIN_CANVAS_HEIGHT

static final int MIN_CANVAS_HEIGHT
default canvas height

TARGET_SIZE

static final int TARGET_SIZE
target Size for selecting a line

preferredHeight

int preferredHeight
preferred canvas height

preferredWidth

int preferredWidth
preferred canvas width

iWidth

private int iWidth
working canvas width

iHeight

private int iHeight
working canvas height

xDataScatterPlot

float[] xDataScatterPlot
x Data for computing ratios when clicking

yDataScatterPlot

float[] yDataScatterPlot
y Data for computing ratios when clicking

xPlotted

int[] xPlotted
x plot coordinate for clicking on point in list

yPlotted

int[] yPlotted
y plot coordinate for clicking on point in list

vx1

float vx1
viewport x1 for clipping divider

vx2

float vx2
viewport x2 for clipping divider

vy1

float vy1
viewport y1 for clipping divider

vy2

float vy2
viewport y2 for clipping divider

cx1

float cx1
clipped x1 for clipping divider

cx2

float cx2
clipped x2 for clipping divider

cy1

float cy1
clipped y1 for clipping divider

cy2

float cy2
clipped y2for clipping divider

cvPrecision

int cvPrecision
fraction precision reporting data

nPointsPlotted

int nPointsPlotted
# points plotted. # points= #genes X #samples

eventHandlerCL

GeneList eventHandlerCL
set to gene list being used

gScatterPlot

java.awt.Graphics gScatterPlot
Graphics context used with displayPlot

drawIntoImageFlag

boolean drawIntoImageFlag
flag: set if draw plot to GIF file

oGifFileName

java.lang.String oGifFileName
full Gif file path name

vertCaption

private java.lang.String vertCaption
ARGS: vertical caption

horizCaption

private java.lang.String horizCaption
ARGS: horizontal caption

title

private java.lang.String title
ARGS: horizontal caption

topTitle

private java.lang.String topTitle
ARGS:

title1

private java.lang.String title1
ARGS:

title2

private java.lang.String title2
ARGS:

title3

private java.lang.String title3
ARGS:

info1

private java.lang.String info1
ARGS:

info2

private java.lang.String info2
ARGS:

info3

private java.lang.String info3
ARGS:

info4

private java.lang.String info4
ARGS:

aText

private java.lang.String aText
ARGS:

aTextOrig

private java.lang.String aTextOrig
copy of original aText disp below title3

iFontSize

private int iFontSize
integer regular font size

iFontHdrSize

private int iFontHdrSize

fontReg

private java.awt.Font fontReg
regular font

xText

private int xText
--

yText

private int yText
--

scaleX

double scaleX
scale factor X-axis

scaleY

double scaleY
scale factor X-axis

minX

double minX
min X range set in initial call

maxX

double maxX
max X range set in initial call

minY

double minY
min Y range set in initial call

maxY

double maxY
max X range set in initial call

minXscroll

double minXscroll
min X range set by ShowPlotPopup scrollers

minYscroll

double minYscroll
min Y range set by ShowPlotPopup scrollers

maxXscroll

double maxXscroll
max X range set by ShowPlotPopup scrollers

maxYscroll

double maxYscroll
max Y range set by ShowPlotPopup scrollers

showNonFilteredGenesFlag

boolean showNonFilteredGenesFlag
show grayed out non-filtered genes

logScalingFlag

private boolean logScalingFlag
flag: Linear(false)/Log(true)

draw45lineFlag

private boolean draw45lineFlag
flag: draw 45 degree line

draw180lineFlag

private boolean draw180lineFlag
flag: draw 180 degree line

useXaxisIntNbrFlag

private boolean useXaxisIntNbrFlag
flag: label all vert lines w/int #

xScale

private float xScale
slope for xList to xPnt

yScale

private float yScale
slope for yList to yPnt

xBase

private float xBase
baseline for xxList to xPnt

yBase

private float yBase
baseline for yList to xyPnt

xList

float[] xList
ALL of actual X data points to draw [0:nList-1]

yList

float[] yList
ALL of actual Y data points to draw [0:nList-1]

xLineList

private int[][] xLineList
X values for only EGL gene points [0:nGroup-1][0:maxGenes-1]

yLineList

private int[][] yLineList
Y values for only EGL gene points [0:nGroup-1][0:maxGenes-1]

mapPntToMid

private int[] mapPntToMid
map point # in [0:nGroup*maxGenes] to [0:maxGenes]

jGrpList

private boolean[] jGrpList
group # for EP [0:maxGenes-1]

xPnt

private int xPnt
xList[] data mapped to int

yPnt

private int yPnt
yList[] data mapped to int

propList

private int[] propList
property of data to draw

dispCL

GeneList dispCL
associated GeneList if not null

maxLineList

int maxLineList
max allowed # of EGL genes

nList

int nList
# elements in x(y)(p)List[0:nList-1]

nLineGroup

int nLineGroup
# sequential points to connect group with line for use with EP 2D plot # of lines/line-group
Constructor Detail

Draw2Dplot

Draw2Dplot(MAExplorer mae,
           int plotMode,
           ShowPlotPopup spp,
           ExprProfileOverlay epov,
           java.lang.String title,
           int nPoints,
           int nLineGroup,
           boolean useXaxisIntNbrFlag)
Draw2Dplot() - constructor
Parameters:
mae - is the MAExplorer instance
plotMode - is the 2D plot mode
spp - is the ShowPlotPopup instance
epov - is ExprProfileOverlay instance if not null
title - is window title
nPoints - is the # points= #genes X #samples
nLineGroup - # of lines/line-group. 1 for scatter plot
useXaxisIntNbrFlag - to label all vert lines w/int #
Method Detail

getPreferredSize

public java.awt.Dimension getPreferredSize()
getPreferredSize() - get the preferred size
Overrides:
getPreferredSize in class java.awt.Component
Returns:
window size

getMinimumSize

public java.awt.Dimension getMinimumSize()
getMinimumSize() - get the minimum preferred size
Overrides:
getMinimumSize in class java.awt.Component
Returns:
window size

setViewport

void setViewport(float vx1,
                 float vx2,
                 float vy1,
                 float vy2)
setViewport() - set the viewport (vx1,vx2,vy1,vy2) between two points.
Parameters:
vx1 - is viewport x1 coordinate
vx2 - is viewport x2 coordinate
vy1 - is viewport y1 coordinate
vy2 - is viewport y2 coordinate

setDataToClip

void setDataToClip(float x1,
                   float x2,
                   float y1,
                   float y2)
setDataToClip() - set (cx1,cx2,cy1,cy2) data to clip from((x1,x2,y1,y2)
Parameters:
x1 - is coordinate
x2 - is coordinate
y1 - is coordinate
y2 - is coordinate

clipCodeViewport

private int clipCodeViewport(float x,
                             float y)
clip_code_viewport(x,y) - Return the clipping code of where (x,y) is w.r.t. the DPORT Viewport clipping window. See Newman & Sproull (1979) pp 65-68 for discussion of algorithm.
Parameters:
x - is coordinate
y - is coordinate
Returns:
clipping code

clipViewport

boolean clipViewport(float x1,
                     float x2,
                     float y1,
                     float y2)
clipViewport(x1,x2,y1,y2) - Compute if (x1,x2,y1,y2) is inside of Viewport window. Copy initial data to (x1,x2,y1,y2) to (cx1,cx2,cy1,cy2). If not recompute (cx1,cx2, cy1, cy2) such that it is. If both points are outside of the window, then it can not be divided so return false else true. See Newman & Sproull (1979) pp 65-68 for discussion of algorithm.
Parameters:
x1 - is coordinate
x2 - is coordinate
y1 - is coordinate
y2 - is coordinate
Returns:
true if clipped and data is in (cx1,cx2,cy1,cy2).
See Also:
setDataToClip(float, float, float, float), clipCodeViewport(float, float)

paint

public void paint(java.awt.Graphics g)
paint() - draw the 2D plot.
Overrides:
paint in class java.awt.Canvas
Parameters:
g - is graphics context
See Also:
draw2Dplot(java.awt.Graphics)

drawPlus

private final void drawPlus(java.awt.Graphics g,
                            int x,
                            int y,
                            java.awt.Color color)
drawPlus() - draw plus sign as overlay graphic in specified color.
Parameters:
g - is graphics context
x - is center of object
y - is center of object
color - is color to draw

drawCircle

private final void drawCircle(java.awt.Graphics g,
                              int xC,
                              int yC,
                              int radius,
                              java.awt.Color color)
drawCircle() - draw a circle as overlay graphic in specified color. The color is optional and if null it draws it in green (blue). if mae.useDichromasyFlag then use blue.
Parameters:
g - is graphics context
x - is center of object
y - is center of object
radius - of object
color - is color to draw

drawSquare

private final void drawSquare(java.awt.Graphics g,
                              int xC,
                              int yC,
                              int radius,
                              java.awt.Color color)
drawSquare() - draw a square as overlay graphic in specified color. The color is optional and if null it draws it in green (blue). if useDichomasyFlag then use blue.
Parameters:
g - is graphics context
x - is center of object
y - is center of object
radius - of object
color - is color to draw

drawRectangleBin

private final void drawRectangleBin(java.awt.Graphics g,
                                    int x,
                                    int y,
                                    int width,
                                    int height,
                                    java.awt.Color color)
drawRectangleBin() - draw rectangle (histogram) bin as overlay graphic in specified color.
Parameters:
g - is graphics context
x - is center of object
y - is center of object
width - of object
height - of object
color - is color to draw

drawFilledGrayCircle

private final void drawFilledGrayCircle(java.awt.Graphics g,
                                        int x,
                                        int y,
                                        int radius,
                                        int grayValue)
drawFilledGrayCircle() - draw filled circle of specified grayvalue
Parameters:
g - is graphics context
x - is center of object
y - is center of object
radius - of object
grayvalue - is gray value color to draw

drawFilledColoredCircle

private final void drawFilledColoredCircle(java.awt.Graphics g,
                                           int x,
                                           int y,
                                           int radius,
                                           int red,
                                           int green,
                                           int blue)
drawFilledColoredCircle() - draw filled circle of specified RGB color
Parameters:
g - is graphics context
x - is center of object
y - is center of object
radius - of object
red - is red component of color
green - is green component of color
blue - is blue component of color

update2Dplot

void update2Dplot(java.lang.String vertCaption,
                  java.lang.String horizCaption,
                  java.lang.String title,
                  java.lang.String topTitle,
                  java.lang.String title1,
                  java.lang.String title2,
                  java.lang.String title3,
                  java.lang.String aText,
                  int xText,
                  int yText,
                  double scaleX,
                  double scaleY,
                  double minX,
                  double maxX,
                  double minY,
                  double maxY,
                  boolean draw45lineFlag,
                  boolean draw180lineFlag,
                  float[] xList,
                  float[] yList,
                  int[] propList,
                  GeneList dispCL,
                  int nList,
                  int[] mapPntToMid)
update2Dplot() - set data for plot and then update the plot. This is generally called through the PopupRegistry through the parent class.
Parameters:
vertCaption - vertical caption
horizCaption - is horizontal caption
title - is window titloe
topTitle - is top title in plot
title1 - is next top title in plot
title2 - is next top title in plot
title3 - is next top title in plot
aText - is bottom title in plot
xText - is bottom title in plot
yText - is bottom title in plot
scaleX - is global scaling
scaleY - is global scaling
minX - is min possible X
maxX - is max possible X range
minY - is min possible Y
maxY - is max possible Y range
draw45lineFlag -  
draw180lineFlag -  
xList[] - is list of X axis data points
yList - is list of Y axis data points
propList - is gene property list fo points (optional)
dispCL - is the display GeneList if not null
nList - is the # entries in List[]'s
mapPntToMid - is the expression profile overlay nHP*nGenes MIDs mapping
See Also:
paint(java.awt.Graphics), Component.repaint()

updateScrolledRegion

void updateScrolledRegion(float x1Pos,
                          float x2Pos,
                          float y1Pos,
                          float y2Pos)
updateScrolledRegion() - update scrolled region to plot.
Parameters:
x1Pos - in range 0.0:1.0
x2Pos - in range 0.0:1.0
y1Pos - in range 0.0:1.0
y2Pos - in range 0.0:1.0
See Also:
paint(java.awt.Graphics)

set2DplotSubtitles

void set2DplotSubtitles(java.lang.String info1,
                        java.lang.String info2,
                        java.lang.String info3,
                        java.lang.String info4)
set2DplotSubtitles() - set info1,2,3,4 subtitles for plot. Do not repaint.
Parameters:
info1 - is extra subtitles
info2 - is extra subtitles
info3 - is extra subtitles
info4 - is extra subtitles

setFontsFromState

private void setFontsFromState()
setFontsFromState() - set the regular fonts from the state variables

drawNamedOverlayMaps

private void drawNamedOverlayMaps(java.awt.Graphics g,
                                  float scaleXplot,
                                  float scaleYplot,
                                  double minXscroll,
                                  double minYscroll,
                                  int xOffset,
                                  int yOffset)
drawNamedOverlayMaps() try to draw overlay maps if there are any and they are enabled
Parameters:
g - is graphics context

draw2Dplot

void draw2Dplot(java.awt.Graphics g)
draw2Dplot() - draw a plot in the current graphics context.
Parameters:
g - is graphics context
See Also:
GeneList.isMIDinGeneList(int), Util.cvd2s(double, int), WriteGifEncoder, WriteGifEncoder.writeFile(java.lang.String), draw2Dplot(java.awt.Graphics), drawCircle(java.awt.Graphics, int, int, int, java.awt.Color), drawPlus(java.awt.Graphics, int, int, java.awt.Color), drawSquare(java.awt.Graphics, int, int, int, java.awt.Color), Component.repaint()

updateScaling

void updateScaling(boolean logScalingFlag,
                   boolean showNonFilteredGenesFlag)
updateScaling() - set scaling mode in proper sub-object. Linear(false)/Log(true) [DEPRICATED]
Parameters:
logScalingFlag - to do log scaling if set
showNonFilteredGenesFlag - if set
See Also:
Component.repaint()

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
mousePressed() - process mouse event, change current gene.
Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
e - is mouse pressed event
See Also:
DrawScatterPlot.mouseHandler(int, int, int, boolean), ExprProfileOverlay.mouseHandler(int, int, int, boolean)

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved() - process mouse event - update MouseOver
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Parameters:
e - is mouse moved event
See Also:
DrawScatterPlot.mouseHandler(int, int, int, boolean), ExprProfileOverlay.mouseHandler(int, int, int, boolean)

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener