|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object view.PaintChart
public class PaintChart
Title: Bioinformatics Project
Description: Genomes Comparacent
Copyright: Copyright (c) 2005-2006
PaintChart is the class that draws the computated table into a chart.
Field Summary | |
---|---|
(package private) org.eclipse.swt.graphics.Color |
blue
Canvas colors, red for the scale. |
private org.eclipse.swt.graphics.Rectangle |
bounds
The chart group bounds from the reults tab. |
(package private) org.eclipse.swt.widgets.Canvas |
canvas
Chart canvas. |
private org.eclipse.swt.widgets.Composite |
comp
Data view shell, in order to view with it the canvas. |
(package private) org.eclipse.swt.graphics.Color |
red
Canvas colors, red for the scale. |
private int |
tableLineNumber
Used for statistics. |
Constructor Summary | |
---|---|
PaintChart(org.eclipse.swt.widgets.Composite sh,
org.eclipse.swt.graphics.Rectangle rec)
C'tor, initiates the chart variables. |
Method Summary | |
---|---|
void |
drawChart(java.util.Vector vec,
long length1,
long length2,
org.eclipse.swt.widgets.ProgressBar pb)
Draws the whole chart in the canvas, uses the method PaintLineInChart in order to draw each line extracted from the line vector. |
void |
drawScale(long length1,
long length2)
Draws the scale of the canvas according to the genome lengths. |
private int |
getDigNum(long num)
Returns number of the digits in a given number. |
private double |
getLastDig(double num,
int digitNum)
Converts a number of regular digits number to 1 digit multiplyed with 10^number of the rest of the digits. |
java.lang.String |
getTableLineNumber()
Returns number of the lines in the given vector. |
private void |
PaintLineInChart(Line line,
long length1,
long length2)
Paints a single given line in the chart, its "resizes" the line according to the chart scale (genomes length). |
private int |
pow(int i,
int j)
Calculates regular power function : i^j. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
org.eclipse.swt.widgets.Canvas canvas
org.eclipse.swt.graphics.Color red
org.eclipse.swt.graphics.Color blue
private org.eclipse.swt.widgets.Composite comp
private org.eclipse.swt.graphics.Rectangle bounds
private int tableLineNumber
Constructor Detail |
---|
public PaintChart(org.eclipse.swt.widgets.Composite sh, org.eclipse.swt.graphics.Rectangle rec)
sh
- rec
- Method Detail |
---|
private void PaintLineInChart(Line line, long length1, long length2)
line
- Line: given line.length1
- long: 1st genome length.length2
- long: 2nd genome length.public void drawChart(java.util.Vector vec, long length1, long length2, org.eclipse.swt.widgets.ProgressBar pb)
vec
- Vector: give lines vector.length1
- long: 1st genome length.length2
- long: 2nd genome length.pb
- ProgressBar: results tab progress bar in order to update it accordingly.private int getDigNum(long num)
num
- long: given number.
private double getLastDig(double num, int digitNum)
num
- int: given number.digitNum
- int: given number digits.
private int pow(int i, int j)
i
- int: base number.j
- int: power.
public void drawScale(long length1, long length2)
length1
- long: 1st genome length.length2
- long: 2nd genome length.public java.lang.String getTableLineNumber()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |