public abstract class JaxoLoopObject extends JaxoParticleObject
GHOST_DASH, GLUON_FREQ, PHOTON_FREQ, SCALAR_DASHSELECT_DX, SELECT_DY, SELECT_P2D_FORMAT, GRAY_SCALE_FORMAT, SELECT_NONE, SELECT_P1| Constructor and Description |
|---|
JaxoLoopObject() |
| Modifier and Type | Method and Description |
|---|---|
JaxoArrow.Coordinates |
arrowCoordinates()
Returns the coordinates of the arrow of the current object.
|
JaxoObject |
copy(JaxoLoopObject temp)
Returns an exact copy of this JaxoLoop.
|
protected abstract java.lang.String |
getAxo4JOptions(float scale)
Return the option part of the LaTeX command for this line.
|
java.awt.Rectangle |
getBounds()
Returns the bounding box of this object.
|
java.awt.geom.Point2D.Float[] |
getEquidistantPoints(int n)
Dividing the loop into n equidistant segments of length d,
so n * d = 2 * r * PI is the circumference of the loop,
this routine returns the n + 1 loop points that are i * d away from P1,
where 0 <= i <= n.
|
protected java.awt.geom.Point2D |
getLaTexAngles()
Returns an angle which is used by the latexCommand method.
|
protected java.awt.geom.Point2D |
getLaTexCenter(float scaleFactor,
int canvasHeight)
Returns a center point which is used by the latexCommand method.
|
protected float |
getLaTexRadius(float scaleFactor)
Returns a radius which is used by the latexCommand method.
|
protected abstract java.awt.geom.GeneralPath |
getObjectPath()
Get the GeneralPath that paints this loop.
|
boolean |
isCopy(JaxoObject comp)
Determines if this JaxoObject is a copy of the specified one.
|
java.lang.String |
latexCommand(float scale,
java.awt.Dimension canvasDim)
The LaTeX command that is necessary to draw the given JaxoObject
using the axodraw.sty package.
|
void |
paint(JaxoGraphics2D g2)
The method that paints the JaxoObject.
|
void |
paintVisualAid(JaxoGraphics2D g2)
Paints a visual aid for the user during dragging
(moving or resizing) of this JaxoObject.
|
void |
rescaleObject(int orx,
int ory,
float scale)
Rescale this JaxoObject by the scale factor scale,
keeping the point (orx, ory) fixed.
|
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, setWigglescanBeSelected, copyFrom, getGrabbedHandle, getHeight, getPointCount, getRadius, getRelh, getRelSize, getRelw, getSize, getStroke, getStrokeWidth, getWidth, getX, getX2, getY, getY2, latexWidth, moveBy, paintHandles, resetStroke, setLocation, setRadius, setRelativeHeight, setRelativeWidth, setRelWAndH, setStroke, setStrokeWidth, setX, setX2, setY, setY2, smallestDistanceTo, strokeIsaddPropertyChangeListener, contains, contains, contains, contains, copyFrom, firePropertyChange, getBounds2D, getBoundsWithHandles, getColor, getGeneralPath, getLaTexLocation, getName, getPathIterator, getPathIterator, getPoints, getX, getY, intersects, intersects, isAround, isMarked, prepareEditPanel, propertyChange, removePropertyChangeListener, setAsMarked, setColor, setLocation, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setPointCount, setPoints, setTransient, setX, setXPosition, setY, setYPositionpublic final JaxoObject copy(JaxoLoopObject temp)
temp - An instance of the loop to copy to (since this is an abstract
class, we have to provide an instance of a sub-class).public boolean isCopy(JaxoObject comp)
isCopy in class JaxoParticleObjectcomp - The JaxoObject to compare against.public void paint(JaxoGraphics2D g2)
paint in class JaxoObjectg2 - The graphics context where the object has to be painted.public java.awt.Rectangle getBounds()
public java.lang.String latexCommand(float scale,
java.awt.Dimension canvasDim)
latexCommand in class JaxoObjectscale - A scale factor to translate Java coordinates to
LaTeX coordinates.canvasDim - The current dimension of the canvas.public final void paintVisualAid(JaxoGraphics2D g2)
paintVisualAid in class JaxoObjectg2 - The graphics context to paint the visual aid.public JaxoArrow.Coordinates arrowCoordinates()
arrowCoordinates in class JaxoParticleObjectpublic final 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 java.awt.geom.Point2D getLaTexCenter(float scaleFactor,
int canvasHeight)
scaleFactor - A scale factor.canvasHeight - The height of the current canvas.public final java.awt.geom.Point2D.Float[] getEquidistantPoints(int n)
n - The number of segments to divide the loop.protected float getLaTexRadius(float scaleFactor)
scaleFactor - A scale factor.protected java.awt.geom.Point2D getLaTexAngles()
protected abstract java.awt.geom.GeneralPath getObjectPath()
protected abstract java.lang.String getAxo4JOptions(float scale)
scale - the axodraw4j scale factor.Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.