public class TShape extends TPoint
| Modifier and Type | Field and Description |
|---|---|
protected java.awt.Color |
color |
protected java.awt.Shape |
fillShape |
protected static java.awt.Rectangle |
hitRect |
protected java.awt.BasicStroke |
stroke |
protected boolean |
visible |
coordinateStrBuilder, coordsEditTrigger, coordsVisibleInMouseBox, enabled, screenPt, stepEditTrigger, support, trackEditTrigger, worldPt| Constructor and Description |
|---|
TShape()
Constructs a TPoint object with coordinates (0, 0).
|
TShape(double x,
double y)
Constructs a TPoint object with specified image coordinates.
|
TShape(java.awt.geom.Point2D point)
Constructs a TPoint object with image coordinates specified by
a Point2D (commonly another TPoint).
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics _g)
Overrides TPoint draw method.
|
Interactive |
findInteractive(DrawingPanel panel,
int xpix,
int ypix)
Overrides TPoint findInteractive method.
|
java.awt.Rectangle |
getBounds(VideoPanel vidPanel)
Gets the screen bounds of the shape.
|
java.awt.Color |
getColor()
Gets the color of the shape.
|
protected java.awt.Shape |
getShape(VideoPanel vidPanel)
Gets the shape to be filled in the draw method.
|
java.awt.BasicStroke |
getStroke()
Gets the stroke.
|
boolean |
isVisible()
Gets the current visible state.
|
void |
setColor(java.awt.Color color)
Sets the color of the shape.
|
protected void |
setHitRectCenter(int xpix,
int ypix)
Centers the hit testing rectangle on the specified screen point.
|
void |
setStroke(java.awt.BasicStroke stroke)
Sets the stroke.
|
void |
setVisible(boolean visible)
Sets the visible state.
|
java.lang.String |
toString()
Returns a String describing this TPoint.
|
addPropertyChangeListener, 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, setXY, setY, showCoordinates, sin, sin, translateclone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocationfinalize, getClass, notify, notifyAll, wait, wait, waitgetX, getYprotected static java.awt.Rectangle hitRect
protected java.awt.Color color
protected boolean visible
protected java.awt.Shape fillShape
protected java.awt.BasicStroke stroke
public TShape()
public TShape(double x,
double y)
x - the x coordinatey - the y coordinatepublic TShape(java.awt.geom.Point2D point)
point - the Point2Dpublic void setColor(java.awt.Color color)
color - the desired colorpublic java.awt.Color getColor()
public void setStroke(java.awt.BasicStroke stroke)
stroke - the desired strokepublic java.awt.BasicStroke getStroke()
public java.awt.Rectangle getBounds(VideoPanel vidPanel)
public void setVisible(boolean visible)
visible - true to make this visible.public boolean isVisible()
true if this is visible.public void draw(DrawingPanel panel, java.awt.Graphics _g)
public Interactive findInteractive(DrawingPanel panel, int xpix, int ypix)
findInteractive in interface InteractivefindInteractive in class TPointpanel - the drawing panelxpix - the x pixel position on the panelypix - the y pixel position on the panelpublic java.lang.String toString()
protected java.awt.Shape getShape(VideoPanel vidPanel)
vidPanel - the video panelprotected void setHitRectCenter(int xpix,
int ypix)
xpix - the x pixel positionypix - the y pixel position