gov.lbl.genome.gui
Class AbstractCurveView

java.lang.Object
  extended by gov.lbl.genome.gui.AbstractCurveView
All Implemented Interfaces:
CurveView, java.lang.Cloneable
Direct Known Subclasses:
PValueCurveView, VistaCurveView

public abstract class AbstractCurveView
extends java.lang.Object
implements CurveView, java.lang.Cloneable

Title: AbstractCurveView

Description: This abstract class privides general curve drawing operations.
all real curves and images must be produced from this class

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

Company: LBNL


Field Summary
protected  double adjustedGraphHeight
           
protected  double adjustedGraphWidth
           
protected  java.awt.Color curveColor
           
protected  java.awt.Graphics2D g2d
           
protected  GeneralGraphView graphView
           
protected  int height
           
protected  int lineNumber
           
protected  int marginLeft
           
protected  int marginRight
           
protected  int marginTop
           
protected  double maxX
           
protected  double maxY
           
protected  double minX
           
protected  double minY
           
protected  CurveModel model
           
protected  int nPoints
           
protected  Parameter param
           
protected  double realGraphHeight
           
protected  double realGraphWidth
           
protected  java.awt.Stroke stroke
           
protected  VistaApp va
           
protected  int width
           
protected  double xDifference
           
protected  int[] xPoints
           
protected  double yDifference
           
protected  int[] yPoints
           
 
Constructor Summary
AbstractCurveView()
           
 
Method Summary
 java.lang.Object clone()
          clone
protected  int convertX(double x)
          convert graph coordinate into the screen coordinate
protected  int convertX(long x)
          convert graph coordinate into the screen coordinate
protected  float convertY(double y)
          convert graph coordinate into the screen coordinate
 CurveModel getCurveModel()
          return Curve Model
 GeneralGraphView getGraphView()
          return Graph View
 double getMaxX()
          get Max X
 double getMaxY()
          get Max Y
 double getMinX()
          get Min X
 double getMinY()
          get Min Y
 double getWidth()
          return adjusted graph width
 void refresh(long minX, long maxX)
          request new information from the server
protected  void renderInitialize()
          Initialize rendered This should be called every time the curve is rendered.
 void reRenderOff()
          switch reRender Off
 void reRenderOn()
          switch reRender On
 void setCurveModel(CurveModel model)
          set Curve Model
 void setGraphView(GeneralGraphView graphView)
          set Graph View
 void setLineNumber(int line)
          set Line Number
 void setMarginLeft(int x)
          set Left Margin
 void setMarginRight(int x)
          set Right Margin
 void setMarginTop(int y)
          set Top Margin
 void setMaxX(double x)
          set Max X
 void setMaxY(double y)
          set Max Y
 void setMinX(double x)
          set Min X
 void setMinY(double y)
          set Min Y
 void setSize(double width, double height)
          set Size
 void setStroke(java.awt.Stroke stroke)
          set Stroke
 java.lang.String toString()
          return text column with all points
protected  long xDisplay(int x)
          convert screen coordinate into the graph coordinate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.lbl.genome.gui.CurveView
render
 

Field Detail

model

protected CurveModel model

graphView

protected GeneralGraphView graphView

stroke

protected java.awt.Stroke stroke

curveColor

protected java.awt.Color curveColor

minY

protected double minY

maxY

protected double maxY

yDifference

protected double yDifference

minX

protected double minX

maxX

protected double maxX

xDifference

protected double xDifference

realGraphHeight

protected double realGraphHeight

realGraphWidth

protected double realGraphWidth

adjustedGraphHeight

protected double adjustedGraphHeight

adjustedGraphWidth

protected double adjustedGraphWidth

va

protected VistaApp va

g2d

protected java.awt.Graphics2D g2d

xPoints

protected int[] xPoints

yPoints

protected int[] yPoints

nPoints

protected int nPoints

lineNumber

protected int lineNumber

marginLeft

protected int marginLeft

marginRight

protected int marginRight

marginTop

protected int marginTop

width

protected int width

height

protected int height

param

protected Parameter param
Constructor Detail

AbstractCurveView

public AbstractCurveView()
Method Detail

setLineNumber

public void setLineNumber(int line)
set Line Number

Parameters:
line - int

getMinX

public double getMinX()
get Min X

Returns:
double

getMaxX

public double getMaxX()
get Max X

Returns:
double

getMinY

public double getMinY()
get Min Y

Returns:
double

getMaxY

public double getMaxY()
get Max Y

Returns:
double

setMinX

public void setMinX(double x)
set Min X

Parameters:
x - double

setMaxX

public void setMaxX(double x)
set Max X

Parameters:
x - double

setMinY

public void setMinY(double y)
set Min Y

Parameters:
y - double

setMaxY

public void setMaxY(double y)
set Max Y

Parameters:
y - double

reRenderOff

public void reRenderOff()
switch reRender Off


reRenderOn

public void reRenderOn()
switch reRender On


setSize

public void setSize(double width,
                    double height)
set Size

Parameters:
width - double
height - double

getWidth

public double getWidth()
return adjusted graph width

Returns:
double

renderInitialize

protected void renderInitialize()
Initialize rendered This should be called every time the curve is rendered.


setGraphView

public void setGraphView(GeneralGraphView graphView)
set Graph View

Specified by:
setGraphView in interface CurveView
Parameters:
graphView - GeneralGraphView

getGraphView

public GeneralGraphView getGraphView()
return Graph View

Specified by:
getGraphView in interface CurveView
Returns:
GeneralGraphView

getCurveModel

public CurveModel getCurveModel()
return Curve Model

Specified by:
getCurveModel in interface CurveView
Returns:
CurveModel

setCurveModel

public void setCurveModel(CurveModel model)
set Curve Model

Specified by:
setCurveModel in interface CurveView
Parameters:
model - CurveModel

setStroke

public void setStroke(java.awt.Stroke stroke)
set Stroke

Parameters:
stroke - Stroke

convertX

protected final int convertX(double x)
convert graph coordinate into the screen coordinate

Parameters:
x - double
Returns:
int

convertX

protected final int convertX(long x)
convert graph coordinate into the screen coordinate

Parameters:
x - long
Returns:
int

xDisplay

protected long xDisplay(int x)
convert screen coordinate into the graph coordinate

Parameters:
x - int
Returns:
long

convertY

protected final float convertY(double y)
convert graph coordinate into the screen coordinate

Parameters:
y - double
Returns:
float

refresh

public void refresh(long minX,
                    long maxX)
request new information from the server

Specified by:
refresh in interface CurveView
Parameters:
minX - long
maxX - long
See Also:
CurveModel.refresh(VistaApp,long,long)

toString

public java.lang.String toString()
return text column with all points

Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
clone

Overrides:
clone in class java.lang.Object
Returns:
Object

setMarginLeft

public void setMarginLeft(int x)
set Left Margin

Parameters:
x - int

setMarginRight

public void setMarginRight(int x)
set Right Margin

Parameters:
x - int

setMarginTop

public void setMarginTop(int y)
set Top Margin

Parameters:
y - int