public class TLine extends TShape
| Modifier and Type | Field and Description |
|---|---|
protected TPoint |
end1 |
protected java.awt.Rectangle |
end1Rect |
protected TPoint |
end2 |
protected java.awt.Rectangle |
end2Rect |
protected java.awt.geom.Line2D |
line |
color, fillShape, hitRect, stroke, visiblecoordinateStrBuilder, coordsEditTrigger, coordsVisibleInMouseBox, enabled, screenPt, stepEditTrigger, support, trackEditTrigger, worldPt| Constructor and Description |
|---|
TLine()
Constructs a default TLine with end points at (0, 0).
|
TLine(double x1,
double y1,
double x2,
double y2)
Constructs a TLine with specified end points.
|
| Modifier and Type | Method and Description |
|---|---|
Interactive |
findInteractive(DrawingPanel panel,
int xpix,
int ypix)
Returns the interactive drawable object at the specified pixel
position.
|
TPoint |
getEnd1()
Gets end 1.
|
TPoint |
getEnd2()
Gets end 2.
|
protected java.awt.Shape |
getShape(VideoPanel vidPanel)
Gets the shape to be filled in the draw method.
|
void |
setStroke(java.awt.BasicStroke stroke)
Overrides TShape setStroke method.
|
void |
setXY(double x,
double y)
Sets the x and y positions in imagespace.
|
draw, getBounds, getColor, getStroke, isVisible, setColor, setHitRectCenter, setVisible, toStringaddPropertyChangeListener, addPropertyChangeListener, angle, angle, center, cos, cos, equals, getFrameNumber, getScreenPosition, getWorldPosition, getXMax, getXMin, getYMax, getYMin, isCoordsEditTrigger, isEnabled, isMeasured, isStepEditTrigger, isTrackEditTrigger, removePropertyChangeListener, removePropertyChangeListener, setCoordsEditTrigger, setEnabled, setLocation, setPositionOnLine, setScreenPosition, setScreenPosition, setStepEditTrigger, setTrackEditTrigger, setX, setY, showCoordinates, sin, sin, translateclone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocationfinalize, getClass, notify, notifyAll, wait, wait, waitgetX, getYprotected java.awt.geom.Line2D line
protected TPoint end1
protected TPoint end2
protected java.awt.Rectangle end1Rect
protected java.awt.Rectangle end2Rect
public TLine()
public TLine(double x1,
double y1,
double x2,
double y2)
x1 - x position of end 1y1 - y position of end 1x2 - x position of end 2y2 - y position of end 2public TPoint getEnd1()
public TPoint getEnd2()
public void setStroke(java.awt.BasicStroke stroke)
public void setXY(double x,
double y)
setXY in interface InteractivesetXY in class TPointx - the x positiony - the y positionpublic Interactive findInteractive(DrawingPanel panel, int xpix, int ypix)
findInteractive in interface InteractivefindInteractive in class TShapepanel - the drawing panelxpix - the x pixel position on the panelypix - the y pixel position on the panelprotected java.awt.Shape getShape(VideoPanel vidPanel)