Class JaxoPLoop

    • Constructor Detail

      • JaxoPLoop

        public JaxoPLoop()
    • Method Detail

      • copyFrom

        public void copyFrom​(JaxoPLoop temp)
        Sets all parameters from the given object to the current one.
        Parameters:
        temp - The object to copy from.
      • isCopy

        public final boolean isCopy​(JaxoObject comp)
        Determines if this JaxoObject is a copy of the specified one.
        Overrides:
        isCopy in class JaxoLoopObject
        Parameters:
        comp - The JaxoObject to compare against.
        Returns:
        True if the JaxoObjects are identical.
      • latexCommand

        public final 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.
        Overrides:
        latexCommand in class JaxoLoopObject
        Parameters:
        scale - A scale factor to translate Java coordinates to LaTeX coordinates.
        canvasDim - The current dimension of the canvas.
        Returns:
        The corresponding axodraw LaTeX command.
      • getFrequency

        public float getFrequency()
        Gets the current frequency (number of wiggles per unit length) of this WiggleObject.
        Specified by:
        getFrequency in interface JaxoWiggleObject
        Returns:
        The frequency.
      • setWigglesFromFrequency

        public void setWigglesFromFrequency​(float frequency)
        Sets the frequency to the given value and derives the number of wiggles from it.
        Specified by:
        setWigglesFromFrequency in interface JaxoWiggleObject
        Parameters:
        frequency - The frequency to set.
      • setFrequencyFromWiggles

        public void setFrequencyFromWiggles​(int wiggles)
        Sets the number of wiggles to the given value and derives the frequency from it.
        Specified by:
        setFrequencyFromWiggles in interface JaxoWiggleObject
        Parameters:
        wiggles - The number of wiggles to set.
      • setPreferences

        public void setPreferences()
        Applies default values to this JaxoObject. All fields except location points are initialized with values taken from the preferences.
        Overrides:
        setPreferences in class JaxoParticleObject
      • prepareEditPanel

        public void prepareEditPanel​(JaxoObjectEditPanel editPanel)
        Initializes the given editPanel to edit properties of this JaxoObject.
        Specified by:
        prepareEditPanel in class JaxoObject
        Parameters:
        editPanel - the panel to prepare.
      • getObjectPath

        protected java.awt.geom.GeneralPath getObjectPath()
        Get the GeneralPath that paints this loop.
        Specified by:
        getObjectPath in class JaxoLoopObject
        Returns:
        GeneralPath. May be null for an object that cannot be painted.
      • getAxo4JOptions

        protected java.lang.String getAxo4JOptions​(float scale)
        Return the option part of the LaTeX command for this line.
        Specified by:
        getAxo4JOptions in class JaxoLoopObject
        Parameters:
        scale - the axodraw4j scale factor.
        Returns:
        the option String.