Documentation of 'jhplot.jadraw.JaLoopObject' Java class.
JaLoopObject
jhplot.jadraw

Class JaLoopObject

    • Constructor Detail

      • JaLoopObject

        public JaLoopObject()
        Constructor: sets the width, height, relative width and height, to a default value of JaObject.INIT_SIZE.
    • Method Detail

      • copy

        public final JaObject copy(JaLoopObject temp)
        Returns an exact copy of this JaxoLoop.
        Parameters:
        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).
        Returns:
        A copy of this JaxoLoop.
      • isCopy

        public boolean isCopy(JaObject comp)
        Returns true if all serializable variables of this JaLoopObject and those of the specified one are equal.
        Specified by:
        isCopy in class JaObject
        Parameters:
        comp - A JaLoopObject to compare with.
        Returns:
        True if the objects are equal, false otherwise.
      • getStroke

        public final float getStroke()
        Returns the stroke property of this loop object.
        Returns:
        The stroke property of this loop object.
      • setStroke

        public final void setStroke(float newStroke)
        Sets the stroke property of this loop object.
        Parameters:
        newStroke - The stroke property of this loop object.
      • getDash

        public final float getDash()
        Returns the dash property of this loop object.
        Returns:
        The dash property of this loop object.
      • setDash

        public final void setDash(float newDash)
        Sets the dash property of this loop object.
        Parameters:
        newDash - The dash property of this loop object.
      • getFreq

        public final float getFreq()
        Returns the freq property of this loop object.
        Returns:
        The freq property of this loop object.
      • setFreq

        public final void setFreq(float newFreq)
        Sets the freq property of this loop object.
        Parameters:
        newFreq - The freq property of this loop object.
      • getAmp

        public final int getAmp()
        Returns the amp property of this loop object.
        Returns:
        The amp property of this loop object.
      • setAmp

        public final void setAmp(int newAmp)
        Sets the amp property of this loop object.
        Parameters:
        newAmp - The amp property of this loop object.
      • isArrow

        public final boolean isArrow()
        Determines whether the arrow property of this loop object is set or not.
        Returns:
        The arrow property of this loop object.
      • getArrow

        public final boolean getArrow()
        Returns the arrow property of this loop object.
        Returns:
        The arrow property of this loop object.
      • setArrow

        public final void setArrow(boolean arr)
        Sets the arrow property of this loop object.
        Parameters:
        arr - The arrow property of this loop object.
      • isFlip

        public final boolean isFlip()
        Determines whether the flip property of this loop object is set or not.
        Returns:
        The flip property of this loop object.
      • getFlip

        public final boolean getFlip()
        Returns the flip property of this loop object.
        Returns:
        The flip property of this loop object.
      • setFlip

        public final void setFlip(boolean newFlip)
        Sets the flip property of this loop object.
        Parameters:
        newFlip - The flip property of this loop object.
      • setDoubleLine

        public final void setDoubleLine(boolean dline)
        Sets the double line property.
        Parameters:
        dline - The double line boolean variable.
      • getDoubleLine

        public final boolean getDoubleLine()
        Returns the double line property.
        Returns:
        The double line boolean variable of this object.
      • setDLSeparation

        public final void setDLSeparation(float dlsep)
        Sets the double line property.
        Parameters:
        dlsep - The double line property.
      • getDLSeparation

        public final float getDLSeparation()
        Returns the double line property.
        Returns:
        The double line boolean variable of this object.
      • drawVisualAid

        public final void drawVisualAid(org.freehep.graphics2d.VectorGraphics g2)
        Draws a visual aid during the dragging of a loop object, which is a red cross at the center.
        Overrides:
        drawVisualAid in class JaObject
        Parameters:
        g2 - The graphics context to draw to.
      • drawHandles

        public final void drawHandles(org.freehep.graphics2d.VectorGraphics g2)
        Draws the handles of this loop object.
        Specified by:
        drawHandles in class JaObject
        Parameters:
        g2 - The current graphics context.
      • getGrabbedHandle

        public final int getGrabbedHandle(int clickX,
                                          int clickY,
                                          int editmode)
        Determines which handle the user has selected to move/resize/edit this loop.
        Specified by:
        getGrabbedHandle in class JaObject
        Parameters:
        clickX - The x coordinate where the mouse click has ocurred.
        clickY - The y coordinate where the mouse click has ocurred.
        editmode - The current edit mode.
        Returns:
        One of the static variables SELECT_* defined in JaObject that specifies the handle which the user has clicked.
      • rescaleObject

        public final void rescaleObject(int orx,
                                        int ory,
                                        float scale)
        Rescales this JaxoLoop by the scale factor scale, keeping the point (orx, ory) fixed.
        Specified by:
        rescaleObject in class JaObject
        Parameters:
        orx - The x-coordinate of the fixed point
        ory - The y-coordinate of the fixed point
        scale - The scale parameter
      • editPanel

        public final boolean editPanel()
        Brings up the edit panel that allows to change the parameters of this object.
        Specified by:
        editPanel in class JaObject
        Returns:
        True if the editing actually changed the object, false if the object has not been changed.
      • latexWidth

        public final java.lang.String latexWidth()
        The LaTeX command that sets the width for this Loop, using the axodraw.sty package.
        Specified by:
        latexWidth in class JaObject
        Returns:
        The corresponding LaTeX command.

DMelt 3.0 © DataMelt by jWork.ORG