geofasc.swing.model
public interface LineSegmentModel extends FigureModel
LineSegmentModel is the interface for the data model of a line
segment figure. This interface is inherited from FigureModel.
A line is defined by its two restricting points.| Modifier and Type | Method and Description |
|---|---|
Point |
getFirstPoint()
Gets the first point of this model's line segment (the coordinates of the
point refer to the coordinate system of this model's line segment).
|
int |
getFirstPointX()
Gets the x-location of the first point of this model's line segment (the
coordinate refers to the coordinate system of this model's line segment).
|
int |
getFirstPointY()
Gets the y-location of the first point of this model's line segment (the
coordinate refers to the coordinate system of this model's line segment).
|
int |
getLength()
Gets the length of this model's line segment.
|
Point |
getSecondPoint()
Gets the second point of this model's line segment (the coordinates of
the point refer to the coordinate system of this model's line segment).
|
int |
getSecondPointX()
Gets the x-location of the second point of this model's line segment (the
coordinate refers to the coordinate system of this model's line segment).
|
int |
getSecondPointY()
Gets the y-location of the second point of this model's line segment (the
coordinate refers to the coordinate system of this model's line segment).
|
void |
setFirstPoint(int x,
int y)
Sets the first point of this model's line segment (the coordinates refer
to the coordinate system of this model's line segment).
|
void |
setFirstPoint(Point firstPoint)
Sets the first point of this model's line segment (the coordinates of the
point refer to the coordinate system of this model's line segment).
|
void |
setFirstPointX(int x)
Sets the x-location of the first point of this model's line segment (the
coordinate refers to the coordinate system of this model's line segment).
|
void |
setFirstPointY(int y)
Sets the y-location of the first point of this model's line segment (the
coordinate refers to the coordinate system of this model's line segment).
|
void |
setSecondPoint(int x,
int y)
Sets the second point of this model's line segment (the coordinates refer
to the coordinate system of this model's line segment).
|
void |
setSecondPoint(Point secondPoint)
Sets the second point of this model's line segment (the coordinates of
the point refer to the coordinate system of this model's line segment).
|
void |
setSecondPointX(int x)
Sets the x-location of the second point of this model's line segment (the
coordinate refers to the coordinate system of this model's line segment).
|
void |
setSecondPointY(int y)
Sets the y-location of the second point of this model's line segment (the
coordinate refers to the coordinate system of this model's line segment).
|
addChangeListener, getBounds, getBounds, getDirection, getFillColor, getHeight, getLineColor, getLocation, getLocationX, getLocationY, getSize, getWidth, isFilled, moveLocationBy, moveLocationBy, moveLocationBy, moveLocationXBy, moveLocationYBy, removeChangeListener, setDirection, setFillColor, setFilled, setLineColor, setLocation, setLocation, setLocationX, setLocationY, turnDirectionBy, turnDirectionToPoint getFirstPoint()
getFirstPointX(),
getFirstPointY()int getFirstPointX()
getFirstPointY(),
getFirstPoint()int getFirstPointY()
getFirstPointX(),
getFirstPoint()int getLength()
Point getSecondPoint()
getSecondPointX(),
getSecondPointY()int getSecondPointX()
getSecondPointY(),
getSecondPoint()int getSecondPointY()
getSecondPointX(),
getSecondPoint()void setFirstPoint(int x,
int y)
x - the new x-locationy - the new y-locationsetFirstPoint(Point),
setFirstPointX(int),
setFirstPointY(int)void setFirstPoint(Point firstPoint)
firstPoint - the new first pointsetFirstPoint(int, int),
setFirstPointX(int),
setFirstPointY(int)void setFirstPointX(int x)
x - the new x-locationsetFirstPointY(int),
setFirstPoint(Point),
setFirstPoint(int, int)void setFirstPointY(int y)
y - the new y-locationsetFirstPointX(int),
setFirstPoint(Point),
setFirstPoint(int, int)void setSecondPoint(int x,
int y)
x - the new x-location of the second pointy - the new y-location of the second pointsetSecondPoint(Point),
setSecondPointX(int),
setSecondPointY(int)void setSecondPoint(Point secondPoint)
secondPoint - the new second pointsetSecondPoint(int, int),
setSecondPointX(int),
setSecondPointY(int)void setSecondPointX(int x)
x - the new x-locationsetSecondPointY(int),
setSecondPoint(Point),
setSecondPoint(int, int)void setSecondPointY(int y)
y - the new y-locationsetSecondPointX(int),
setSecondPoint(Point),
setSecondPoint(int, int)