public abstract class Jaxo3PointObject extends JaxoParticleObject
| Modifier and Type | Field and Description |
|---|---|
static int |
SELECT_P3
Third point (index 2).
|
GHOST_DASH, GLUON_FREQ, PHOTON_FREQ, SCALAR_DASHSELECT_DX, SELECT_DY, SELECT_P2D_FORMAT, GRAY_SCALE_FORMAT, SELECT_NONE, SELECT_P1| Constructor and Description |
|---|
Jaxo3PointObject() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeSelected(int handle,
int mode)
Determines if the object can be selected (moved, edited, etc)
from the given point in a given edit mode.
|
void |
copyFrom(Jaxo3PointObject temp)
Sets all parameters from the given objet to the current one.
|
int |
getGrabbedHandle(int clickX,
int clickY,
JaxoHandle h)
Determines which handle the user has selected to move/resize/edit
an object.
|
int |
getPointCount()
Returns the number of points it takes to draw this object.
|
int |
getX(int index)
X coordinate of Point 0 <= index < getPointCount().
|
int |
getX3()
Returns the x coordinate of the first click point of this arc.
|
int |
getY(int index)
Y coordinate of Point 0 <= index < getPointCount().
|
int |
getY3()
Returns the y coordinate of the first click point of this arc.
|
boolean |
isCopy(JaxoObject comp)
Determines if this JaxoObject is a copy of the specified one.
|
protected boolean |
isOneLine()
Determines if the three points lie exactly on one line.
|
void |
moveBy(int deltaX,
int deltaY)
Reset the coordinates of the object when it is moved
by deltaX and deltaY.
|
void |
paintHandles(JaxoGraphics2D g2,
JaxoHandle h,
int editMode)
Paints the handles of this JaxoObject that allow
to move/resize/edit it.
|
void |
rescaleObject(int orx,
int ory,
float scale)
Rescale this JaxoObject by the scale factor scale,
keeping the point (orx, ory) fixed.
|
void |
set3Pts(int x1,
int y1,
int x2,
int y2,
int p3,
int q3)
Sets the points of this 3 point object.
|
void |
setX(int index,
int value)
Set X coordinate of Point 0 <= index < getPointCount() to 'value'.
|
void |
setX3(int newx3)
Sets the x coordinate of the first click point of this arc.
|
void |
setY(int index,
int value)
Set Y coordinate of Point 0 <= index < getPointCount() to 'value'.
|
void |
setY3(int newy3)
Sets the y coordinate of the first click point of this arc.
|
float |
smallestDistanceTo(int px,
int py)
Determines the smallest distance of any of the handles
of this JaxoObject from the given point.
|
arrowCoordinates, arrowPositionIs, copy, copyFrom, dashIs, dlSepIs, getAmp, getArrow, getArrowPosition, getDash, getDLSeparation, getWiggles, isDoubleLine, isFlip, isPaintArrow, paintArrow, setAmp, setArrow, setArrowPosition, setDash, setDLSeparation, setDoubleLine, setFlip, setPaintArrow, setPreferences, setState, setWigglescopyFrom, getHeight, getRadius, getRelh, getRelSize, getRelw, getSize, getStroke, getStrokeWidth, getWidth, getX2, getY2, latexWidth, resetStroke, setLocation, setRadius, setRelativeHeight, setRelativeWidth, setRelWAndH, setStroke, setStrokeWidth, setX2, setY2, strokeIsaddPropertyChangeListener, contains, contains, contains, contains, copyFrom, firePropertyChange, getBounds2D, getBoundsWithHandles, getColor, getGeneralPath, getLaTexLocation, getName, getPathIterator, getPathIterator, getPoints, getX, getY, intersects, intersects, isAround, isMarked, latexCommand, paint, paintVisualAid, prepareEditPanel, propertyChange, removePropertyChangeListener, setAsMarked, setColor, setLocation, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setPointCount, setPoints, setTransient, setX, setXPosition, setY, setYPositionpublic static final int SELECT_P3
public int getPointCount()
getPointCount in class JaxoExtendedObjectpublic int getX(int index)
getX in class JaxoExtendedObjectindex - The index of the point to get.public int getY(int index)
getY in class JaxoExtendedObjectindex - The index of the point to get.public void setX(int index,
int value)
setX in class JaxoExtendedObjectindex - The index of the point to set.value - The value to set.public void setY(int index,
int value)
setY in class JaxoExtendedObjectindex - The index of the point to set.value - The value to set.public final void setX3(int newx3)
newx3 - The x coordinate of the first click point of this arc.public final int getX3()
public final void setY3(int newy3)
newy3 - The y coordinate of the first click point of this arc.public final int getY3()
public final void set3Pts(int x1,
int y1,
int x2,
int y2,
int p3,
int q3)
x1 - The x coordinate of the first point.y1 - The y coordinate of the first point.x2 - The x coordinate of the second point.y2 - The y coordinate of the second point.p3 - The x coordinate of the third point.q3 - The y coordinate of the third point.public void copyFrom(Jaxo3PointObject temp)
temp - The object to copy from.public boolean isCopy(JaxoObject comp)
isCopy in class JaxoParticleObjectcomp - The JaxoObject to compare against.public void paintHandles(JaxoGraphics2D g2, JaxoHandle h, int editMode)
paintHandles in class JaxoExtendedObjectg2 - The corresponding graphics context.h - A handle object to be used for painting.editMode - The edit mode that the handles are being painted in.public float smallestDistanceTo(int px,
int py)
smallestDistanceTo in class JaxoExtendedObjectpx - The x coordinate of the test point.py - The y coordinate of the test point.public boolean canBeSelected(int handle,
int mode)
canBeSelected in class JaxoExtendedObjecthandle - One of the static variables SELECT_* defined for
this JaxoObject.mode - The current edit mode.public int getGrabbedHandle(int clickX,
int clickY,
JaxoHandle h)
getGrabbedHandle in class JaxoExtendedObjectclickX - The x coordinate where the mouse click has ocurred.clickY - The y coordinate where the mouse click has ocurred.h - A handle object.public void moveBy(int deltaX,
int deltaY)
moveBy in class JaxoExtendedObjectdeltaX - The x displacement.deltaY - The y displacement.public void rescaleObject(int orx,
int ory,
float scale)
rescaleObject in class JaxoObjectorx - The x-coordinate of the fixed point.ory - The y-coordinate of the fixed point.scale - The scale parameter.protected boolean isOneLine()
Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.