|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infai.emo.matcher.editor.util.Line
public class Line
Class caches all necessary informations for a line which is needed to visualize a matching between two Elements of the Comparison.
Field Summary | |
---|---|
private org.eclipse.swt.graphics.Color |
color
The color of the line. |
private boolean |
leftToRight
This flag indicates whether the line was drawn from the leftTree to the right or the other way. |
private int |
lineStyle
The SWT-lineStyle for this line. |
private int |
lineWidth
The width of the line. |
private java.util.Hashtable<java.lang.String,java.lang.Double> |
matchingDetails
This Hashtable caches the atomic matching-values for this tuple. |
private double |
matchingValue
The value of the matching for this tuple. |
private org.eclipse.swt.events.PaintListener |
paintListener
The PaintListener that was used to draw this line. |
private boolean |
selected
This flag shows if the user selected this line on the canvas. |
private Tuple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> |
tuple
The tuple of elements which is connected by this line. |
private int |
xl
The x-coordinate of the left end of the line. |
private int |
xr
The x-coordinate of the right end of the line. |
private int |
yl
The y-coordinate of the left end of the line. |
private int |
yr
The y-coordinate of the right end of the line. |
Constructor Summary | |
---|---|
Line(int xl,
int yl,
int xr,
int yr,
int red,
int green,
int blue)
Constructor to draw a line without a tuple. |
|
Line(int xl,
int yl,
int xr,
int yr,
int red,
int green,
int blue,
Tuple tuple,
double value,
boolean leftToRight)
Constructor to draw a line with an attached tuple. |
Method Summary | |
---|---|
org.eclipse.swt.graphics.Color |
getColor()
|
int |
getLineStyle()
|
int |
getLineWidth()
|
java.util.Hashtable<java.lang.String,java.lang.Double> |
getMatchingDetails()
|
double |
getMatchingValue()
|
org.eclipse.swt.events.PaintListener |
getPaintListener()
|
Tuple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> |
getTuple()
|
int |
getXl()
|
int |
getXr()
|
int |
getYl()
|
int |
getYr()
|
boolean |
isLeftToRight()
|
boolean |
isSelected()
|
void |
setColor(org.eclipse.swt.graphics.Color color)
|
void |
setMatchingDetails(java.util.Vector<Matching> matchings)
|
void |
setPaintListener(org.eclipse.swt.events.PaintListener paintListener)
|
void |
setSelected(boolean selected)
Sets the parameter selected and changes the lineStyle and lineWidth. |
void |
setTuple(Tuple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> tuple)
|
void |
setXl(int xl)
|
void |
setXr(int xr)
|
void |
setYl(int yl)
|
void |
setYr(int yr)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private int xl
private int yl
private int xr
private int yr
private org.eclipse.swt.graphics.Color color
Color
private boolean selected
private int lineStyle
SWT.LINE_SOLID
.
SWT
private int lineWidth
private Tuple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> tuple
Tuple
private double matchingValue
private java.util.Hashtable<java.lang.String,java.lang.Double> matchingDetails
Hashtable
,
Constants
private org.eclipse.swt.events.PaintListener paintListener
PaintListener
private boolean leftToRight
Constructor Detail |
---|
public Line(int xl, int yl, int xr, int yr, int red, int green, int blue, Tuple tuple, double value, boolean leftToRight)
xl
- the left x-coordinate.yl
- the left y-coordinate.xr
- the right x-coordinate.yr
- the right y-coordinate.red
- the red-value of the line-color.green
- the green-value of the line-color.blue
- the blue-value of the line-color.tuple
- the tuple that is represented by this line.value
- the matching-value for this tuple.Tuple
public Line(int xl, int yl, int xr, int yr, int red, int green, int blue)
xl
- the left x-coordinate.yl
- the left y-coordinate.xr
- the right x-coordinate.yr
- the right y-coordinate.red
- the red-value of the line-color.green
- the green-value of the line-color.blue
- the blue-value of the line-color.Method Detail |
---|
public int getXl()
public void setXl(int xl)
xl
- the left x-coordinate of the linepublic int getYl()
public void setYl(int yl)
yl
- the left y-coordinate of the linepublic int getXr()
public void setXr(int xr)
xr
- the right x-coordinate of the linepublic int getYr()
public void setYr(int yr)
yr
- the right y-coordinate of the linepublic org.eclipse.swt.graphics.Color getColor()
public boolean isSelected()
public void setSelected(boolean selected)
selected
- true to select the line.public int getLineStyle()
public int getLineWidth()
public Tuple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> getTuple()
public double getMatchingValue()
public java.util.Hashtable<java.lang.String,java.lang.Double> getMatchingDetails()
public void setMatchingDetails(java.util.Vector<Matching> matchings)
matchingDetails
- a whole set of matching-details for all lines or a single line (the method filters out the right one).public org.eclipse.swt.events.PaintListener getPaintListener()
public void setPaintListener(org.eclipse.swt.events.PaintListener paintListener)
paintListener
- the paintListener to setpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean isLeftToRight()
public void setTuple(Tuple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> tuple)
tuple
- the tuple to setpublic void setColor(org.eclipse.swt.graphics.Color color)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |