Class JaxoGlBezier

  • All Implemented Interfaces:
    java.awt.Shape, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, JaxoWiggleObject

    public class JaxoGlBezier
    extends JaxoBezierObject
    implements JaxoWiggleObject
    Implementation of a bezier for gluon lines.
    Since:
    2.0
    See Also:
    Serialized Form
    • Constructor Detail

      • JaxoGlBezier

        public JaxoGlBezier()
        Constructor: just calls super().
    • Method Detail

      • copy

        public final JaxoObject copy()
        Returns an exact copy of this JaxoFBezier.
        Overrides:
        copy in class JaxoParticleObject
        Returns:
        A copy of this JaxoFArc.
      • isCopy

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

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

        public void setState​(JaxoObject o)
        Restore state to the values of 'o'. The object 'o' must be an object of the same "type" obtained by JaxoObject.copy().
        Overrides:
        setState in class JaxoBezierObject
        Parameters:
        o - the object to copy from.
      • paint

        public final void paint​(JaxoGraphics2D g2)
        The method that paints the JaxoObject.
        Specified by:
        paint in class JaxoObject
        Parameters:
        g2 - The graphics context where the object has to be painted.
      • getBounds

        public java.awt.Rectangle getBounds()
        Returns the bounding box of this object.
        Specified by:
        getBounds in interface java.awt.Shape
        Returns:
        the bounding box of this object.
      • 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.
        Specified by:
        latexCommand in class JaxoObject
        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 JaxoBezierObject
      • 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.