Drawable, Interactive, Measurable, TrackableDataToolTab.DataToolPlotter.XYAxes, PerspectiveFilter.Corner, TShapepublic class TPoint extends java.awt.geom.Point2D.Double implements Interactive, Trackable
| Modifier and Type | Field | Description |
|---|---|---|
protected TPoint |
attachedTo |
|
protected boolean |
coordsEditTrigger |
|
protected static boolean |
coordsVisibleInMouseBox |
|
protected boolean |
enabled |
|
protected boolean |
isAdjusting |
|
protected java.awt.Point |
screenPt |
|
protected boolean |
stepEditTrigger |
|
protected java.beans.PropertyChangeSupport |
support |
|
protected boolean |
trackEditTrigger |
|
protected java.awt.geom.Point2D |
worldPt |
|
protected static XYCoordinateStringBuilder |
xyStringBuilder |
| Constructor | Description |
|---|---|
TPoint() |
Constructs a TPoint with image coordinates (0, 0).
|
TPoint(double x,
double y) |
Constructs a TPoint with specified image coordinates.
|
TPoint(java.awt.geom.Point2D point) |
Constructs a TPoint with image coordinates specified by
a Point2D (commonly another TPoint).
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
Adds a PropertyChangeListener.
|
void |
addPropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener) |
Adds a PropertyChangeListener for a specified property.
|
double |
angle(double x,
double y) |
Returns the angle measured ccw from the positive x-axis to the line
between this TPoint and the specified coordinates.
|
double |
angle(java.awt.geom.Point2D pt) |
Returns the angle measured ccw from the positive x-axis to a line
that goes from this TPoint to the specified Point2D.
|
boolean |
attachTo(TPoint p) |
Attaches this TPoint to another so it follows it.
|
void |
center(java.awt.geom.Point2D pt1,
java.awt.geom.Point2D pt2) |
Centers this TPoint between the two specified points.
|
double |
cos(double x,
double y) |
Returns the cosine of the angle measured ccw from the positive x-axis
to the line between this TPoint and the specified coordinates.
|
double |
cos(java.awt.geom.Point2D pt) |
Returns the cosine of the angle measured ccw from the positive x-axis
to the line between this TPoint and the specified Point2D.
|
void |
detach() |
Detaches this TPoint.
|
void |
draw(DrawingPanel panel,
java.awt.Graphics _g) |
Empty draw method.
|
boolean |
equals(java.lang.Object obj) |
Compares this to the specified object.
|
Interactive |
findInteractive(DrawingPanel panel,
int xpix,
int ypix) |
Returns null.
|
java.awt.Rectangle |
getBounds(VideoPanel vidPanel) |
Gets the screen bounds of this object.
|
int |
getFrameNumber(VideoPanel vidPanel) |
Gets the frame number this TPoint uses for coordinate system
transforms and other identification.
|
java.awt.Point |
getScreenPosition(VideoPanel vidPanel) |
Gets the screen position of this TPoint on the specified VideoPanel.
|
java.awt.geom.Point2D |
getWorldPosition(VideoPanel vidPanel) |
Gets the world position of this TPoint on the specified VideoPanel.
|
double |
getXMax() |
Gets the maximum x needed to draw this object.
|
double |
getXMin() |
Gets the minimum x needed to draw this object.
|
double |
getYMax() |
Gets the maximum y needed to draw this object.
|
double |
getYMin() |
Gets the minimum y needed to draw this object.
|
boolean |
isAdjusting() |
Gets the adjusting flag.
|
boolean |
isAttached() |
Determines if this point is attached to another.
|
boolean |
isCoordsEditTrigger() |
Reports whether this is a coordsEditTrigger.
|
boolean |
isEnabled() |
Gets whether this responds to mouse hits.
|
boolean |
isMeasured() |
Reports whether information is available to set min/max values.
|
boolean |
isStepEditTrigger() |
Reports whether this is a stepEditTrigger.
|
boolean |
isTrackEditTrigger() |
Reports whether this is a trackEditTrigger.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
Removes a PropertyChangeListener.
|
void |
removePropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener) |
Removes a PropertyChangeListener for a specified property.
|
void |
setAdjusting(boolean adjusting) |
Sets the adjusting flag.
|
void |
setCoordsEditTrigger(boolean edit) |
Sets the coordsEditTrigger property.
|
void |
setEnabled(boolean enabled) |
Sets whether this responds to mouse hits.
|
void |
setLocation(double x,
double y) |
Overrides Point2D.Double setLocation method.
|
void |
setPositionOnLine(int xScreen,
int yScreen,
VideoPanel vidPanel,
TPoint end1,
TPoint end2) |
Sets the position of this point on the line between end1 and end2
nearest the specified screen position.
|
void |
setScreenPosition(int x,
int y,
VideoPanel vidPanel) |
Sets the screen position of this TPoint on the specified VideoPanel.
|
void |
setScreenPosition(int x,
int y,
VideoPanel vidPanel,
java.awt.event.InputEvent e) |
Sets the screen position of this TPoint.
|
void |
setStepEditTrigger(boolean stepEditTrigger) |
Sets the stepEditTrigger property.
|
void |
setTrackEditTrigger(boolean edit) |
Sets the trackEditTrigger property.
|
void |
setWorldPosition(double x,
double y,
VideoPanel vidPanel) |
Sets the world position of this TPoint on the specified VideoPanel.
|
void |
setX(double x) |
Sets the x position in imagespace.
|
void |
setXY(double x,
double y) |
Sets the x and y positions in imagespace.
|
void |
setY(double y) |
Sets the y position in imagespace.
|
void |
showCoordinates(VideoPanel vidPanel) |
Shows the world coordinates of this TPoint in the mouse box of
the specified VideoPanel.
|
double |
sin(double x,
double y) |
Returns the sine of the angle measured ccw from the positive x-axis
to the line between this TPoint and the specified coordinates.
|
double |
sin(java.awt.geom.Point2D pt) |
Returns the sine of the angle measured ccw from the positive x-axis
to the line between this TPoint and the specified Point2D.
|
java.lang.String |
toString() |
Returns a String describing this.
|
void |
translate(double dx,
double dy) |
Translates this TPoint by the specified displacement.
|
getX, getYfinalize, getClass, notify, notifyAll, wait, wait, waitprotected static boolean coordsVisibleInMouseBox
protected static XYCoordinateStringBuilder xyStringBuilder
protected boolean enabled
protected boolean trackEditTrigger
protected boolean coordsEditTrigger
protected boolean stepEditTrigger
protected boolean isAdjusting
protected java.awt.Point screenPt
protected java.awt.geom.Point2D worldPt
protected java.beans.PropertyChangeSupport support
protected TPoint attachedTo
public TPoint()
public TPoint(double x,
double y)
x - the x coordinatey - the y coordinatepublic TPoint(java.awt.geom.Point2D point)
point - the Point2Dpublic void draw(DrawingPanel panel, java.awt.Graphics _g)
public Interactive findInteractive(DrawingPanel panel, int xpix, int ypix)
findInteractive in interface Interactivepanel - the drawing panelxpix - the x pixel position on the panelypix - the y pixel position on the panelpublic void setX(double x)
setX in interface Interactivex - the x positionpublic void setY(double y)
setY in interface Interactivey - the y positionpublic void setXY(double x,
double y)
setXY in interface Interactivex - the x positiony - the y positionpublic void setLocation(double x,
double y)
setLocation in class java.awt.geom.Point2D.Doublex - the x positiony - the y positionpublic int getFrameNumber(VideoPanel vidPanel)
vidPanel - the video panelpublic java.awt.Point getScreenPosition(VideoPanel vidPanel)
vidPanel - the video panelpublic void setScreenPosition(int x,
int y,
VideoPanel vidPanel)
x - the screen x coordinatey - the screen y coordinatevidPanel - the video panelpublic void setScreenPosition(int x,
int y,
VideoPanel vidPanel,
java.awt.event.InputEvent e)
x - the screen x coordinatey - the screen y coordinatevidPanel - the video panele - the input event making the requestpublic java.awt.geom.Point2D getWorldPosition(VideoPanel vidPanel)
vidPanel - the video panelpublic void setWorldPosition(double x,
double y,
VideoPanel vidPanel)
x - the world x coordinatey - the world y coordinatevidPanel - the video panelpublic void showCoordinates(VideoPanel vidPanel)
vidPanel - the video panelpublic boolean attachTo(TPoint p)
p - the point to attach topublic void detach()
public boolean isAttached()
public void setEnabled(boolean enabled)
setEnabled in interface Interactiveenabled - true if this responds to mouse hits.public boolean isEnabled()
isEnabled in interface Interactivetrue if this responds to mouse hits.public void setTrackEditTrigger(boolean edit)
edit - true to make this a trackEditTrigger.public boolean isTrackEditTrigger()
true if this is a trackEditTrigger.public void setCoordsEditTrigger(boolean edit)
edit - true to make this a coordsEditTrigger.public boolean isCoordsEditTrigger()
true if this is a coordsEditTrigger.public void setStepEditTrigger(boolean stepEditTrigger)
stepEditTrigger - true to make this a stepEditTrigger.public boolean isStepEditTrigger()
true if this is a stepEditTrigger.public java.awt.Rectangle getBounds(VideoPanel vidPanel)
vidPanel - the video panelpublic boolean isMeasured()
isMeasured in interface Measurablefalsepublic double getXMin()
getXMin in interface Measurablepublic double getXMax()
getXMax in interface Measurablepublic double getYMin()
getYMin in interface Measurablepublic double getYMax()
getYMax in interface Measurablepublic double angle(double x,
double y)
x - the x coordinatey - the x coordinatepublic double angle(java.awt.geom.Point2D pt)
pt - the Point2Dpublic double sin(double x,
double y)
x - the x coordinatey - the x coordinatepublic double sin(java.awt.geom.Point2D pt)
pt - the Point2Dpublic double cos(double x,
double y)
x - the x coordinatey - the x coordinatepublic double cos(java.awt.geom.Point2D pt)
pt - the Point2Dpublic void center(java.awt.geom.Point2D pt1,
java.awt.geom.Point2D pt2)
pt1 - the first Point2Dpt2 - the second Point2Dpublic void translate(double dx,
double dy)
dx - the x displacement in imagespacedy - the y displacement in imagespacepublic void setAdjusting(boolean adjusting)
adjusting - true if being draggedpublic boolean isAdjusting()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - the object requesting property change notificationpublic void addPropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
property - the name of the property of interest to the listenerlistener - the object requesting property change notificationpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - the listener requesting removalpublic void removePropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
property - the name of the propertylistener - the listener to removepublic java.lang.String toString()
toString in class java.awt.geom.Point2D.Doublepublic boolean equals(java.lang.Object obj)
equals in class java.awt.geom.Point2Dobject - the objecttrue if this equals the specified objectpublic void setPositionOnLine(int xScreen,
int yScreen,
VideoPanel vidPanel,
TPoint end1,
TPoint end2)
xScreen - the x screen positionyScreen - the y screen positionvidPanel - the videoPanel drawing this pointend1 - one end of the lineend2 - the other end of the line