org.infai.emo.matcher.editor.util
Class LineCalculations

java.lang.Object
  extended by org.infai.emo.matcher.editor.util.LineCalculations

public class LineCalculations
extends java.lang.Object

Class calculates the line-colors by the given threshold, step-size and base-color.

Version:
1.0.0
Author:
Stanley Hillner

Field Summary
private  org.eclipse.swt.graphics.Color color
          The basic color which the matchings with the lowest matching-value will have.
private  double stepsize
          The size of a step for the visualization.
private  double threshold
          The threshold from which on the lines will be drawn.
 
Constructor Summary
LineCalculations()
           
 
Method Summary
 org.eclipse.swt.graphics.Color getColor()
           
 java.util.Vector<org.eclipse.swt.graphics.Color> getLineColors()
           
 int getNumOfSteps()
           
 double getStepsize()
           
 double getThreshold()
           
 void setColor(org.eclipse.swt.graphics.Color color)
           
 void setStepsize(double stepsize)
           
 void setThreshold(double threshold)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

color

private org.eclipse.swt.graphics.Color color
The basic color which the matchings with the lowest matching-value will have.

See Also:
Color

threshold

private double threshold
The threshold from which on the lines will be drawn.


stepsize

private double stepsize
The size of a step for the visualization.

Constructor Detail

LineCalculations

public LineCalculations()
Method Detail

getNumOfSteps

public int getNumOfSteps()
Returns:
the total number of steps for the drawing.
The value will be calculated as ((1.0-threshold) / stepsize) + 1.

getLineColors

public java.util.Vector<org.eclipse.swt.graphics.Color> getLineColors()
Returns:
a Vector that contains all line-colors in a strong order.
the Vector can be accessed using the calculated step for a line.

getColor

public org.eclipse.swt.graphics.Color getColor()
Returns:
the color

setColor

public void setColor(org.eclipse.swt.graphics.Color color)
Parameters:
color - the color to set

getThreshold

public double getThreshold()
Returns:
the threshold

setThreshold

public void setThreshold(double threshold)
Parameters:
threshold - the threshold to set

getStepsize

public double getStepsize()
Returns:
the stepsize

setStepsize

public void setStepsize(double stepsize)
Parameters:
stepsize - the stepsize to set