public class Line
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
BoxInGrid |
boxIG
Box where connection is going.
|
boolean |
endIsOriginal
If it is true then end of the line is connected directly to box
represented by object "boxIG".
|
int |
endX
If !endIsOriginal then these are the coordinates of a place where line is
connected.
|
int |
endY
If !endIsOriginal then these are the coordinates of a place where line is
connected.
|
double |
realEndX
Coordinates of connection in real numbers.
|
double |
realEndY
Coordinates of connection in real numbers.
|
double |
realStartX
Coordinates of connection in real numbers.
|
double |
realStartY
Coordinates of connection in real numbers.
|
boolean |
startIsOriginal
If it is true then start of the line is connected directly to box that is
represented by object that contains this Line object.
|
int |
startX
If !startIsOriginal then these are the coordinates of a place where line
is connected.
|
int |
startY
If !startIsOriginal then these are the coordinates of a place where line
is connected.
|
Constructor and Description |
---|
Line(BoxInGrid connectedBoxIG,
boolean startIsOriginal,
boolean endIsOriginal)
Creates Line object.
|
Modifier and Type | Method and Description |
---|---|
void |
setRealEndPoint(double realX,
double realY)
Sets realEndX and realEndY.
|
void |
setRealStartPoint(double realX,
double realY)
Sets realStartX and realStartY.
|
public BoxInGrid boxIG
public boolean endIsOriginal
public int endX
public int endY
public double realEndX
public double realEndY
public boolean startIsOriginal
public int startX
public int startY
public double realStartX
public double realStartY
public Line(BoxInGrid connectedBoxIG, boolean startIsOriginal, boolean endIsOriginal)
connectedBoxIG
- BoxInGrid that is connected to BoxInGrid object
that contains this Line.startIsOriginal
- True if line is directly connected to BoxInGrid
object that contains this Line object. False if it is connected to one of
the Boxes inside this box.endIsOriginal
- True if line is directly connected to BoxInGrid
object, link to which is kept in this Line object under name boxIG. False
if line is connected to one of the boxes that is inside boxIG.public void setRealStartPoint(double realX, double realY)
realX
- Real x coordinate of box from which line is going.realY
- Real y coordinate of box from which line is going.public void setRealEndPoint(double realX, double realY)
realX
- Real x coordinate of box to which line is going.realY
- Real y coordinate of box to which line is going.